- Issue created by @roshni27
- Issue was unassigned.
- Status changed to Needs review
over 1 year ago 5:57pm 7 July 2023 - last update
over 1 year ago 11 pass - Status changed to RTBC
over 1 year ago 12:34am 9 July 2023 - š§šŖBelgium Frederikvho Belgium
Hi,
I applied the patch from comment #2 and ran PHPCS again.
I did not receive any warnings/errors.(base) ā amazon_sns git:(8.x-1.x) ā phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig . (base) ā amazon_sns git:(8.x-1.x) ā
- Status changed to Needs work
3 months ago 2:21pm 24 October 2024 - š§šŖBelgium Frederikvho Belgium
Converted previous patch to MR and sorted the imports.
- šµšPhilippines clarkssquared
Hi frederikvho,
I applied MR !6 but I can still see some PHPCS issues
ā amazon_sns git:(65644ed) curl https://git.drupalcode.org/project/amazon_sns/-/merge_requests/6.diff | patch -p1 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 6301 0 6301 0 0 12655 0 --:--:-- --:--:-- --:--:-- 12806 patching file 'src/Controller/NotificationController.php' patching file 'src/Event/MessageEventDispatcher.php' patching file 'src/Event/SnsMessageEvent.php' patching file 'src/Form/SnsSettingsForm.php' patching file 'tests/fixtures/plain-text-message-server.php' patching file 'tests/src/Kernel/SnsNotificationSubscriberTest.php' patching file 'tests/src/Unit/NotificationControllerTest.php' patching file 'tests/src/Unit/RequestMessageValidatorTest.php' patching file 'tests/src/Unit/SnsMessageEventTest.php' patching file 'tests/src/Unit/SnsSubscriptionConfirmationSubscriberTest.php' ā amazon_sns git:(65644ed) ā .. ā contrib git:(2.1.x) ā phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml amazon_sns FILE: ...ib/amazon_sns/tests/src/Unit/SnsSubscriptionConfirmationSubscriberTest.php -------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------- 7 | ERROR | [x] Use statements should be sorted alphabetically. The first | | wrong one is Drupal\amazon_sns\Event\SnsMessageEvent. -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- FILE: ...trib/web/modules/contrib/amazon_sns/tests/src/Unit/SnsMessageEventTest.php -------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------- 7 | ERROR | [x] Use statements should be sorted alphabetically. The first | | wrong one is Drupal\amazon_sns\Event\SnsMessageEvent. -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- FILE: .../modules/contrib/amazon_sns/tests/src/Unit/RequestMessageValidatorTest.php -------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------- 7 | ERROR | [x] Use statements should be sorted alphabetically. The first | | wrong one is Drupal\amazon_sns\RequestMessageValidator. -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- FILE: ...b/modules/contrib/amazon_sns/tests/src/Unit/NotificationControllerTest.php -------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------- 6 | ERROR | [x] Use statements should be sorted alphabetically. The first | | wrong one is | | Drupal\amazon_sns\Controller\NotificationController. -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- FILE: ...ules/contrib/amazon_sns/tests/src/Kernel/SnsNotificationSubscriberTest.php -------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------- 8 | ERROR | [x] Use statements should be sorted alphabetically. The first | | wrong one is | | Drupal\amazon_sns\Controller\NotificationController. -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- FILE: ...b/web/modules/contrib/amazon_sns/src/Controller/NotificationController.php -------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------- 10 | ERROR | [x] Use statements should be sorted alphabetically. The first | | wrong one is Drupal\amazon_sns\Event\MessageEventDispatcher. -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- Time: 345ms; Memory: 10MB ā contrib git:(2.1.x) ā
- First commit to issue fork.
- š§šŖBelgium Frederikvho Belgium
Interesting, I didn't get any other phpcs errors with my last commit. And sorting use statements was what I had fixed on top of applying patch from #3.
Now with the latest addition in #8 I do get phpcs errors, about sorting use statements, again.What version of phpcs and drupal/coder are you running? I just verified, and I am running the latest version.
phpcs: PHP_CodeSniffer version 3.10.3 (stable) by Squiz and PHPCSStandards
drupal/coder: 8.3.25 - šµšPhilippines clarkssquared
Hi frederikvho,
I have the same version of PHPCS with you and I checked the updated MR !6 and I can confirmed that there's no PHPCS issues in the module
ā amazon_sns git:(65644ed) curl https://git.drupalcode.org/project/amazon_sns/-/merge_requests/6.diff | patch -p1 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 2048 0 2048 0 0 4317 0 --:--:-- --:--:-- --:--:-- 4394 patching file 'src/Event/MessageEventDispatcher.php' patching file 'src/Event/SnsMessageEvent.php' patching file 'src/Form/SnsSettingsForm.php' patching file 'tests/fixtures/plain-text-message-server.php' ā amazon_sns git:(65644ed) ā .. ā contrib git:(2.1.x) ā phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml amazon_sns ā contrib git:(2.1.x) ā
RTBC +1 from me, will retain the status to needs review for others.