[BUGFIX] PackageManager initialize() signature is incompatible 95/28195/7
authorWouter Wolters <typo3@wouterwolters.nl>
Sun, 9 Mar 2014 15:22:23 +0000 (16:22 +0100)
committerMarkus Klein <klein.t3@mfc-linz.at>
Tue, 11 Mar 2014 18:12:21 +0000 (19:12 +0100)
commit61a9d4bc330ccd70a2e3f64b328ab0215d52d4ab
tree053a8407e498d458fd219cb74f7478c5b68ff593
parent0d1cef2e24a69637e9963e396309f66c03d1f5ea
[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.

Resolves: #56660
Related: #56409
Releases: 6.2
Change-Id: Iab7ae0d6d9809abe7cb6f9b73adb77f06d2f0820
Reviewed-on: https://review.typo3.org/28195
Reviewed-by: Thomas Maroschik
Reviewed-by: Sebastian Müller
Reviewed-by: Sebastian Fischer
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
Reviewed-by: Markus Klein
Tested-by: Markus Klein
typo3/sysext/core/Classes/Core/Bootstrap.php
typo3/sysext/core/Classes/Package/PackageManager.php
typo3/sysext/core/Resources/PHP/TYPO3.Flow/Classes/TYPO3/Flow/Package/PackageManager.php
typo3/sysext/core/Resources/PHP/TYPO3.Flow/Classes/TYPO3/Flow/Package/PackageManagerInterface.php
typo3/sysext/core/Resources/PHP/TYPO3.Flow/README