Service Updating for Drupal 10

Created on 31 July 2023, over 1 year ago
Updated 2 August 2023, over 1 year ago

Problem/Motivation

With Drupal 10 and PHP8.2, am getting the following error when setting my sources in settings.local and clearing the cache
PHP Fatal error: Uncaught TypeError: Drupal\Core\Asset\JsCollectionOptimizer::__construct(): Argument #3 ($dumper) must be of type Drupal\Core\Asset\AssetDumperInterface, Drupal\Core\Theme\ThemeManager given, called in /var/www/html/cms/web/core/lib/Drupal/Component/DependencyInjection/Container.php on line 259 and defined in /var/www/html/cms/web/core/lib/Drupal/Core/Asset/JsCollectionOptimizer.php:69

Steps to reproduce

- Add schemes to settings.local and set them $settings['flysystem'] = $schemes.
- Clear the cache.
- See error produced.

Proposed resolution

Update use of Drupal\Core\Asset\CssCollectionOptimizer and Drupal\Core\Asset\JsCollectionOptimizer to Drupal\Core\Asset\CssCollectionOptimizerLazy and Drupal\Core\Asset\JsCollectionOptimizerLazy respectively.

πŸ› Bug report
Status

Closed: duplicate

Version

2.1

Component

Code

Created by

πŸ‡³πŸ‡ΏNew Zealand GeorgeBC

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024