Skip to content

Ruleset: remove support for the deprecated ruleset.xml array property string-based syntax#976

Merged
jrfnl merged 1 commit into4.xfrom
phpcs-4.0/feature/sq-1983-ruleset-remove-support-old-array-syntax
Apr 14, 2025
Merged

Ruleset: remove support for the deprecated ruleset.xml array property string-based syntax#976
jrfnl merged 1 commit into4.xfrom
phpcs-4.0/feature/sq-1983-ruleset-remove-support-old-array-syntax

Conversation

@jrfnl
Copy link
Copy Markdown
Member

@jrfnl jrfnl commented Apr 14, 2025

Description

The old syntax was deprecated in PHPCS 3.3.0, which also introduced support for using <element...> nodes as a replacement.

Includes splitting off the tests for the old-style, comma-delimited string manner of setting an array property to a separate test class with its own fixtures.

Refs:

Suggested changelog entry

  • Support for the deprecated ruleset.xml array property string-based syntax has been removed.
    • Previously, an array value could be set using a comma-delimited string print=>echo,create_function=>null
    • Now, individual array elements are specified using an element tag with key and value attributes
      • For example, <element key="print" value="echo">

Related issues/external references

Fixes squizlabs/PHP_CodeSniffer#1983

Related to #6

… string-based syntax

The old syntax was deprecated in PHPCS 3.3.0, which also introduced support for using `<element...>` nodes as a replacement.

Includes splitting off the tests for the old-style, comma-delimited string manner of setting an array property to a separate test class with its own fixtures.

Refs:
* squizlabs/PHP_CodeSniffer 1665

Fixes squizlabs/PHP_CodeSniffer 1983

Related to 6

Co-authored-by: jrfnl <jrfnl@users.noreply.github.com>
@jrfnl jrfnl merged commit 00df6ec into 4.x Apr 14, 2025
53 of 54 checks passed
@jrfnl jrfnl deleted the phpcs-4.0/feature/sq-1983-ruleset-remove-support-old-array-syntax branch April 14, 2025 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants