Bug #56660

Interface incompatibility - PackageManager initialize() - backport from Flow

Added by Tymoteusz Motylewski almost 6 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2014-03-07
Due date:
% Done:

100%

TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
no-brainer
Is Regression:
No
Sprint Focus:

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."

The issue was aready solved in Flow, see
http://forge.typo3.org/issues/56409

So we just need to backport the patch.


Related issues

Related to TYPO3.Flow - Bug #56409: Interface incompatibility - PackageManager Resolved 2014-02-28

Associated revisions

Revision 61a9d4bc (diff)
Added by Wouter Wolters 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.

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

Revision bab84b55 (diff)
Added by Steffen Ritter almost 6 years ago

[BUGFIX] FollowUp to #56660

Fixes the unit-test according to the changes in review
https://review.typo3.org/#/c/28195/.

Since the BasePath (and therefore vfs://...) cannot be
handover anymore on initialize() it has to be injected
via _set().

Releases: 6.2
Resolves: #56660
Change-Id: I88d03f0305ff08810d6fea82c5c891b1a7a99771
Reviewed-on: https://review.typo3.org/28270
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter

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.CMS has been pushed to the review server.
It is available at https://review.typo3.org/28195

#2 Updated by Gerrit Code Review almost 6 years ago

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

#3 Updated by Gerrit Code Review almost 6 years ago

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

#4 Updated by Gerrit Code Review almost 6 years ago

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

#5 Updated by Gerrit Code Review almost 6 years ago

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

#6 Updated by Gerrit Code Review almost 6 years ago

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

#7 Updated by Wouter Wolters almost 6 years ago

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

#8 Updated by Gerrit Code Review almost 6 years ago

  • Status changed from Resolved to Under Review

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

#9 Updated by Steffen Ritter almost 6 years ago

  • Status changed from Under Review to Resolved

#10 Updated by Benni Mack about 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF