PHP Fatal error in CorsUiCompilerPass on Drupal 11

Created on 24 November 2024, 5 months ago

Problem/Motivation

When installing on Drupal 11, the following error is thrown:

PHP Fatal error:  Declaration of Drupal\cors_ui\CorsUiCompilerPass::process(Symfony\Component\DependencyInjection\ContainerBuilder $container) must be compatible with Drupal\Core\DependencyInjection\Compiler\CorsCompilerPass::process(Symfony\Component\DependencyInjection\ContainerBuilder $container): void in /[path-to-root]/web/modules/contrib/cors_ui/src/CorsUiCompilerPass.php on line 18

After the initial error occurs, I get the same error when running some, but not all, drush commands.

Steps to reproduce

1. Fresh install a Drupal 11 environment
2. Attempt to install cors_ui
3. Get error

Proposed resolution

Add return type :void to the process method in CorsUiCompilerPass.

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇨🇦Canada nickdjm

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024