Use a better container cache key
4 unresolved threads
4 unresolved threads
Closes #3509069
Merge request reports
Activity
- Resolved by Björn Brala
839 840 * The cache key used for the service container. 840 841 */ 841 842 protected function getContainerCacheKey() { 842 $parts = ['service_container', $this->environment, \Drupal::VERSION, Settings::get('deployment_identifier'), PHP_OS, serialize(Settings::get('container_yamls'))]; 843 $parts = ['service_container', $this->environment, DrupalInstalled::getVersionsHash(), Settings::get('deployment_identifier'), PHP_OS, serialize(Settings::get('container_yamls'))]; changed this line in version 8 of the diff
- Resolved by Alex Pott
added 1 commit
- bd038abb - Move the pre autoload dump code to somewhere its runs for all Drupal projects
19 20 * The event. 20 21 */ 21 22 public static function preAutoloadDump(Event $event) { 22 // Get the configured vendor directory. 23 $vendor_dir = $event->getComposer()->getConfig()->get('vendor-dir'); - Comment on lines 21 to -23
So interestingly none of this was ever running for sites built from core recommended because this only works via the scripts in the root composer.json of the core repo. I think moving this code to scaffold will solve this - but scaffold does not run if you install Drupal from core git repo... so we need to link the two... fun.
192 $autoload['classmap'] = array_merge($autoload['classmap'], [ 193 $vendor_dir . '/symfony/http-kernel/HttpKernel.php', 194 $vendor_dir . '/symfony/http-kernel/HttpKernelInterface.php', 195 $vendor_dir . '/symfony/http-kernel/TerminableInterface.php', 196 ]); 197 } 198 if ($repository->findPackage('symfony/dependency-injection', $constraint)) { 199 $autoload['classmap'] = array_merge($autoload['classmap'], [ 200 $vendor_dir . '/symfony/dependency-injection/ContainerInterface.php', 201 ]); 202 } 203 if ($repository->findPackage('psr/container', $constraint)) { 204 $autoload['classmap'] = array_merge($autoload['classmap'], [ 205 $vendor_dir . '/psr/container/src/ContainerInterface.php', 206 ]); 207 } - Comment on lines +177 to +207
- Resolved by Alex Pott
added 104 commits
-
c3da7dfe...228328d2 - 103 commits from branch
project:11.x
- 93274450 - Use a better container cache key
-
c3da7dfe...228328d2 - 103 commits from branch
6 use Composer\Repository\InstalledRepositoryInterface; 7 8 /** 9 * Produces code for the DrupalInstalled file. 10 * 11 * @internal 12 */ 13 class DrupalInstalledTemplate { 14 15 /** 16 * Gets the code for the DrupalInstaller class. 17 * 18 * @return string 19 * The PHP code to write to the Drupal locations class. 20 */ 21 public static function getCode(PackageInterface $root_package, InstalledRepositoryInterface $repository): string {
Please register or sign in to reply