- Issue created by @paraderojether
- Issue was unassigned.
- Status changed to Needs review
over 1 year ago 2:03am 2 June 2023 - 🇵ðŸ‡Philippines paraderojether
Created a patch to fix the issues reported by phpcs.
Please review.
Thank You. - thakurnishant_06 India
Hello Guys,
I have applied and tested the #2 patch for swiper_formatter 1.0.x-dev and the phpcs issues has been successfully fixed! The patch was tested on Drupal 9.5.9 and PHP 8.2.4. To provide you with a comprehensive view, I will be adding both a before and after screenshots.Thank you for your support!!
- Status changed to Needs work
over 1 year ago 9:41am 2 June 2023 - 🇮🇹Italy apaderno Brescia, 🇮🇹
phpcs
reports more warnings/errors than the ones shown in the issue summary. - Assigned to nitin_lama
- 🇮🇳India nitin_lama India
True @apaderno. There are issues still left after applying the patch #2.
phpcs reports only for js/swiper_formatter.js file. Attaching ss for reference. - 🇮🇹Italy apaderno Brescia, 🇮🇹
drupalcs
does not produce the same reportphpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig
gives, at least because the latter does not check JavaScript files. - 🇮🇳India nitin_lama India
I'm using alias for the commands @apaderno.
- Issue was unassigned.
- Status changed to Needs review
over 1 year ago 2:19am 7 June 2023 - 🇵ðŸ‡Philippines paraderojether
Hi I updated the patch to address the other issues that are added in the summary.
Please review.
Thank You. - 🇮🇳India arpitk
Hi here is the updated patch.
command used; phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,js .
Please review.Thanks!
- 🇮🇳India pray_12
Hi,
After reviewing patches #9 and #10, patch is applied successfully without any issues. However, there are still a few remaining PHPCS errors that need to be addressed.
command used:phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig swiper_formatter/FILE: /swiper_formatter/src/SwiperFormatterTrait.php ------------------------------------------------------------------------------------------------------------------------------------ FOUND 1 ERROR AFFECTING 1 LINE ------------------------------------------------------------------------------------------------------------------------------------ 7 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Field\FieldDefinitionInterface. ------------------------------------------------------------------------------------------------------------------------------------ PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ------------------------------------------------------------------------------------------------------------------------------------ FILE: /swiper_formatter/src/Element/SwiperFormatterSettings.php -------------------------------------------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------------------------------------------- 8 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Link. -------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------------------------------------------- FILE: /swiper_formatter/src/Form/SwiperFormatterForm.php --------------------------------------------------------------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE --------------------------------------------------------------------------------------------------------------------------------------- 7 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Entity\EntityTypeManagerInterface. --------------------------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY --------------------------------------------------------------------------------------------------------------------------------------- FILE: /swiper_formatter/src/Plugin/views/style/SwiperFormatterStyle.php ----------------------------------------------------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ----------------------------------------------------------------------------------------------------------------------------- 7 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Form\FormStateInterface. ----------------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ----------------------------------------------------------------------------------------------------------------------------- FILE: /swiper_formatter/src/Plugin/Field/FieldFormatter/SwiperFormatterEntity.php ------------------------------------------------------------------------------------------------------------------------------------------------------------FOUND 1 ERROR AFFECTING 1 LINE ------------------------------------------------------------------------------------------------------------------------------------------------------------ 7 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is | | Drupal\Core\Field\Plugin\Field\FieldFormatter\EntityReferenceEntityFormatter. ------------------------------------------------------------------------------------------------------------------------------------------------------------PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ------------------------------------------------------------------------------------------------------------------------------------------------------------ FILE: /swiper_formatter/src/Plugin/Field/FieldFormatter/SwiperFormatterText.php -------------------------------------------------------------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------------------------------------------------------------- 6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\swiper_formatter\SwiperFormatterTrait. -------------------------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------------------------------------------------------------- FILE: /swiper_formatter/swiper_formatter.module ----------------------------------------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ----------------------------------------------------------------------------------------------------------------- 9 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Cache\Cache. ----------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -----------------------------------------------------------------------------------------------------------------
- 🇮🇳India pray_12
Hi,
I have addressed the remaining phpcs errors and warnings.
Please review!!! - 🇮🇳India karanpagare
Tested Patch #12 , Looks fine to me , which fixes phpcs issues as per command phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig swiper_formatter/
- Status changed to Fixed
8 months ago 4:51pm 19 March 2024 - 🇳🇱Netherlands nk_
Thank you all! It was finally committed in the new release → , the last one supporting Drupal 8.8 and 9. A brand new branch 2.0.x → with quite some new features is there and recommended for a future use.
Automatically closed - issue fixed for 2 weeks with no activity.