Bug #64376

Class aliases not respected in certain situations

Added by Helmut Hummel 7 months ago. Updated 6 months ago.

Status:Resolved Start date:2015-01-20
Priority:Must have Due date:
Assigned To:- % Done:

100%

Category:- Spent time: -
Target version:-
TYPO3 Version:6.2 Is Regression:No
PHP Version: Sprint Focus:
Complexity:

Description

#64361 introduces a regression if aliased class names are used in typehints or instanceof comparisons
and the original class is already loaded (through the composer class loader)

To benefit from the performance and features, the composer class loader now must explicitly be enabled by setting the environment variable TYPO3_COMPOSER_AUTOLOAD to 1


Related issues

related to Core - Task #64361: Improve class loading performance Resolved 2015-01-19
related to Core - Bug #64916: Avoid serialization of some members of ContentObjectRenderer Resolved 2015-02-06
duplicated by Core - Bug #64669: Fix class alias functionality that was broken with compos... Closed 2015-01-30

Associated revisions

Revision b2a9aeec
Added by Helmut Hummel 6 months ago

[BUGFIX] Add only required classes and class aliases

The static class and alias map now only contains a class map
and an alias map for required extensions.

This means that the traditional class loader will kick in for other
activated extensions.

Optionally it is possible to provide additional class and alias maps
in a distribution composer.json, this will however only work
if the TYPO3_COMPOSER_AUTOLOAD environment variable is set.

The latter is a precaution to not break backwards compatibility.

Releases: master, 6.2
Resolves: #64376
Change-Id: I4fd2202abad345c29bcb2b05d3702bdeef9e4474
Reviewed-on: http://review.typo3.org/36460
Reviewed-by: Christian Kuhn <>
Tested-by: Christian Kuhn <>
Reviewed-by: Anja Leichsenring <>
Tested-by: Anja Leichsenring <>
Reviewed-by: Benjamin Mack <>
Tested-by: Benjamin Mack <>

Revision 0dc52349
Added by Helmut Hummel 6 months ago

[!!!][BUGFIX] Add only required classes and class aliases

Additionally we enable the composer class loading by default
if the according autoload.php file is found in Packages/Libraries/

To be able to detect the compatibility extension being installed
which brings class aliases for classes spread over other system extensions,
we need to add functionality that puts the class aliases to typo3conf/
when an extension is activated or deactivated.

This deviates from the approach in 6.2 branch and most likely will vanish
again later once we require composer installation

If the class alias file is present, the aliases will be added to the composer
class loader during TYPO3 bootstrap.

Releases: master, 6.2
Resolves: #64376
Change-Id: I4fd2202abad345c29bcb2b05d3702bdeef9e4474
Reviewed-on: http://review.typo3.org/36644
Reviewed-by: Helmut Hummel <>
Tested-by: Helmut Hummel <>

History

#1 Updated by Gerrit Code Review 7 months ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/36134

#2 Updated by Gerrit Code Review 7 months ago

Patch set 2 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/36134

#3 Updated by Gerrit Code Review 7 months ago

Patch set 3 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/36134

#4 Updated by Gerrit Code Review 6 months ago

Patch set 3 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/36460

#5 Updated by Gerrit Code Review 6 months ago

Patch set 4 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/36460

#6 Updated by Gerrit Code Review 6 months ago

Patch set 5 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/36460

#7 Updated by Helmut Hummel 6 months ago

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

#8 Updated by Gerrit Code Review 6 months 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 http://review.typo3.org/36644

#9 Updated by Gerrit Code Review 6 months ago

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

#10 Updated by Gerrit Code Review 6 months ago

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

#11 Updated by Helmut Hummel 6 months ago

  • Status changed from Under Review to Resolved

Also available in: Atom PDF