Just saw that constructor in file /core/lib/Drupal/Component/Bridge/ZfExtensionManagerSfContainer.php has return statement. Constructor shouldn't have a return statement.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

gaurav.kapoor created an issue. See original summary.

gaurav.kapoor’s picture

Status: Active » Needs review
FileSize
633 bytes
dawehner’s picture

Priority: Normal » Minor
Status: Needs review » Reviewed & tested by the community

Fair point :)

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

The only other instance of a constructor returning a value in core is \Drupal\Core\Archiver\ArchiveTar::__construct() - and that's not really 100% Drupal code and it is ancient and the returns are unreachable so... let's ignore that.

We could consider adding a check to the coder project for this but consider that there is only 1 case in core that is probably unnecessary.

Committed and pushed 37500c9 to 8.4.x and 4652263 to 8.3.x. Thanks!

  • alexpott committed 37500c9 on 8.4.x
    Issue #2858081 by gaurav.kapoor: Constructor Shouldn't have a return...

  • alexpott committed 4652263 on 8.3.x
    Issue #2858081 by gaurav.kapoor: Constructor Shouldn't have a return...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

gaurav.kapoor’s picture

.

gaurav.kapoor’s picture

oops my bad.