Skip to content

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

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

jrfnl merged 1 commit into
4.xfrom
phpcs-4.0/feature/sq-1983-ruleset-remove-support-old-array-syntax

Conversation

@jrfnl

@jrfnl jrfnl commented Apr 14, 2025 •

Copy link
Copy Markdown
Member

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 <[email protected]>
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