‪TYPO3CMS  ‪main
TYPO3\CMS\Core\Composer\PackageArtifactBuilder Class Reference
Inheritance diagram for TYPO3\CMS\Core\Composer\PackageArtifactBuilder:

Public Member Functions

 __construct ()
 run (Event $event)

Protected Member Functions

 isComposerDependency (string $packageName)

Private Member Functions

 setTitleFromExtEmConf (Package $package)
 sortPackagesAndConfiguration ()
 extractPackageMapFromComposer ()
 handleRootPackage (PackageInterface $rootPackage, string $extensionKey)
 publishResources (array $installedTypo3Packages)
 ensureJunctionExists (string $target, string $junction)
 ensureSymlinkExists (string $target, string $link)

Private Attributes

const LEGACY_EXTENSION_INSTALL_PATH = '/typo3conf/ext'
Event $event
Config $config
Filesystem $fileSystem
array $availableComposerPackageKeys = array( )

Detailed Description

The builder is a subclass of PackageManager as it shares much of its functionality. It evaluates the installed Composer packages for applicable TYPO3 extensions. All Composer packages will be discovered, that have an extra.typo3/cms definition in their composer.json. All ext_emconf.php files will be completely ignored in this context, which means all extensions are required to have a composer.json file, which works out naturally with a Composer setup.

This class is an implementation detail and does not represent public API

Definition at line 48 of file PackageArtifactBuilder.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Core\Composer\PackageArtifactBuilder::__construct ( )

Definition at line 69 of file PackageArtifactBuilder.php.

Member Function Documentation

◆ ensureJunctionExists()

TYPO3\CMS\Core\Composer\PackageArtifactBuilder::ensureJunctionExists ( string  $target,
string  $junction 

◆ ensureSymlinkExists()

TYPO3\CMS\Core\Composer\PackageArtifactBuilder::ensureSymlinkExists ( string  $target,
string  $link 

◆ extractPackageMapFromComposer()

TYPO3\CMS\Core\Composer\PackageArtifactBuilder::extractPackageMapFromComposer ( )

◆ handleRootPackage()

TYPO3\CMS\Core\Composer\PackageArtifactBuilder::handleRootPackage ( PackageInterface  $rootPackage,
string  $extensionKey 

TYPO3 can not handle public resources of extensions, that do not reside in typo3conf/ext Therefore, if the root package is of type typo3-cms-extension and has the folder Resources/Public, we fake the path of this extension to be in typo3conf/ext

For root packages of other types or extensions without public resources, no symlink is created and the package path stays to be the composer root path.

If extensions are installed into vendor folder, linking is skipped, because public resources are published anyway. Linking could be skipped altogether, but is kept to stay consistent: extensions in typo3conf/ext: root package is linked extensions in vendor: public resources of all packages are published

‪: remove this method in TYPO3 v12

Definition at line 238 of file PackageArtifactBuilder.php.

Referenced by TYPO3\CMS\Core\Composer\PackageArtifactBuilder\extractPackageMapFromComposer().

◆ isComposerDependency()

TYPO3\CMS\Core\Composer\PackageArtifactBuilder::isComposerDependency ( string  $packageName)

Definition at line 75 of file PackageArtifactBuilder.php.

◆ publishResources()

TYPO3\CMS\Core\Composer\PackageArtifactBuilder::publishResources ( array  $installedTypo3Packages)

◆ run()

TYPO3\CMS\Core\Composer\PackageArtifactBuilder::run ( Event  $event)

◆ setTitleFromExtEmConf()

TYPO3\CMS\Core\Composer\PackageArtifactBuilder::setTitleFromExtEmConf ( Package  $package)

Sets a title for the package from ext_emconf.php in case this file exists

‪deprecate or remove in TYPO3 v12

Definition at line 116 of file PackageArtifactBuilder.php.

References $EM_CONF, TYPO3\CMS\Core\Package\Package\getPackageKey(), TYPO3\CMS\Core\Package\Package\getPackageMetaData(), and TYPO3\CMS\Core\Package\Package\getPackagePath().

Referenced by TYPO3\CMS\Core\Composer\PackageArtifactBuilder\run().

◆ sortPackagesAndConfiguration()

TYPO3\CMS\Core\Composer\PackageArtifactBuilder::sortPackagesAndConfiguration ( )

Sorts all TYPO3 extension packages by dependency defined in composer.json file

Definition at line 132 of file PackageArtifactBuilder.php.

Referenced by TYPO3\CMS\Core\Composer\PackageArtifactBuilder\run().

Member Data Documentation

◆ $availableComposerPackageKeys

array TYPO3\CMS\Core\Composer\PackageArtifactBuilder::$availableComposerPackageKeys = array( )

Array of Composer package names (as array key) that are installed by Composer but have no relation to TYPO3 extension API

Definition at line 67 of file PackageArtifactBuilder.php.

◆ $config

Config TYPO3\CMS\Core\Composer\PackageArtifactBuilder::$config


Definition at line 58 of file PackageArtifactBuilder.php.

◆ $event

Event TYPO3\CMS\Core\Composer\PackageArtifactBuilder::$event


Definition at line 54 of file PackageArtifactBuilder.php.

Referenced by TYPO3\CMS\Core\Composer\PackageArtifactBuilder\run().

◆ $fileSystem

Filesystem TYPO3\CMS\Core\Composer\PackageArtifactBuilder::$fileSystem


Definition at line 62 of file PackageArtifactBuilder.php.


const TYPO3\CMS\Core\Composer\PackageArtifactBuilder::LEGACY_EXTENSION_INSTALL_PATH = '/typo3conf/ext'

Definition at line 50 of file PackageArtifactBuilder.php.