Overview

On every PHPCS run, I get this message:

DEPRECATED: Passing an array of values to a property using a comma-separated string
was deprecated in PHP_CodeSniffer 3.3.0. Support will be removed in PHPCS 4.0.0.
The deprecated syntax was used for property "include"
for sniff "SlevomatCodingStandard.Namespaces.FullyQualifiedGlobalFunctions".
Pass array values via <element [key="..." ]value="..."> nodes instead.

Proposed resolution

Splitting the long list of PHP functions we want globally addressed (e.g. \array_map()) addresses the deprecations.
It will also make it easier to read future additions to the list

User interface changes

N/A

Issue fork canvas-3589567

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

tim.plunkett created an issue. See original summary.

wim leers’s picture

Component: … to be triaged » Project management
Priority: Normal » Minor
Issue tags: +DX (Developer Experience)

Yep, that's noise I've been wanting to eliminate for a while. Thanks for filing this issue!

tim.plunkett’s picture

Status: Active » Needs review
naveenapj’s picture

Assigned: Unassigned » naveenapj
naveenapj’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +DrupalSouth 2026

I have tested and validated this locally on PHP 8.4 and Drupal 11.

Testing Process:

On the 1.x branch, I successfully reproduced the hard error: ERROR: Passing an array of values to a property using a comma-separated string is no longer supported.

Applied MR !1094.

Confirmed the phpcs.xml file now uses the valid array syntax for the SlevomatCodingStandard.Namespaces.FullyQualifiedGlobalFunctions rule.

Ran phpcs again; the error is resolved, and the sniffs are parsed and executed correctly.

The code change is correct and follows the standard required by modern PHPCS versions. Setting to RTBC.

naveenapj’s picture

Assigned: naveenapj » Unassigned
naveenapj’s picture

Assigned: Unassigned » naveenapj
wim leers’s picture

Title: Fix deprecated PHPCS syntax » Fix deprecated PHPCS syntax in `phpcs.xml`
Assigned: naveenapj » Unassigned
Status: Reviewed & tested by the community » Fixed

Thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.