RobLoach / component-installer

Install Web Components through Composer
https://asset-packagist.org/
Other
280 stars 35 forks source link

Does not work with Composer 1.0.0-alpha11 #94

Open davidvanlaatum opened 8 years ago

davidvanlaatum commented 8 years ago

1.0.0-alpha10 listed and I assume this has been removed in 11: Break: The following event classes are deprecated and you should update your script handlers to use the new ones in type hints: Composer\Script\CommandEvent is deprecated, use Composer\Script\Event Composer\Script\PackageEvent is deprecated, use Composer\Installer\PackageEvent

craigh commented 8 years ago

when you say "Does not work" could you be more specific?

The zikula project is also having some issues with component-installer but I cannot tell if the problems are the same as this. One odd thing for us is that it appears to work for me locally (MacOS) but not at our CI build server.

RobLoach commented 8 years ago

What error do you receive? Or are they just deprecated notices?

craigh commented 8 years ago

I am not receiving any errors at all. We are simply just not getting our assets installed as we did a few days ago. see https://github.com/zikula/core/issues/2649

craigh commented 8 years ago

the output of our CI build can be seen here where there does not seem to be any errors related to the component-installer or asset installation.

craigh commented 8 years ago

I just upgraded the composer version on our server before that build, so it is using the most recent build of composer.

craigh commented 8 years ago

here is the output of a build that worked correctly.

comparing these two output files, I see that

ComponentInstaller\Installer::postAutoloadDump

is not run in the second. it appears twice in the working build:

Writing lock file Generating autoload files ComponentInstaller\Installer::postAutoloadDump Compiling component files

zikula > prepare:

[echo] Prepare...

Loading composer repositories with package information Installing dependencies from lock file Nothing to install or update Generating autoload files ComponentInstaller\Installer::postAutoloadDump Compiling component files

zikula > build:

craigh commented 8 years ago

I think this might be the problem: https://github.com/composer/composer/commit/c0b49d09f300dde5f88a4bea19a9d32806de6886

craigh commented 8 years ago

so I was able to reproduce the problem we are having at our ci server by doing the following locally:

> composer install  --prefer-dist --no-dev --no-scripts --ignore-platform-reqs
...
> php src/app/console assets:install src/web

copying this and this

so apparently, my problem is the second (Symfony's assets:install command) is not running the component-installer scripts.

craigh commented 8 years ago

now, I am not sure about my previous statement. In the working builds, the Generating autoload files triggers this: > ComponentInstaller\Installer::postAutoloadDump Compiling component files

but in the builds that do not, it is not triggered.

craigh commented 8 years ago

Is it possible that component-installer did not respect the --no-scripts command previously and that this was changed a couple days ago? or composer itself changed that behavior?

craigh commented 8 years ago

refs https://github.com/composer/composer/issues/4630

craigh commented 8 years ago

@davidvanlaatum - sorry to have taken over your ticket. :8ball:

I think my issue was due to https://github.com/composer/composer/issues/4626

davidvanlaatum commented 8 years ago

Component folder is empty after install with alpha11

zorfling commented 8 years ago

composer/composer#4627 seems to have fixed it for me. Working as before on Composer version 1.0-dev (fbab2bfa173e1bf3667051b99bf544cccad1ad9d) 2015-11-23 15:12:33

davidvanlaatum commented 8 years ago

yes it does appear to have fixed for me to