Skip to content

Conversation

@zoilomora
Copy link
Member

Remove deprecated syntax and sniffs reported by PHP_CodeSniffer.

  • Replaced the deprecated comma-separated string syntax for the forbiddenFunctions property with the recommended <element> array format.
  • Removed usage of the deprecated SlevomatCodingStandard.TypeHints.UnionTypeHintFormat sniff and replaced it with SlevomatCodingStandard.TypeHints.DNFTypeHintFormat, as required by the latest Slevomat Coding Standard guidelines.

Output before the MR

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 "forbiddenFunctions"
for sniff "Generic.PHP.ForbiddenFunctions".
Pass array values via <element [key="..." ]value="..."> nodes instead.

WARNING: The Project rules standard uses 1 deprecated sniff
----------------------------------------------------------------------------------------------------------------------------------------------------
-  SlevomatCodingStandard.TypeHints.UnionTypeHintFormat
   This sniff has been deprecated since Slevomat Coding Standard 8.16.0 and will be removed in Slevomat Coding Standard 9.0.0. Use
   SlevomatCodingStandard.TypeHints.DNFTypeHintFormat instead.

Deprecated sniffs are still run, but will stop working at some point in the future.

@calmohallag calmohallag merged commit d78de04 into master Nov 20, 2025
@zoilomora zoilomora deleted the feature/change-of-definition branch November 20, 2025 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants