- Issue created by @urvashi_vora
Hii, @urvashi_vora I have Review your patch.
These are the steps I followed:
1. Took clone from git version 1.0.x in drupal 10.1.x
2. Applied patch and ran this command:
./vendor/bin/phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,m
d,yml,twig modules/contrib/opencollective/But I found errors.
3. I have fixed that error with phpcbf.
Ran this command to fix the errors:
./vendor/bin/phpcbf --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,m
d,yml,twig modules/contrib/opencollective/4. Then again checked with phpcs:
./vendor/bin/phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,m
d,yml,twig modules/contrib/opencollective/Found no errors.
Please review this.
- 🇮🇳India TanujJain-TJ
Tanuj. → made their first commit to this issue’s fork.
- Status changed to Needs work
4 months ago 11:21pm 18 July 2024 Hi @urvahi_vora,
The patch you provided was applied successfully, however, errors were still reported. Please see below:
opencollective git:(main) ✗ curl https://www.drupal.org/files/issues/2023-07-05/coding-standard-fixes_11.patch | patch -p1 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 16162 100 16162 0 0 40760 0 --:--:-- --:--:-- --:--:-- 41547 patching file README.md patching file modules/opencollective_api/README.md patching file modules/opencollective_api/css/api-events.css patching file modules/opencollective_api/src/ApiQueryPluginBase.php patching file modules/opencollective_api/src/Service/ApiClient.php patching file modules/opencollective_api/src/Service/ApiClientFactory.php patching file modules/opencollective_commerce/assets/css/status-report.css patching file modules/opencollective_commerce/opencollective_commerce.module patching file modules/opencollective_commerce/src/Plugin/Commerce/PaymentGateway/ContributionFlowPaymentGateway.php patching file modules/opencollective_commerce/src/PluginForm/ContributionFlowPaymentForm.php patching file modules/opencollective_commerce/src/Service/EventSyncManager.php patching file modules/opencollective_webhooks/opencollective_webhooks.links.menu.yml patching file modules/opencollective_webhooks/src/Entity/WebhookEventInterface.php patching file modules/opencollective_webhooks/src/Form/TestForm.php patching file modules/opencollective_webhooks/src/Service/IncomingWebhooksFactory.php patching file modules/opencollective_webhooks/src/Service/PollingTokenManager.php patching file opencollective.routing.yml ➜ opencollective git:(main) ✗ cd .. ➜ contrib git:(main) ✗ phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig opencollective FILE: .../modules/opencollective_funding/src/Plugin/Funding/FundingProviderBase.php -------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------- 38 | ERROR | [x] Multi-line function declarations must have a trailing comma | | after the last parameter -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- FILE: ...s/opencollective_api_funding/src/Plugin/Funding/ApiFundingProviderBase.php -------------------------------------------------------------------------------- FOUND 2 ERRORS AFFECTING 2 LINES -------------------------------------------------------------------------------- 8 | ERROR | [x] Use statements should be sorted alphabetically. The first | | wrong one is Drupal\opencollective\Service\Parameters. 49 | ERROR | [x] Multi-line function declarations must have a trailing comma | | after the last parameter -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- FILE: ...ctive/modules/opencollective_webhooks/src/Controller/PollingController.php -------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------- 54 | ERROR | [x] Multi-line function declarations must have a trailing comma | | after the last parameter -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- FILE: ...dules/opencollective_webhooks/src/Controller/IncomingWebhookController.php -------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------- 76 | ERROR | [x] Multi-line function declarations must have a trailing comma | | after the last parameter -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- FILE: ...nid_connect/src/Plugin/OpenIdConnectClient/OpenIDConnectOpenCollective.php -------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------- 76 | ERROR | [x] Multi-line function declarations must have a trailing comma | | after the last parameter -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- Time: 2.07 secs; Memory: 22MB
Satish_kumar might have fixed it, but it was only fixed in his/her local and did not provide a patch.
So moving this to 'Needs Work'
Thanks,
Jake- 🇮🇳India dev2.addweb
nilesh.addweb → made their first commit to this issue’s fork.
- Status changed to Needs review
4 months ago 12:10pm 19 July 2024 - 🇮🇳India dev2.addweb
I have fixed issues mention on #4 and created MR including previous patch, Please review it.
- 🇮🇳India abhiyanshu_rawat
abhiyanshu → made their first commit to this issue’s fork.
- Status changed to Needs work
4 months ago 12:43pm 19 July 2024 - 🇮🇳India abhiyanshu_rawat
I have reviewed MR !1, but there are still some PHPCS issues remaining.
Fix few of them, Below are the list of issues remaining. Thanks!
I have raised a separate MR as I encountered some issues on the 1.0.x branch. I have also updated the pipeline for MR !2 (Branch name -> 3372544-fix-the-issues)FILE: /home/developer/projects/orgissues/modules/contrib/opencollective/opencollective.routing.yml
-------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------------------
7 | WARNING | The administration page callback should probably use "administer site configuration" - which implies the user can
| | change something - rather than "access administration pages" which is about viewing but not changing configurations.
-------------------------------------------------------------------------------------------------------------------------------------FILE: /home/developer/projects/orgissues/modules/contrib/opencollective/README.md
---------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
---------------------------------------------------------------------------------
7 | WARNING | Line exceeds 80 characters; contains 152 characters
21 | WARNING | Line exceeds 80 characters; contains 81 characters
39 | WARNING | Line exceeds 80 characters; contains 92 characters
---------------------------------------------------------------------------------FILE: ...eveloper/projects/orgissues/modules/contrib/opencollective/modules/opencollective_webhooks/src/Entity/WebhookEventInterface.php
-------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------------------
8 | ERROR | Doc comment is empty
-------------------------------------------------------------------------------------------------------------------------------------FILE: /home/developer/projects/orgissues/modules/contrib/opencollective/modules/opencollective_webhooks/src/Form/TestForm.php
-----------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------
27 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
-----------------------------------------------------------------------------------------------------------------------------FILE: ...developer/projects/orgissues/modules/contrib/opencollective/modules/opencollective_webhooks/src/Service/PollingTokenManager.php
-------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------------------
30 | ERROR | Doc comment is empty
-------------------------------------------------------------------------------------------------------------------------------------FILE: /home/developer/projects/orgissues/modules/contrib/opencollective/modules/opencollective_api/css/api-events.css
---------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------------
1 | ERROR | Class definition is empty
---------------------------------------------------------------------------------------------------------------------FILE: /home/developer/projects/orgissues/modules/contrib/opencollective/modules/opencollective_api/README.md
------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------
10 | WARNING | Line exceeds 80 characters; contains 93 characters
------------------------------------------------------------------------------------------------------------FILE: /home/developer/projects/orgissues/modules/contrib/opencollective/modules/opencollective_api/src/ApiQueryPluginBase.php
-----------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------
23 | WARNING | Possible useless method overriding detected
-----------------------------------------------------------------------------------------------------------------------------FILE: /home/developer/projects/orgissues/modules/contrib/opencollective/modules/opencollective_api/src/Service/ApiClientFactory.php
-----------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------
10 | ERROR | Doc comment is empty
-----------------------------------------------------------------------------------------------------------------------------------FILE: ...es/contrib/opencollective/modules/opencollective_commerce/src/Plugin/Commerce/PaymentGateway/ContributionFlowPaymentGateway.php
-------------------------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
-------------------------------------------------------------------------------------------------------------------------------------
37 | ERROR | Missing short description in doc comment
38 | ERROR | Missing parameter comment
40 | ERROR | Description for the @return value is missing
-------------------------------------------------------------------------------------------------------------------------------------FILE: ...me/developer/projects/orgissues/modules/contrib/opencollective/modules/opencollective_commerce/src/Service/EventSyncManager.php
-------------------------------------------------------------------------------------------------------------------------------------
FOUND 6 ERRORS AND 2 WARNINGS AFFECTING 8 LINES
-------------------------------------------------------------------------------------------------------------------------------------
16 | ERROR | Doc comment is empty
76 | ERROR | Missing short description in doc comment
77 | ERROR | Description for the @return value is missing
164 | ERROR | Missing short description in doc comment
165 | ERROR | Missing parameter comment
167 | ERROR | Description for the @return value is missing
200 | WARNING | Unused variable $slug.
216 | WARNING | Unused variable $slug.
------------------------------------------------------------------------------------------------------------------------------------- - Status changed to Needs review
4 months ago 1:18pm 19 July 2024 - 🇮🇳India dev16.addweb
Hi,
I have tested MR !1, It applied cleanly.custom/opencollective$ curl https://git.drupalcode.org/project/opencollective/-/merge_requests/1.diff | git apply -v % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 22171 0 22171 0 0 44253 0 --:--:-- --:--:-- --:--:-- 44253 Checking patch README.md... Checking patch modules/opencollective_api/README.md... Checking patch modules/opencollective_api/css/api-events.css... Checking patch modules/opencollective_api/src/ApiQueryPluginBase.php... Checking patch modules/opencollective_api/src/Service/ApiClient.php... Checking patch modules/opencollective_api/src/Service/ApiClientFactory.php... Checking patch modules/opencollective_api_funding/src/Plugin/Funding/ApiFundingProviderBase.php... Checking patch modules/opencollective_commerce/assets/css/status-report.css... Checking patch modules/opencollective_commerce/opencollective_commerce.module... Checking patch modules/opencollective_commerce/src/Plugin/Commerce/PaymentGateway/ContributionFlowPaymentGateway.php... Checking patch modules/opencollective_commerce/src/PluginForm/ContributionFlowPaymentForm.php... Checking patch modules/opencollective_commerce/src/Service/EventSyncManager.php... Checking patch modules/opencollective_funding/src/Plugin/Funding/FundingProviderBase.php... Checking patch modules/opencollective_openid_connect/src/Plugin/OpenIdConnectClient/OpenIDConnectOpenCollective.php... Checking patch modules/opencollective_webhooks/opencollective_webhooks.links.menu.yml... Checking patch modules/opencollective_webhooks/src/Controller/IncomingWebhookController.php... Checking patch modules/opencollective_webhooks/src/Controller/PollingController.php... Checking patch modules/opencollective_webhooks/src/Entity/WebhookEventInterface.php... Checking patch modules/opencollective_webhooks/src/Form/TestForm.php... Checking patch modules/opencollective_webhooks/src/Service/IncomingWebhooksFactory.php... Checking patch modules/opencollective_webhooks/src/Service/PollingTokenManager.php... Checking patch opencollective.routing.yml... Applied patch README.md cleanly. Applied patch modules/opencollective_api/README.md cleanly. Applied patch modules/opencollective_api/css/api-events.css cleanly. Applied patch modules/opencollective_api/src/ApiQueryPluginBase.php cleanly. Applied patch modules/opencollective_api/src/Service/ApiClient.php cleanly. Applied patch modules/opencollective_api/src/Service/ApiClientFactory.php cleanly. Applied patch modules/opencollective_api_funding/src/Plugin/Funding/ApiFundingProviderBase.php cleanly. Applied patch modules/opencollective_commerce/assets/css/status-report.css cleanly. Applied patch modules/opencollective_commerce/opencollective_commerce.module cleanly. Applied patch modules/opencollective_commerce/src/Plugin/Commerce/PaymentGateway/ContributionFlowPaymentGateway.php cleanly. Applied patch modules/opencollective_commerce/src/PluginForm/ContributionFlowPaymentForm.php cleanly. Applied patch modules/opencollective_commerce/src/Service/EventSyncManager.php cleanly. Applied patch modules/opencollective_funding/src/Plugin/Funding/FundingProviderBase.php cleanly. Applied patch modules/opencollective_openid_connect/src/Plugin/OpenIdConnectClient/OpenIDConnectOpenCollective.php cleanly. Applied patch modules/opencollective_webhooks/opencollective_webhooks.links.menu.yml cleanly. Applied patch modules/opencollective_webhooks/src/Controller/IncomingWebhookController.php cleanly. Applied patch modules/opencollective_webhooks/src/Controller/PollingController.php cleanly. Applied patch modules/opencollective_webhooks/src/Entity/WebhookEventInterface.php cleanly. Applied patch modules/opencollective_webhooks/src/Form/TestForm.php cleanly. Applied patch modules/opencollective_webhooks/src/Service/IncomingWebhooksFactory.php cleanly. Applied patch modules/opencollective_webhooks/src/Service/PollingTokenManager.php cleanly. Applied patch opencollective.routing.yml cleanly. addweb@addweb-HP-ZBook-15-G2:~/Drupal8-vagrant/web/web/contribution/lando-d10/web/modules/custom/opencollective$
Also there is no phpcs error or warning found. Please review it.
www-data@a57cb9704236:/app$ phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,yml,css web/modules/custom/opencollective www-data@a57cb9704236:/app$
- Status changed to RTBC
4 months ago 5:45am 22 July 2024 - 🇮🇳India riddhi.addweb
The mentioned phpcs issue is resolved, & I have also checked and it is working as expected. I am attaching the Screenshots & doing RTBC for the same.