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.
By alexpott on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
9.0.x
Introduced in version:
9.0.0
Issue links:
Description:
Symfony 4 does not include a class loader that implements a wrapping autoloader cached in WinCache. Therefore, Drupal 9 no longer ships with support.
We strongly recommend that if you require a class loader that uses a shared cache you install the APCu extension. It is available on Windows PHP builds.
If a WinCache class loader is required it is possible to use composer to bring back the class loader. To do this you need to:
- Use composer to install the Symfony 3 class loader package:
composer require symfony/class-loader
- Add the following code snippet to settings.php
if ($settings['hash_salt']) { $win_loader = new \Symfony\Component\ClassLoader\WinCacheClassLoader('drupal.' . $settings['hash_salt'], $class_loader); $class_loader->unregister(); $win_loader->register(); $class_loader = $win_loader; }
Impacts:
Module developers
Distribution developers