81 | ERROR | [ ] Type hint "\Drupal\Core\Entity\EntityManagerInterface" missing for $entity_manager
106 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
132 | ERROR | [ ] Return type missing for @return tag in function comment

Comments

Hardik_Patel_12 created an issue. See original summary.

hardik_patel_12’s picture

Assigned: hardik_patel_12 » Unassigned
Status: Needs work » Needs review
StatusFileSize
new1.49 KB

Kindly apply a new patch

akashkumar07’s picture

StatusFileSize
new1.74 KB
akashkumar07’s picture

StatusFileSize
new1.74 KB
naresh_bavaskar’s picture

Assigned: Unassigned » naresh_bavaskar
naresh_bavaskar’s picture

Assigned: naresh_bavaskar » Unassigned
Status: Needs review » Reviewed & tested by the community

Looks good to me.

catch’s picture

Status: Reviewed & tested by the community » Needs work
+++ b/core/modules/system/src/SystemManager.php
@@ -129,7 +130,7 @@ public function listRequirements() {
    *
-   * @return
+   * @return array

I think the return here is a string rather than array (i.e. it's a string value, extracted from the array).

Core tests are failing for some reason:

11:54:46 Drupal\Tests\language\Functional\LanguagePathMonolingualTest   0 passes             1 exceptions             
11:54:48 Drupal\Tests\jsonapi\Functional\SearchPageTest                 8 passes                                      
11:54:48 FATAL Drupal\Tests\language\Functional\LanguagePathMonolingualTest: test runner returned a non-zero error code (2).
11:54:48 Drupal\Tests\language\Functional\LanguagePathMonolingualTest   0 passes   1 fails  
longwave’s picture

+++ b/core/modules/system/src/SystemManager.php
@@ -78,7 +79,7 @@ class SystemManager {
-  public function __construct(ModuleHandlerInterface $module_handler, $entity_manager, RequestStack $request_stack, MenuLinkTreeInterface $menu_tree, MenuActiveTrailInterface $menu_active_trail) {
+  public function __construct(ModuleHandlerInterface $module_handler, EntityManagerInterface $entity_manager, RequestStack $request_stack, MenuLinkTreeInterface $menu_tree, MenuActiveTrailInterface $menu_active_trail) {

Tests are failing because we can't make this change; since #3025152: Remove entityManager constructor argument from SystemManager the $entity_manager is not used and NULL is passed in, which doesn't meet the interface requirements.

This has already been removed in 9.x but here maybe we can change the docblock to remove the typehint and mention "(unused)" after the parameter description or similar?

hardik_patel_12’s picture

hardik_patel_12’s picture

Status: Closed (duplicate) » Needs review

Sorry by mistake done by me for above comment

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

sulfikar_s’s picture

StatusFileSize
new34.69 KB
new522 bytes

Hello all, the patch in #4 is not applying on 9.2.x-dev,

after-patch_0.png

Also I've found that 'EntityManagerInterface' is not used anywhere in 9.2.x. Found that 'EntityManagerInterface' is deprecated and removed from 9.0 through research, here's the link https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Entity%21...

Also now in the '/core/modules/system/src/SystemManager.php', there is only one minor coding standard issue is found. I'm attaching the patch for it.

Please review

longwave’s picture

Status: Needs review » Closed (duplicate)

Thanks for looking at this. Now the other lines are gone and only this issue remains, I am closing this as duplicate of #2719663: Fix 'Drupal.Commenting.InlineComment.InvalidEndChar' coding standard

When fixing coding standards issues we do them across the whole of Drupal at once and add configuration to ensure they remain fixed. File by file is too time consuming and prone to errors. Therefore this is better fixed across core in the linked issue.