Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

jrfnl
Copy link
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