- Issue created by @ptmkenny
- Status changed to Needs review
over 1 year ago 7:05pm 1 May 2023 - Status changed to RTBC
over 1 year ago 1:46am 2 May 2023 - šµšPhilippines paraderojether
Hi ptmkenny
I reviewed MR!4, and verified it fixes all the error reported by the phpcs. Drupal core 9.5.8, JSON-RPC 2.x-dev.
I added screenshots for reference.
Thank You. - Status changed to Needs work
over 1 year ago 3:01pm 20 May 2023 - last update
over 1 year ago 4 pass - Status changed to Needs review
over 1 year ago 3:06pm 21 May 2023 - Status changed to Needs work
6 months ago 11:54am 26 May 2024 - šµšPhilippines clarkssquared
Hi
I applied the updated MR !4 and there's still a PHPCS error below:
ā jsonrpc git:(2.x) curl https://git.drupalcode.org/project/jsonrpc/-/merge_requests/4.diff | patch -p1 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 10938 0 10938 0 0 16218 0 --:--:-- --:--:-- --:--:-- 16374 patching file 'modules/jsonrpc_core/src/Plugin/jsonrpc/Method/AddPermissionToRole.php' patching file 'modules/jsonrpc_core/src/Plugin/jsonrpc/Method/Cache.php' patching file 'modules/jsonrpc_core/src/Plugin/jsonrpc/Method/ListPermissions.php' patching file 'modules/jsonrpc_core/src/Plugin/jsonrpc/Method/Plugins.php' patching file 'modules/jsonrpc_core/tests/src/Functional/MaintenanceModeEnabledTest.php' patching file 'modules/jsonrpc_core/tests/src/Functional/PluginsTest.php' patching file 'src/Annotation/JsonRpcParameterDefinition.php' patching file 'src/Handler.php' patching file 'src/Object/Error.php' patching file 'src/Object/ParameterBag.php' patching file 'src/Object/Response.php' patching file 'src/Plugin/JsonRpcMethodManager.php' patching file 'src/Shaper/RpcRequestFactory.php' patching file 'tests/src/Functional/JsonRpcTestBase.php' patching file 'tests/src/Functional/ResponseHeadersTest.php' ā jsonrpc git:(2.x) ā .. ā contrib git:(master) ā phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml jsonrpc FILE: ...9/d9-local/web/modules/contrib/jsonrpc/src/Plugin/JsonRpcMethodManager.php -------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------- 7 | ERROR | [x] Use statements should be sorted alphabetically. The first | | wrong one is Drupal\Core\Cache\CacheBackendInterface. -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- FILE: ...s/d9/d9-local/web/modules/contrib/jsonrpc/src/Shaper/RpcRequestFactory.php -------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------- 12 | ERROR | [x] Use statements should be sorted alphabetically. The first | | wrong one is Drupal\jsonrpc\ParameterDefinitionInterface. -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- Time: 646ms; Memory: 12MB ā contrib git:(master) ā
Below is the full PHPCS result before and after applying the MR !4
ā contrib git:(master) ā phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml jsonrpc FILE: ...local/web/modules/contrib/jsonrpc/tests/src/Functional/JsonRpcTestBase.php -------------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE -------------------------------------------------------------------------------- 15 | WARNING | The class short comment should describe what the class does and | | not simply repeat the class name -------------------------------------------------------------------------------- FILE: ...l/web/modules/contrib/jsonrpc/tests/src/Functional/ResponseHeadersTest.php -------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------- 16 | ERROR | Missing member variable doc comment -------------------------------------------------------------------------------- FILE: ...c/modules/jsonrpc_core/tests/src/Functional/MaintenanceModeEnabledTest.php -------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------- 15 | ERROR | Missing member variable doc comment -------------------------------------------------------------------------------- FILE: .../contrib/jsonrpc/modules/jsonrpc_core/tests/src/Functional/PluginsTest.php -------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------- 15 | ERROR | Missing member variable doc comment -------------------------------------------------------------------------------- FILE: ...rpc/modules/jsonrpc_core/src/Plugin/jsonrpc/Method/AddPermissionToRole.php -------------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE -------------------------------------------------------------------------------- 31 | WARNING | [x] Inline @var declarations should use the /** */ delimiters -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- FILE: ...s/contrib/jsonrpc/modules/jsonrpc_core/src/Plugin/jsonrpc/Method/Cache.php -------------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE -------------------------------------------------------------------------------- 16 | WARNING | The class short comment should describe what the class does and | | not simply repeat the class name -------------------------------------------------------------------------------- FILE: ...contrib/jsonrpc/modules/jsonrpc_core/src/Plugin/jsonrpc/Method/Plugins.php -------------------------------------------------------------------------------- FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES -------------------------------------------------------------------------------- 63 | WARNING | [x] Inline @var declarations should use the /** */ delimiters 65 | WARNING | [x] Inline @var declarations should use the /** */ delimiters -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- FILE: ...jsonrpc/modules/jsonrpc_core/src/Plugin/jsonrpc/Method/ListPermissions.php -------------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE -------------------------------------------------------------------------------- 37 | WARNING | [x] 'TODO: Fix the schema.' should match the format '@todo Fix | | problem X here.' -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- FILE: ...ng-subing/Projects/d9/d9-local/web/modules/contrib/jsonrpc/src/Handler.php -------------------------------------------------------------------------------- FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES -------------------------------------------------------------------------------- 155 | WARNING | [x] '@TODO: Remove the following when PHP7 is the minimum | | supported version.' should match the format '@todo Fix | | problem X here.' 218 | WARNING | [x] 'TODO: Add cacheability metadata here.' should match the | | format '@todo Fix problem X here.' 219 | WARNING | [x] Inline @var declarations should use the /** */ delimiters -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- FILE: ...9/d9-local/web/modules/contrib/jsonrpc/src/Plugin/JsonRpcMethodManager.php -------------------------------------------------------------------------------- FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES -------------------------------------------------------------------------------- 7 | ERROR | [x] Use statements should be sorted alphabetically. The first | | wrong one is Drupal\Core\Cache\CacheBackendInterface. 41 | WARNING | [x] Inline @var declarations should use the /** */ delimiters -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- FILE: .../web/modules/contrib/jsonrpc/src/Annotation/JsonRpcParameterDefinition.php -------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------- 72 | ERROR | [x] Use null coalesce operator instead of ternary operator. -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- FILE: ...s/d9/d9-local/web/modules/contrib/jsonrpc/src/Shaper/RpcRequestFactory.php -------------------------------------------------------------------------------- FOUND 2 ERRORS AND 1 WARNING AFFECTING 3 LINES -------------------------------------------------------------------------------- 12 | ERROR | [x] Use statements should be sorted alphabetically. The first | | wrong one is Drupal\jsonrpc\ParameterDefinitionInterface. 106 | ERROR | [x] Use null coalesce operator instead of ternary operator. 177 | WARNING | [x] 'TODO: Wrap other shaper transformations in a similar way | | for nicer' should match the format '@todo Fix problem X | | here.' -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- FILE: ...g/Projects/d9/d9-local/web/modules/contrib/jsonrpc/src/Object/Response.php -------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------- 58 | ERROR | Parameter $headers is not described in comment -------------------------------------------------------------------------------- FILE: ...bing/Projects/d9/d9-local/web/modules/contrib/jsonrpc/src/Object/Error.php -------------------------------------------------------------------------------- FOUND 2 ERRORS AFFECTING 2 LINES -------------------------------------------------------------------------------- 22 | ERROR | Missing member variable doc comment 30 | ERROR | Missing member variable doc comment -------------------------------------------------------------------------------- FILE: ...ojects/d9/d9-local/web/modules/contrib/jsonrpc/src/Object/ParameterBag.php -------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------- 49 | ERROR | [x] Use null coalesce operator instead of ternary operator. -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- Time: 712ms; Memory: 12MB ā contrib git:(master) ā cd jsonrpc ā jsonrpc git:(2.x) curl https://git.drupalcode.org/project/jsonrpc/-/merge_requests/4.diff | patch -p1 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 10938 0 10938 0 0 16218 0 --:--:-- --:--:-- --:--:-- 16374 patching file 'modules/jsonrpc_core/src/Plugin/jsonrpc/Method/AddPermissionToRole.php' patching file 'modules/jsonrpc_core/src/Plugin/jsonrpc/Method/Cache.php' patching file 'modules/jsonrpc_core/src/Plugin/jsonrpc/Method/ListPermissions.php' patching file 'modules/jsonrpc_core/src/Plugin/jsonrpc/Method/Plugins.php' patching file 'modules/jsonrpc_core/tests/src/Functional/MaintenanceModeEnabledTest.php' patching file 'modules/jsonrpc_core/tests/src/Functional/PluginsTest.php' patching file 'src/Annotation/JsonRpcParameterDefinition.php' patching file 'src/Handler.php' patching file 'src/Object/Error.php' patching file 'src/Object/ParameterBag.php' patching file 'src/Object/Response.php' patching file 'src/Plugin/JsonRpcMethodManager.php' patching file 'src/Shaper/RpcRequestFactory.php' patching file 'tests/src/Functional/JsonRpcTestBase.php' patching file 'tests/src/Functional/ResponseHeadersTest.php' ā jsonrpc git:(2.x) ā .. ā contrib git:(master) ā phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml jsonrpc FILE: ...9/d9-local/web/modules/contrib/jsonrpc/src/Plugin/JsonRpcMethodManager.php -------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------- 7 | ERROR | [x] Use statements should be sorted alphabetically. The first | | wrong one is Drupal\Core\Cache\CacheBackendInterface. -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- FILE: ...s/d9/d9-local/web/modules/contrib/jsonrpc/src/Shaper/RpcRequestFactory.php -------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------- 12 | ERROR | [x] Use statements should be sorted alphabetically. The first | | wrong one is Drupal\jsonrpc\ParameterDefinitionInterface. -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- Time: 646ms; Memory: 12MB ā contrib git:(master) ā
Moving this to needs work
- last update
6 months ago 4 pass - Status changed to Needs review
6 months ago 12:02pm 26 May 2024 - šÆšµJapan ptmkenny
@clarkssquared Good catch, the coding standards had been updated since this was originally submitted.
- šµšPhilippines clarkssquared
Hi ptmkenny,
I applied the updated MR !4 after commit 873f5808, and I confirmed that there are no PHPCS issues
ā jsonrpc git:(2.x) curl https://git.drupalcode.org/project/jsonrpc/-/merge_requests/4.diff | patch -p1 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 11826 0 11826 0 0 26106 0 --:--:-- --:--:-- --:--:-- 26456 patching file 'modules/jsonrpc_core/src/Plugin/jsonrpc/Method/AddPermissionToRole.php' patching file 'modules/jsonrpc_core/src/Plugin/jsonrpc/Method/Cache.php' patching file 'modules/jsonrpc_core/src/Plugin/jsonrpc/Method/ListPermissions.php' patching file 'modules/jsonrpc_core/src/Plugin/jsonrpc/Method/Plugins.php' patching file 'modules/jsonrpc_core/tests/src/Functional/MaintenanceModeEnabledTest.php' patching file 'modules/jsonrpc_core/tests/src/Functional/PluginsTest.php' patching file 'src/Annotation/JsonRpcParameterDefinition.php' patching file 'src/Handler.php' patching file 'src/Object/Error.php' patching file 'src/Object/ParameterBag.php' patching file 'src/Object/Response.php' patching file 'src/Plugin/JsonRpcMethodManager.php' patching file 'src/Shaper/RpcRequestFactory.php' patching file 'tests/src/Functional/JsonRpcTestBase.php' patching file 'tests/src/Functional/ResponseHeadersTest.php' ā jsonrpc git:(2.x) ā .. ā contrib git:(master) ā phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml jsonrpc ā contrib git:(master) ā
RTBC +1 from me, I will retain the status to needs review for others to also give their feedbacks.
-
ptmkenny ā
committed fd6f1499 on 2.x
Issue #3339557 by ptmkenny, paraderojether, avpaderno, clarkssquared:...
-
ptmkenny ā
committed fd6f1499 on 2.x
- Status changed to Fixed
3 months ago 10:52pm 30 August 2024 Automatically closed - issue fixed for 2 weeks with no activity.