Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion Classes/Core/Testbase.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
use Psr\Container\ContainerInterface;
use TYPO3\CMS\Core\Core\Bootstrap;
use TYPO3\CMS\Core\Core\ClassLoadingInformation;
use TYPO3\CMS\Core\Core\Environment;
use TYPO3\CMS\Core\Database\Connection;
use TYPO3\CMS\Core\Database\ConnectionPool;
use TYPO3\CMS\Core\Database\Schema\SchemaManager\CoreSchemaManagerFactory;
Expand Down Expand Up @@ -762,10 +763,26 @@ public function setUpBasicTypo3Bootstrap(string $instancePath): ContainerInterfa
}

/**
* Dump class loading information
* Dump class loading information.
*
* This is only relevant for non Composer mode ("classic mode") setups, where the
* Composer class loader does not know about extensions: the generated files add
* the class map, the PSR-4 prefixes and the class alias map of all active
* extensions - including their `Tests/` directories - to the class loader.
*
* Functional test instances are classic mode instances by definition, so they do
* need the dump. Unit tests on the other hand run in the scope of the outer
* Composer installation, where the Composer class loader is authoritative and
* `PackageManager::scanAvailablePackages()` bails out early: the dump would only
* write empty files - into the project root ("<project>/packages/autoload-tests/"
* since TYPO3 v14.3.1). Skip it, mirroring the `Environment::isComposerMode()`
* guards TYPO3 Core uses on all of its own call sites.
*/
public function dumpClassLoadingInformation(): void
{
if (Environment::isComposerMode()) {
return;
}
if (!ClassLoadingInformation::isClassLoadingInformationAvailable()) {
ClassLoadingInformation::dumpClassLoadingInformation();
ClassLoadingInformation::registerClassLoadingInformation();
Expand Down