Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
base system
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 Oct 2015 at 17:02 UTC
Updated:
3 Dec 2015 at 17:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
cilefen commentedComment #3
tibezh commentedI remove composer.lock file and it works.
Comment #4
timmillwoodGetting the same issue here.
composer updateworks fine, butcomposer installfails.Maybe we need to simply update the dependencies shipped with Drupal 8.
Comment #5
webflo commentedThe installation works fine without
"pre-autoload-dump": "Drupal\\Core\\Composer\\Composer::preAutoloadDump".Comment #6
timmillwoodok, so it looks like the merge plugin is calling
pre-autoload-dumptoo early, or the merge plugin is run too late, becausesymfony/http-foundationis added from drupal/core via the merge plugin, but it's needed or thepre-autoload-dumpscript.Comment #7
webflo commentedHere is a working patch until we figure it out upstream.
Comment #8
webflo commentedI looked at composers documentation again and think #7 is the right fix.
From the docs:
pre-autoload-dump: occurs before the autoloader is dumped, either during install/update, or via the dump-autoload command., https://getcomposer.org/doc/articles/scripts.md#installer-eventsComment #9
mile23It's not an upstream problem. :-)
We can do it without
file_exists().This is behavior we only want for the
drupal/corepackage, so we check if that's the package before proceeding. (Leaving aside the issue of managing classmaps for another package...)We really should do this for all our script additions.
Same steps to for manual testing:
rm -rf vendorrm composer.lockcomposer installComment #10
mile23Spoke too soon. The classmap didn't make it to
vendor/composer/autoload_classmap.php.Comment #11
mile23Here's a version where we query the local repository before adding to the classmap.
Note that we can safely remove the
scriptssection fromcore/composer.jsonsince the merge process discards it, but I didn't change it in this patch.See #9 for how to manually test.
It's a lot easier to verify the classmap file if you say
composer install --no-dev:-)Comment #12
mile23Comment #13
mile23Comment #14
joshtaylor commentedWorks for me.
Comment #15
joshtaylor commentedWrong file, woops :)
Comment #16
mile23Would you say it's RTBC? :-)
Comment #17
timmillwoodComment #18
alexpottDiscussed with @catch and we agree that this is an RC target. However, the issue summary is confusing because it is incorrect.
composer update does not bring in newer dependencies if you delete the composer.lock file. It brings in exactly the same dependencies. Also if I remove both composer.lock and vendor composer update does not work.
Comment #19
alexpottI've manually tested the patch with both
composer updateandcomposer installand it works great.Committed 3a7de9f and pushed to 8.0.x. Thanks!