Project

General

Profile

Actions

Bug #82542

closed

Classloader information is not generating optimized class map for psr-4 when it is called the first time

Added by Andreas Allacher over 6 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
System/Bootstrap/Configuration
Target version:
-
Start date:
2017-09-22
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Currently the classloading information is not generating an optimized class map for psr-4 entries, if it is called the first time.
To reproduce the easiest way was with typo3_console (bit when doing some stuff manually it should be possible without):
  1. Have an Extension in typo3conf/ext that is NOT installed
  2. That install does need to have a composer.json with a "psr-4" autoload information and the corresponding directory needs to exist.
  3. Either call "typo3cms install:generatepackagestates" to install all existing extensions in typo3conf/ext or manually add the extension to PackageStates.php (do not use Extension Manager because that one doesn't guarantee the dumpautoload only happens once)
  4. Dump autoload information using CLI.
    Either: typo3cms extension:dumpautoload
    or: typo3/cli_dispatch.phpsh extbase extension:dumpclassloadinginformation

Now the autoload_psr4.php is produced correctly.
However, autoload_classmap.php does not contain the classes of the previously NOT installed extension.
That only happens on a second call of "typo3cms extension:dumpautoload" or "typo3/cli_dispatch.phpsh extbase extension:dumpclassloadinginformation"

However, due to classloading performance the optimized map should always be generated even for PSR-4 entries, see:
https://getcomposer.org/doc/articles/autoloader-optimization.md

Actions #1

Updated by Andreas Allacher over 6 years ago

The issue also exists with 7.x.

Actions #2

Updated by Gerrit Code Review over 6 years ago

  • Status changed from New to Under Review

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

Actions #3

Updated by Gerrit Code Review over 6 years ago

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

Actions #4

Updated by Gerrit Code Review over 6 years ago

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

Actions #5

Updated by Gerrit Code Review over 6 years ago

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

Actions #6

Updated by Gerrit Code Review over 6 years ago

Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54224

Actions #7

Updated by Helmut Hummel over 6 years ago

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

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF