Bug #56409

Interface incompatibility - PackageManager

Added by Tymoteusz Motylewski over 1 year ago. Updated over 1 year ago.

Status:Resolved Start date:2014-02-28
Priority:Should have Due date:
Assigned To:- % Done:

100%

Category:-
Target version:-
PHP Version: Complexity:
Has patch:No Affected Flow version:Git master

Description

PackageManagerInterface contains following method declaration:
public function initialize(\TYPO3\Flow\Core\Bootstrap $bootstrap);

however in the PackageManager (which implements \TYPO3\Flow\Package\PackageManagerInterface)
it is implemented like this:
public function initialize(\TYPO3\Flow\Core\Bootstrap $bootstrap, $packagesBasePath = FLOW_PATH_PACKAGES, $packageStatesPathAndFilename = '') {

this is wrong and will fatal on some versions of php, see http://php.net/manual/en/language.oop5.interfaces.php
"The class implementing the interface must use the exact same method signatures as are defined in the interface. Not doing so will result in a fatal error."

It also fatals when running unit tests on hhvm (of CMS)


Related issues

related to TYPO3.Flow - Bug #54549: PackageManager::createPackage is incompatible to PackageM... New 2013-12-21
related to Core - Bug #56660: Interface incompatibility - PackageManager initialize() -... Resolved 2014-03-07

Associated revisions

Revision bff16094
Added by Alexander Berl over 1 year ago

[BUGFIX] PackageManager initialize() signature is incompatible

PackageManagerInterface contains following method declaration::

public function initialize(\TYPO3\Flow\Core\Bootstrap $bootstrap);

however in the PackageManager the signature is::

public function initialize(\TYPO3\Flow\Core\Bootstrap $bootstrap,
$packagesBasePath = FLOW_PATH_PACKAGES,
$packageStatesPathAndFilename = '')

This will create a fatal error on some versions of php and when running
unit tests on hhvm (of CMS), see
http://php.net/manual/en/language.oop5.interfaces.php:

"The class implementing the interface must use the exact same method
signatures as are defined in the interface. Not doing so will result
in a fatal error."

This change updates the method signature of the PackageManager to be in
line with the interface.

Change-Id: I94cf40fb788861f2e4c9e656bea57a0ff2354113
Fixes: #56409
Releases: master, 2.1

Revision 6c4fbd6d
Added by Alexander Berl over 1 year ago

[BUGFIX] PackageManager initialize() signature is incompatible

PackageManagerInterface contains following method declaration::

public function initialize(\TYPO3\Flow\Core\Bootstrap $bootstrap);

however in the PackageManager the signature is::

public function initialize(\TYPO3\Flow\Core\Bootstrap $bootstrap,
$packagesBasePath = FLOW_PATH_PACKAGES,
$packageStatesPathAndFilename = '')

This will create a fatal error on some versions of php and when running
unit tests on hhvm (of CMS), see
http://php.net/manual/en/language.oop5.interfaces.php:

"The class implementing the interface must use the exact same method
signatures as are defined in the interface. Not doing so will result
in a fatal error."

This change updates the method signature of the PackageManager to be in
line with the interface.

Change-Id: I94cf40fb788861f2e4c9e656bea57a0ff2354113
Fixes: #56409
Releases: master, 2.1

History

#1 Updated by Gerrit Code Review over 1 year ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.Flow has been pushed to the review server.
It is available at https://review.typo3.org/27948

#2 Updated by Gerrit Code Review over 1 year ago

Patch set 2 for branch master of project Packages/TYPO3.Flow has been pushed to the review server.
It is available at https://review.typo3.org/27948

#3 Updated by Gerrit Code Review over 1 year ago

Patch set 1 for branch 2.1 of project Packages/TYPO3.Flow has been pushed to the review server.
It is available at https://review.typo3.org/28100

#4 Updated by Alexander Berl over 1 year ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF