Bug #64376
Class aliases not respected in certain situations
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
Associated revisions
[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 <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Benjamin Mack <benni@typo3.org>
Tested-by: Benjamin Mack <benni@typo3.org>
[!!!][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 <helmut.hummel@typo3.org>
Tested-by: Helmut Hummel <helmut.hummel@typo3.org>
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
Applied in changeset b2a9aeecd393a6a6f3fdb772bde8fff6e9f53582.
#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
Applied in changeset 0dc52349a9f0970a17a75c582d4905dbb830b560.