Issue Bug Closed

#84617Generating package states stopped working as expected after updates in symfony/finder component

Faton Haliti 04/04/18, 16:05 updated 04/04/18, 17:48

Description

After updates in symfony/finder component https://github.com/symfony/finder/commit/c72995d9f5999b3fcdd8660c0c9690243252e1e1 running now “php vendor/bin/typo3cms install:generatepackagestates” is having trouble installing packages because of the real path.

The wrong path now is showin only for sysext and not for custom extension (e.g. ext:news).

How to replicate:
  1. Have one custom extension which also depends in “core” extension.
  2. Delete all extension in PackageStates.php
  3. Try to run in cli “php vendor/bin/typo3cms install:generatepackagestates”

Result:
[ UnexpectedValueException ]
The package “some extension” depends on “core” which is not present in the system.
Note: The reason for this error is the wrong path now because of symfony finder component

Expected result:

The following extensions have been added to the generated PackageStates.php file: core, extbase, fluid, ….

Suggestion:

A solution can be modifying PackageManager.php->registerPackagesFromConfiguration(…)

$sysExtension = strpos($stateConfiguration['packagePath'], 'sysext');
 if ($sysExtension !== false) {
      $packagePath = PathUtility::sanitizeTrailingSeparator($stateConfiguration['packagePath']);
  } else {
       $packagePath = PathUtility::sanitizeTrailingSeparator($this->packagesBasePath . $stateConfiguration['packagePath']);
 }

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.