Fatal error: Cannot declare class PHPCSStandards\Composer\Plugin\Installers\PHPCodeSniffer\Plugin when upgrading from coder 8.3.16 to 8.3.17

Created on 22 February 2023, over 1 year ago

Problem/Motivation

When upgrading the drupal/coder from 8.3.16 to 8.3.17 with composer the process fails and the following error is generated

PHP Fatal error: Cannot declare class PHPCSStandards\Composer\Plugin\Installers\PHPCodeSniffer\Plugin, because the name is already in use in /var/www/html/drupal-czr/vendor/dealerdirect/phpcodesniffer-composer-installer/src/Plugin.php on line 35

after that upgrades of other modules also fail.

The installation has to be rolled back and then the other module can be upgraded (e.g. bootstrap released today) as long as coder is kept at 8.3.16.

Steps to reproduce

drupal/core 9.5.3
drupal/coder 8.3.16

composer require "drupal/coder:8.3.17"

Proposed resolution

Find and fix the namespace clash for class PHPCSStandards\Composer\Plugin\Installers\PHPCodeSniffer\Plugin.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

8.3

Component

Coder Sniffer

Created by

🇨🇦Canada nebesoft

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

Comments & Activities

Production build 0.71.5 2024