Bug #40653
closed
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 about 12 years ago.
Updated about 6 years ago.
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
- Status changed from New to Under Review
- Assignee set to Thomas Maroschik
I'm going to take care of this one.
- Parent task set to #40095
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
- 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.
- 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.
- Assignee deleted (
Thomas Maroschik)
- Status changed from Resolved to Closed
Also available in: Atom
PDF