Bug #56409
Interface incompatibility - PackageManager
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
Associated revisions
[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
[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
Applied in changeset bff1609471a84b50e0358f1d3ce0d25d7322f155.