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.
Problem/Motivation
See #2927746-62: Update Symfony components to 3.4.*
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#6 | drupal-2937534-6-only-composer-apcu.patch | 7.1 KB | gapple |
#6 | drupal-2937534-6-prefer-composer-apcu.patch | 954 bytes | gapple |
Comments
Comment #2
larowlanComment #3
gappleComposer introduced its own APCu integration in 1.3.0. Would it make sense to defer to this when available and not already enabled?
Alternately, if the same decoration pattern is used, I think the Composer handling may need to be disabled to prevent double-caching.
https://getcomposer.org/doc/articles/autoloader-optimization.md#optimiza...
https://github.com/composer/composer/commit/6d4e60b9914e5514c49f4b19ee2b...
Comment #4
mondrakeNeed to deal also with
Symfony\Component\ClassLoader\WinCacheClassLoader
, which deprecation still needs to be added to the silenced deprecations list in #2938369: The Symfony\Component\ClassLoader\WinCacheClassLoader class is deprecated.Comment #5
mondrakeRelated #2938369: The Symfony\Component\ClassLoader\WinCacheClassLoader class is deprecated is fixed, back to active.
Comment #6
gappleTwo patches:
a) Use Composer's built in APCu caching if available, but fall back to Symfony decorators; overrides the prefix used by composer since it doesn't accommodate all the items that Drupal's prefix includes. Use of
symfony/class-loader
could be removed later when updating to Symfony 4.b) Remove use of Symfony decorators and only use Composer's caching. Keeps settings option to be able to disable APCu caching, and class loader can still be decorated within settings.php.
symfony/class-loader
isn't removed as a dependency from composer.json because an existing site could rely on it without declaring it as a dependency (either because it's using the zip archive of core, or doesn't include it in the site's composer.json), and the example code in default.settings.php uses\Symfony\Component\ClassLoader\ApcClassLoader
.The only references in core to either wincache or xcache that I could see were in DrupalKernel and rebuild.php. A wincache / xcache contrib module could provide both a service (e.g.
cache.backend.wincache
) and the necessary settings snippet to make use of the cache for classloader lookups.Comment #8
gappleComment #9
andypostClassloader has been removed in sf4 and d9 needs workaround to remove it at all or better replace it with related issue
Comment #12
bradjones1I believe this is a duplicate of #2704571: Add an APCu classloader with a single entry