Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When running `composer drupal-rebuild`, the following error is returned:
Script Drupal\composer_manager\Composer\Command::rebuild handling the drupal-rebuild event terminated with an exception
[InvalidArgumentException]
Required prefix configuration is missing
Comment | File | Size | Author |
---|---|---|---|
#4 | 2473969-4.patch | 945 bytes | R.Muilwijk |
#3 | 2473969-3.patch | 749 bytes | joshtaylor |
Comments
Comment #1
bojanz CreditAttribution: bojanz commentedIntroduced in this core commit:
This command doesn't boot Drupal, but includes ExtensionDiscovery manually.
ExtensionDiscovery can't parse the yaml files anymore because the yaml parser now requires the file cache to be setup in DrupalKernel, which we don't run at all.
Comment #2
BerdirCall FileCacheFactory::setPrefix() with some value or set 'class' in the configuration to the null backend to skip it:
FileCacheFactory::setConfiguration(['default' => ['class' => '\Drupal\Component\FileCache\NullFileCache']]);
You could open an issue to make that the default, not sure...
Comment #3
joshtaylor CreditAttribution: joshtaylor commentedSomething like this?
Comment #4
R.Muilwijk CreditAttribution: R.Muilwijk commentedThe patch only runs on drupal-rebuild but should run on both drupal-update and drupal-rebuild.
Comment #5
jbrown CreditAttribution: jbrown commentedThe patch in #4 works for me for both drupal-update and drupal-rebuild.
Comment #6
BerdirLooks good to me as well, this is not something that's worth to cache, especially since it's in cli anyway.
Comment #8
bojanz CreditAttribution: bojanz commentedCommitted, thank you all. Gave the commit credit to Berdir since he's the one who gave us the magic incantation ;)
Comment #9
bojanz CreditAttribution: bojanz commentedComment #11
bojanz CreditAttribution: bojanz commentedThe core issue (#2395143: YAML parsing is very slow, cache it with FileCache) was reverted, so I had to revert this patch as well.
Waiting for the core issue to be recommitted.
Comment #12
BerdirAaaand it's in again :)
Comment #13
bojanz CreditAttribution: bojanz commentedThe nice thing about reverts is that I can give attribution to multiple people :)