CoreCommunity ExtensionsDistributionsFeature-RequestsTYPO3 6.2 Projects (+)(Archived Projects)

Bug #43444

Compatibility with TYPO3 6.0 and PHP <5.3.7

Added by Ernesto Baschny over 2 years ago. Updated over 2 years ago.

Status:Resolved Start date:2012-11-29
Priority:Should have Due date:
Assigned To:Ernesto Baschny % Done:

100%

Category:- Spent time: -
Target version:3.3.3

Description

Due to #40653, extdeveval is not working anymore with TYPO3 6.0 in combination with PHP 5.3.3 (i.e. the one shipped with Debian Squeeze).

The reasons are two-fold:

In TYPO3 6.0 - due to namespace changes also on hook interface - the interface classes are rewritten by the autoloader in case of PHP <5.3.7 (because type hints won't work with class_alias in this case, see https://bugs.php.net/bug.php?id=54624).

Now extdeveval includes it's hook class by doing an "include_once" on the class file directly, which then crashes with the Fatal Error:

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

To resolve this, the class needs to be auto-loaded for proper handling to take place).

To do that:

1) remove duplicated registration of the toolbarItem in both ext_tables and ext_localconf

2) make sure we don't include the class upon registration (registerToolbarItem.php)

3) make the auto-load work - by renaming the class from tx_extdevevalDevLinks to tx_extdeveval_additionalBackendItems (because the auto-loader finds out the extension name to load it's ext_autoload.php by the class name component tx_*extdeveval*_...

Attached patch solves these issues, and the resulting extdeveval still works also on TYPO3 4.5 .. 4.7.

43444.diff Magnifier (2.4 kB) Ernesto Baschny, 2012-11-29 13:41

Associated revisions

Revision ff93dd34
Added by Ernesto Baschny over 2 years ago

[BUGFIX] Compatibility with TYPO3 6.x and PHP <5.3.7

Resolves: #43444
Change-Id: Iaffa4077bf1db1d5fa7f940916636124c9fa601e
Reviewed-on: https://review.typo3.org/19540
Reviewed-by: Ernesto Baschny
Tested-by: Ernesto Baschny

History

#1 Updated by Ernesto Baschny over 2 years ago

#2 Updated by Christian Kuhn over 2 years ago

  • Subject changed from Compatibility with TYPO3 6.0 and PHP <5.2.7 to Compatibility with TYPO3 6.0 and PHP <5.3.7

#3 Updated by Gerrit Code Review over 2 years ago

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

#4 Updated by Ernesto Baschny over 2 years ago

  • Status changed from Accepted to Resolved
  • % Done changed from 90 to 100

Also available in: Atom PDF