Bug #53620

Move Classes/TYPO3/Flow/Composer to own Package

Added by Rafael Kähm over 6 years ago. Updated about 6 years ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Package
Target version:
-
Start date:
2013-11-13
Due date:
% Done:

0%

PHP Version:
Has patch:
No
Complexity:

Description

By installing TYPO3 Flow or neos you get warnings on each dependency package "Class TYPO3\Flow\Composer\InstallerScripts is not autoloadable, can not call post-package-install script".

Composer tries to call a script for "post-package-install"-event before TYPO3.Flow is installed and prints warnings (see https://github.com/composer/composer/blob/2b36106168e89fa185dfa604a1666fd1b188384e/src/Composer/EventDispatcher/EventDispatcher.php#L128-L131 ).

InstallerScripts must be available earlier.

Possible solution:
1 moving Classes/TYPO3/Flow/Composer to TYPO3.InstallerScripts
2 in "Classes/TYPO3/InstallerScripts/Package" postPackageUpdateAndInstall() and check if TYPO3.Flow package is available first and then proceed ...
3 add "TYPO3.InstallerScripts" to dependencies at second place(after "php": ">=5.3.2",) in Packages/Framework/TYPO3.Flow/composer.json

History

#1 Updated by Rafael Kähm over 6 years ago

I can not find review or issue for adding postPackageUpdateAndInstall() and runPackageScripts() methods in Classes/TYPO3/Flow/Composer/InstallerScripts.php, can somebody show where it is?

#2 Updated by Bastian Waidelich about 6 years ago

Apparently this is a composer issue. The message can be ignored, see http://forum.typo3.org/index.php/t/200300/

#3 Updated by Rafael Kähm about 6 years ago

Bastian Waidelich wrote:

Apparently this is a composer issue. The message can be ignored, see http://forum.typo3.org/index.php/t/200300/

This happens, because in composer.json from Flow-base-distribution is "post-package-install" - script is defined before this script is availible.

....
    "scripts": {
        ...,
        "post-package-install":"TYPO3\\Flow\\Composer\\InstallerScripts::postPackageUpdateAndInstall" 
    }

This behavior by installing Flow/Neos is deceptive for newcomer.

Also available in: Atom PDF