Bug #40653

Task #40095: Move core to namespaces

Namespace interfaces don't work for PHP version < 5.3.7 due to type hinting issues

Added by Nicole Cordes over 1 year ago. Updated about 1 year ago.

Status:Resolved Start date:2012-09-05
Priority:Must have Due date:
Assignee:- % Done:

100%

Category:- Spent time: -
Target version:-
TYPO3 Version:6.0 Complexity:
PHP Version: Is Regression:
Votes: 0

Description

Fatal errors are thrown when using an old interface with the new TYPO3 6.0 beta 1. This only happens with PHP versions below 5.3.7 and ends in something like that:

Fatal error: Declaration of tx_extdevevalDevLinks::__construct() must be compatible with that of
TYPO3\CMS\Backend\Toolbar\ToolbarItemHookInterface::__construct() in /.../typo3conf/ext/extdeveval/class.tx_extdeveval_additionalBackendItems.php
on line 34


Related issues

related to Advanced Frontend Editing - Bug #40773: Fatal error due to changes in SpriteHandler in TYPO3 6.0 New 2012-09-09
related to Core - Bug #40951: Rename autoloader class Closed 2012-09-16
related to Core - Bug #43451: Existing implementation of txCmsLayoutDrawItemHook fails ... Closed 2012-11-29

Associated revisions

Revision ceb6d707
Added by Nicole Cordes over 1 year ago

[BUGFIX] Fatal errors for interfaces with PHP version < 5.3.7

This bugfix rewrites function type hints to match the new ones as long as
PHP versions of OS Venders are not up to date.
Fatal errors are thrown when using an old interface with the new
TYPO3 6.0 beta 1. This only happens with PHP versions below 5.3.7 as
there are some type hinting issues.

Raise the Extbase submodule pointer at the same time to be in line
with the renaming of the Autoloader to ClassLoader.

Change-Id: I87da4bb2ef0420a94d1d155edde500c1aa96894a
Fixes: #40653
Related: #40095
Releases: 6.0
Reviewed-on: http://review.typo3.org/14376
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel

History

Updated by Gerrit Code Review over 1 year ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/14376

Updated by Thomas Maroschik over 1 year ago

  • Assignee set to Thomas Maroschik

I'm going to take care of this one.

Updated by Christian Kuhn over 1 year ago

  • Parent task set to #40095

Updated by Gerrit Code Review over 1 year ago

Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/14376

Updated by Gerrit Code Review over 1 year ago

Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/14376

Updated by Gerrit Code Review over 1 year ago

Patch set 4 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/14376

Updated by Gerrit Code Review over 1 year ago

Patch set 5 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/14376

Updated by Gerrit Code Review over 1 year ago

Patch set 6 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/14376

Updated by Nicole Cordes over 1 year ago

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

Updated by Ernesto Baschny over 1 year ago

  • Status changed from Resolved to Accepted
  • Target version changed from 6.0.0-beta2 to 6.0.1

Sorry, to re-open this issue, but this is not solved yet in 6.0.0. I am still getting the "Fatal error" as described in the description under Debian Squeeze after installing extdeveval from TER.

I will further investigate.

Updated by Ernesto Baschny over 1 year ago

  • Status changed from Accepted to Resolved
  • Target version deleted (6.0.1)

Indeed sadly there is nothing the core can do about it. A small fix needs to be included in the extension that has this problem, see solution for extdeveval here: #43444.

The solution is simple:

1) Make sure you register your toobarItem in a php file which does not include the class definition itself. The registration PHP file should only call the "$GLOBALS['TYPO3backend']->addToolbarItem" method.

2) Make sure the class you are declaring as an implementation of "backend_toolbarItem" can be properly auto-loaded by TYPO3.

If these two conditions are met, your toolbarItem will work without a problem in TYPO3 4.5 throughout 6.0.

So closed again.

Updated by Michael Stucki about 1 year ago

  • Assignee deleted (Thomas Maroschik)

I have reported the problem to Debian and hope they are going to backport the fix:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=702004

Also available in: Atom PDF