- Issue created by @DamienMcKenna
- Status changed to Needs review
7 months ago 5:42am 17 June 2024 - last update
7 months ago 2 fail - 🇮🇳India dev16.addweb
Hi, I have tested phpcs issues and fix below issues and created patch, Please review.
/modules/custom/views_rss/ FILE: /home/addweb/Drupal8-vagrant/web/web/contribution/drupal-10-3/web/modules/custom/views_rss/src/Plugin/views/style/RssFields.php ------------------------------------------------------------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ------------------------------------------------------------------------------------------------------------------------------------- 52 | ERROR | Class property $channel_elements should use lowerCamel naming without underscores ------------------------------------------------------------------------------------------------------------------------------------- FILE: /home/addweb/Drupal8-vagrant/web/web/contribution/drupal-10-3/web/modules/custom/views_rss/tests/src/Functional/DisplayFeedTest.php ----------------------------------------------------------------------------------------------------------------------------------------- FOUND 1 ERROR AND 1 WARNING AFFECTING 1 LINE ----------------------------------------------------------------------------------------------------------------------------------------- 199 | WARNING | [ ] Line exceeds 80 characters; contains 89 characters 199 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses ----------------------------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ----------------------------------------------------------------------------------------------------------------------------------------- Time: 646ms; Memory: 14MB
The last submitted patch, 2: phpcs-3453962-2.patch, failed testing. View results →
- First commit to issue fork.
- Merge request !8Issue #3453962: Fix coding standard bugs per gitlab-ci. → (Merged) created by diwakar07
- last update
7 months ago 2 pass - last update
7 months ago 2 pass - First commit to issue fork.
- last update
7 months ago 2 pass - Assigned to ivnish
- Status changed to Needs review
7 months ago 7:44am 25 June 2024 - ivnish Kazakhstan
I fixed all CI issues, but before merge we need to manual testing. Please use patch from MR and test it on your dev/stage sites (not prod)
Link to patch https://git.drupalcode.org/project/views_rss/-/merge_requests/8.patch
- Status changed to Needs work
7 months ago 10:21am 26 June 2024 - 🇺🇸United States DamienMcKenna NH, USA
Great work, everyone! I really appreciate you all for working through this.
A few minor things need some tweaks.
- While I appreciate that DeprecationHelper exists, I think we should just do the old method_exists() check for now, for compatibility with older core releases.
- getID3 should be added as a test dependency so that the
@phpstan-ignore class.notFound
bits aren't needed for getID3(). - The
@phpstan-ignore variable.undefined, empty.variable
bits should be redone to avoid needing the phpstan-ignore lines. - Why were the "Need more information" titles removed?
- Code that is commented out should be wrapped with @code / @endcode.
- ivnish Kazakhstan
While I appreciate that DeprecationHelper exists, I think we should just do the old method_exists() check for now, for compatibility with older core releases.
I'm tried this code but phpstan still warnings about renderPlain method.
$renderer = \Drupal::service('renderer'); $output = method_exists($renderer, 'renderInIsolation') ? $renderer->renderInIsolation($item['rendered'], FALSE) : $renderer->renderPlain($item['rendered'], FALSE);
Can you explain how to fix this?
getID3 should be added as a test dependency so that the @phpstan-ignore class.notFound bits aren't needed for getID3().
Fixed
The @phpstan-ignore variable.undefined, empty.variable bits should be redone to avoid needing the phpstan-ignore lines.
There is a strange situation with $element_groups variable. It is never defined (looks like legacy code). Can you look to that code https://git.drupalcode.org/project/views_rss/-/merge_requests/8/diffs#a6... and give advice?
Why were the "Need more information" titles removed?
Because fromTextAndUrl method has only 2 parameters, not 3
Code that is commented out should be wrapped with @code / @endcode.
Fixed
- 🇺🇸United States DamienMcKenna NH, USA
For the DeprecationHelper change, IIRC the short term fix should be to use phpstan's commands to ignore that line, and then we can open a D12 compatibility issue to fix this later on once we're no longer supporting older releases.
I think we need to dig into the D7 code to see where $element_groups came from.
Thank you for making the other changes.
- Status changed to Needs review
6 months ago 9:44am 30 June 2024 - Status changed to Fixed
6 months ago 12:40pm 18 July 2024 -
DamienMcKenna →
committed 05b20952 on 8.x-2.x authored by
Diwakar07 →
Issue #3453962 by ivnish, Diwakar07, silvi.addweb, DamienMcKenna: Fix...
-
DamienMcKenna →
committed 05b20952 on 8.x-2.x authored by
Diwakar07 →
Automatically closed - issue fixed for 2 weeks with no activity.