- Issue created by @jmolivas
- First commit to issue fork.
- Status changed to Needs review
7 months ago 6:53am 9 September 2024 - 🇮🇳India sarwan_verma
Hi,
I have resolved the deprecation issue and created MR!18.
Please review and verify.Thanks!
- 🇺🇸United States jmolivas El Centro, CA
Thanks for the MR @sarwan_verma, the code change introduces new issues could you have them fixed in order to merge the code
- phpcs
-------------------------------------------------------------------------------- FOUND 6 ERRORS AND 2 WARNINGS AFFECTING 4 LINES -------------------------------------------------------------------------------- 197 | WARNING | [ ] Line exceeds 80 characters; contains 108 characters | | (Drupal.Files.LineLength.TooLong) 197 | ERROR | [x] Comments may not appear after statements | | (Drupal.Commenting.PostStatementComment.Found) 197 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, | | question marks, colons, or closing parentheses | | (Drupal.Commenting.InlineComment.InvalidEndChar) 200 | WARNING | [ ] Line exceeds 80 characters; contains 122 characters | | (Drupal.Files.LineLength.TooLong) 200 | ERROR | [x] Comments may not appear after statements | | (Drupal.Commenting.PostStatementComment.Found) 200 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, | | question marks, colons, or closing parentheses | | (Drupal.Commenting.InlineComment.InvalidEndChar) 203 | ERROR | [x] Whitespace found at end of line | | (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine) 206 | ERROR | [x] Whitespace found at end of line | | (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine) -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- Time: 149ms; Memory: 6MB PHP CODE SNIFFER REPORT SUMMARY -------------------------------------------------------------------------------- FILE ERRORS WARNINGS -------------------------------------------------------------------------------- .../decoupled_preview_iframe-3472794/src/Form/SettingsForm.php 6 2 -------------------------------------------------------------------------------- A TOTAL OF 6 ERRORS AND 2 WARNINGS WERE FOUND IN 4 FILES -------------------------------------------------------------------------------- PHPCBF CAN FIX 6 OF THESE SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- PHP CODE SNIFFER VIOLATION SOURCE SUMMARY ---------------------------------------------------------------------- SOURCE COUNT ---------------------------------------------------------------------- [x] Drupal.Commenting.InlineComment.InvalidEndChar 2 [x] Drupal.Commenting.PostStatementComment.Found 2 [ ] Drupal.Files.LineLength.TooLong 2 [x] Squiz.WhiteSpace.SuperfluousWhitespace.EndLine 2 ---------------------------------------------------------------------- A TOTAL OF 8 SNIFF VIOLATIONS WERE FOUND IN 4 SOURCES ---------------------------------------------------------------------- PHPCBF CAN FIX THE 3 MARKED SOURCES AUTOMATICALLY (6 VIOLATIONS IN TOTAL) ----------------------------------------------------------------------
- 🇺🇸United States jmolivas El Centro, CA
Can we also make sure we use dependency injection instead of calling
\Drupal
static class?- phpstan report
------ ---------------------------------------------------------------------- Line src/Form/SettingsForm.php ------ ---------------------------------------------------------------------- 197 \Drupal calls should be avoided in classes, use dependency injection instead
- 🇺🇸United States jmolivas El Centro, CA
Hi @sarwan_verma do you have any plans to keep working on this?