Closed grizmio closed 4 years ago
/cc @lyrixx
I already replied there : https://github.com/symfony/recipes/commit/60d0656cf54e23957a4a99800a8e7f703bde49ed
Thanks for taking time to answer me and I see it working. I think you are right about versions, at work we are using symfony 4.3, plus probably I'm doing something wrong. Inside a Dockerfile, we use composer.json and composer.lock in a new clean directory and run composer install to see a nice error. I know, we should start using 4.4 at least, but that would be a little "complicated". To try our use case you could do: mkdir foo ; cd foo ; copy composer_files_here; composer install The files: https://transfer.sh/%28/7bIIb/composer.json,/4t9uS/composer.lock%29.tar.gz
If you know a better way or "the right way" of doing it, I will really appreciate it. Thanks again.
@grizmio I'm not able to reproduce, because when I install vendor from, as the projet is empty, it can not work:
>/tmp/postinstall composer install --ignore-platform-reqs
The "ocramius/package-versions" plugin was skipped because it requires a Plugin API version ("^1.0.0") that does not match your Composer installation ("2.0.0"). You may need to run composer update with the "--no-plugins" option.
The "symfony/flex" plugin was skipped because it requires a Plugin API version ("^1.0") that does not match your Composer installation ("2.0.0"). You may need to run composer update with the "--no-plugins" option.
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Nothing to install, update or remove
Package guzzlehttp/ringphp is abandoned, you should avoid using it. No replacement was suggested.
Package guzzlehttp/streams is abandoned, you should avoid using it. No replacement was suggested.
Package zendframework/zend-code is abandoned, you should avoid using it. Use laminas/laminas-code instead.
Package zendframework/zend-eventmanager is abandoned, you should avoid using it. Use laminas/laminas-eventmanager instead.
Generating autoload files
> symfony-cmd
sh: 1: symfony-cmd: not found
Script symfony-cmd handling the auto-scripts event returned with error code 127
Script @auto-scripts was called via post-install-cmd
Can you create a reproducer instead? Thanks
@lyrixx the error you got in your case is because symfony/flex was skipped due to conflicting with Composer 2. you might need to try it with Composer 1
@stof Thanks. I managed to reproduce the issue:
I found the culprit:
Signature of FileLoader::glob()
The change from "false" => "true" (ie ignore error) comes from this commit https://github.com/symfony/symfony/commit/a67abe1fb62bf5643e26192972af8417525d3896#diff-ad1ed76aba6a80df5a48dfa4585adcf3L164 :
Merge branch '3.4' into 4.4
But the real changes comes from https://github.com/symfony/symfony/commit/2f65a7a2556b09cbee7e7afb64b4bb432eaa5a7e and so https://github.com/symfony/symfony/pull/35772
So the current behavior is to ignore error (3.4, 4.4, 5.x) but since 4.3 is EOL, the commit did not reach this branch. Too bad to me :). More over, 4.2 is also affected
I don't know what can I do. Some options :
DependencyInjection
, and Entity ;services.yaml
. IMHO, it should not happen that much ;So, My preferred solutions, sorted by preference : 4️⃣, 3️⃣, 2️⃣, 1️⃣
WDYT?
4️⃣ looks good to me
having the same issue, I was running symfony new --version=6.0-1 --book guestbook --debug
(currently reading the book since I'm new), within a laragon instance (Cmder terminal, PHP 8.1.9 NTS)
I get this error:
Generating optimized autoload files
84 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
Run composer recipes at any time to see the status of your Symfony recipes.
Executing script cache:clear [KO]
[KO]
Script cache:clear returned with error code 255
!!
Script @auto-scripts was called via post-install-cmd
unable to run ~/AppData/Local/ComposerSetup/bin/composer.phar install
I'm installing symfony with "composer install" from composer.json and composer.lock, but with an array if a directory is missing it thows an error at cache:clear in post install
Script @auto-scripts was called via post-install-cmd If a rollback this change it works like before, if i change the sequence to: App\: resource: '../src/' exclude:
The commit is: https://github.com/symfony/recipes/commit/60d0656cf54e23957a4a99800a8e7f703bde49ed#diff-6b7648a9438bee9cf5db0ea78acbc00f If you need my composer.json and composer.lock, please let me know and i will upload them.