Problem/Motivation

See #2927746-62: Update Symfony components to 3.4.*

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

larowlan created an issue. See original summary.

larowlan’s picture

gapple’s picture

Composer 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...

mondrake’s picture

Title: Bring the Symfony\Component\ClassLoader\ApcClassLoader into core and undeprecate » [PP-1] Bring the Symfony\Component\ClassLoader\ApcClassLoader into core and undeprecate
Status: Active » Postponed
Related issues: +#2938369: The Symfony\Component\ClassLoader\WinCacheClassLoader class is deprecated

Need 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.

mondrake’s picture

Title: [PP-1] Bring the Symfony\Component\ClassLoader\ApcClassLoader into core and undeprecate » Bring the Symfony\Component\ClassLoader\ApcClassLoader into core and undeprecate
Status: Postponed » Active
gapple’s picture

Two 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.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

gapple’s picture

Status: Active » Needs review
andypost’s picture

Classloader has been removed in sf4 and d9 needs workaround to remove it at all or better replace it with related issue

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

bradjones1’s picture

Status: Needs review » Closed (duplicate)