- Issue created by @urvashi_vora
- Status changed to Needs work
over 1 year ago 7:17am 24 August 2023 Hello, @urvashi_vora thanks for the patch, I have applied your patch and ran successfully.
These are the steps I followed:
1. Took clone from git version and switch to branch 1.1.0 in drupal 10.1.x
2. 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/klavio_marketing/3. Applied your patch and, again ran phpcs command
found errors.
Needs work.
- Assigned to nitin_lama
- Issue was unassigned.
- 🇮🇳India nitin_lama India
Unable to apply initial patch on master branch. Providing an updated patch.
- 🇮🇳India ashutosh ahirwal India
I have reviewed #4 patch.
Patch get applied cleanly but still having errors in it.Used command to review patch
./vendor/bin/phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,css,js,yml web/modules/custom/klavio_marketingRemaining issue after applying #4 patch
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/klavio_marketing/klavio_marketing.module
-----------------------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 4 LINES
-----------------------------------------------------------------------------------------------------------------
3 | ERROR | Missing short description in doc comment
31 | ERROR | Missing parameter type
33 | ERROR | Missing parameter type
36 | ERROR | Return type missing for @return tag in function comment
36 | ERROR | Description for the @return value is missing
-----------------------------------------------------------------------------------------------------------------FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/klavio_marketing/klavio_marketing.links.menu.yml
-------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------
27 | ERROR | [x] Expected 1 newline at end of file; 0 found
-------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/klavio_marketing/klavio_marketing.info.yml
-------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------
7 | ERROR | [x] Expected 1 newline at end of file; 0 found
-------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/klavio_marketing/klavio_marketing.routing.yml
----------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------
31 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/klavio_marketing/src/Form/KlavioMarketingDashboard.php
-------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------------
6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Form\FormBase.
-------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/klavio_marketing/src/Form/KlavioMarketingCampaigns.php
-------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------------
53 | WARNING | Unused private method convertToRate()
-------------------------------------------------------------------------------------------------------------------------------FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/klavio_marketing/src/KlavioMarketingApi.php
--------------------------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AND 6 WARNINGS AFFECTING 9 LINES
--------------------------------------------------------------------------------------------------------------------
8 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is GuzzleHttp\Client.
27 | ERROR | [ ] Class property $company_id should use lowerCamel naming without underscores
27 | ERROR | [ ] Missing member variable doc comment
28 | ERROR | [ ] Class property $private_key should use lowerCamel naming without underscores
28 | ERROR | [ ] Missing member variable doc comment
39 | WARNING | [ ] Line exceeds 80 characters; contains 113 characters
77 | WARNING | [ ] Unused variable $statusCode.
122 | WARNING | [ ] Unused variable $statusCode.
148 | WARNING | [ ] Unused variable $email.
180 | WARNING | [ ] Unused variable $statusCode.
181 | WARNING | [ ] Unused variable $responseBody.
--------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/klavio_marketing/src/Plugin/WebformHandler/KlavioMarketingFormHandler.php
--------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------------------------------------
232 | WARNING | Unused variable $response.
-------------------------------------------------------------------------------------------------------------------------------------------------- - 🇮🇳India aayushDrupal
Hi Ashutosh Ahirwal,
In this patch, I have solved all the errors mentioned in comment #5. Screenshot attached for your reference.Please review.
- Status changed to Needs review
about 1 year ago 11:20am 26 September 2023 - Status changed to Needs work
7 months ago 7:56am 31 May 2024 Hi @aayushmankotia,
Patch #6 applied not-so successfully because
1 out of 2 hunks FAILED
klavio_marketing git:(main) ✗ curl https://www.drupal.org/files/issues/2023-09-26/phpcs_error_fixed-3373171-6.patch | patch -p1 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 20502 100 20502 0 0 50865 0 --:--:-- --:--:-- --:--:-- 52569 patching file README.md Hunk #2 succeeded at 15 with fuzz 2. patching file klavio_marketing.info.yml Hunk #1 FAILED at 4. 1 out of 1 hunk FAILED -- saving rejects to file klavio_marketing.info.yml.rej patching file klavio_marketing.links.menu.yml Hunk #1 succeeded at 24 with fuzz 1. patching file klavio_marketing.module Hunk #2 FAILED at 14. 1 out of 2 hunks FAILED -- saving rejects to file klavio_marketing.module.rej patching file klavio_marketing.routing.yml patching file src/Form/KlavioMarketingCampaigns.php patching file src/Form/KlavioMarketingDashboard.php patching file src/Form/KlavioMarketingLists.php patching file src/Form/SettingsForm.php patching file src/KlavioMarketingApi.php patching file src/Plugin/WebformHandler/KlavioMarketingFormHandler.php
Kindly check
Thanks,
Jake