- Status changed to Needs work
over 1 year ago 1:57pm 2 May 2023 - 🇵ðŸ‡Philippines clarkssquared
Hi Jay Jangid
I applied your MR !2 in my local and it applied cleanly, however, there are still PHPCS errors being flagged,
contrib git:(master) ✗ phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml monix
FILE: /Users/studenttrainees/Projects/drupalorgissues/docroot/modules/contrib/monix/src/MonixPluginManager.php
--------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------
48 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
--------------------------------------------------------------------------------------------------------------FILE: /Users/studenttrainees/Projects/drupalorgissues/docroot/modules/contrib/monix/src/Controller/MonixController.php
----------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
----------------------------------------------------------------------------------------------------------------------
77 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
99 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
100 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
----------------------------------------------------------------------------------------------------------------------Time: 210ms; Memory: 10MB
Please look at the screenshot attached for your reference.
Thanks
- Assigned to himanshu_jhaloya
- Issue was unassigned.
- Status changed to Needs review
over 1 year ago 8:16am 5 May 2023 - 🇮🇳India himanshu_jhaloya Indore
created a patch to fix the issue. one is remaining. please reivew
- Status changed to Needs work
over 1 year ago 3:46pm 5 May 2023 - 🇮🇹Italy apaderno Brescia, 🇮🇹
I do not have time for a full review, but the following property is already defined in the parent class (
ControllerBase
) and it does not need to be redefined from this class.+ /** + * The configuration factory service. + * + * @var \Drupal\Core\Config\ConfigFactoryInterface + */ + protected $configFactory;
I would suggest to check the changes done to avoid redefining properties the parent classes already define and verify which methods from the parent classes can be used.
- Assigned to imustakim
- Issue was unassigned.
- Status changed to Needs review
over 1 year ago 8:16am 10 May 2023 - Status changed to Needs work
over 1 year ago 9:40am 10 May 2023 - 🇮🇹Italy apaderno Brescia, 🇮🇹
+ /** + * The current global container. + * + * @var \Drupal\Component\DependencyInjection\Container + */ + protected $container; +
The dependency injection container. is a better description, since current global container does not make clear which container that would be. - Assigned to imustakim
- Issue was unassigned.
- Status changed to Needs review
over 1 year ago 11:43am 10 May 2023 - 🇮🇳India imustakim Ahmedabad
Patch updated as per suggestions.
Please review. Hi, Reviewed the patch at #13 applies cleanly, fixes all the phpcs errors and addresses the comment at #11.
Thank you!