Skip to content

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Apr 14, 2025

Description

Fixes squizlabs/PHP_CodeSniffer#2823

Related to #186

Suggested changelog entry

Removed:

  • Removed error property of sniff Generic.Strings.UnnecessaryStringConcat
    • This sniff now always produces errors
    • To make this sniff produce warnings, include the following in a ruleset.xml or [.]phpcs.xml[.dist] file:
      <rule ref="Generic.Strings.UnnecessaryStringConcat">
          <type>warning</type>
      </rule>
  • Removed error property of sniff Generic.Formatting.MultipleStatementAlignment.
    • This sniff now always produces warnings
    • The Generic.Formatting.MultipleStatementAlignment.IncorrectWarning error code has been removed.
      • Refer to the Generic.Formatting.MultipleStatementAlignment.Incorrect error code instead.
    • The Generic.Formatting.MultipleStatementAlignment.NotSameWarning error code has been removed.
      • Refer to the Generic.Formatting.MultipleStatementAlignment.NotSame error code instead.
    • To make this sniff produce errors, include the following in a ruleset.xml or [.]phpcs.xml[.dist] file:
      <rule ref="Generic.Formatting.MultipleStatementAlignment">
          <type>error</type>
      </rule>

Fixes squizlabs/PHP_CodeSniffer 2823

Related to 186

Co-authored-by: jrfnl <[email protected]>
@jrfnl jrfnl added this to the 4.0.0 milestone Apr 14, 2025
@jrfnl jrfnl merged commit 97c10e9 into 4.x Apr 15, 2025
54 checks passed
@jrfnl jrfnl deleted the phpcs-4.0/feature/sq-2823-remove-some-public-error-properties branch April 15, 2025 08:46
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.

2 participants