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 about 7 years ago. Updated about 6 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

Also available in: Atom PDF