Bug #56409

Interface incompatibility - PackageManager

Added by Tymoteusz Motylewski almost 6 years ago. Updated almost 6 years ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2014-02-28
Due date:
% Done:

100%

PHP Version:
Has patch:
No
Complexity:

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 PackageManagerInterface New 2013-12-21
Related to TYPO3 Core - Bug #56660: Interface incompatibility - PackageManager initialize() - backport from Flow Closed 2014-03-07

Associated revisions

Revision bff16094 (diff)
Added by Alexander Berl almost 6 years 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 (diff)
Added by Alexander Berl almost 6 years 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 almost 6 years 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 almost 6 years 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 almost 6 years 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 almost 6 years ago

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

Also available in: Atom PDF