phpcs-php-compatibility.xml 1.6 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <ruleset
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4. xsi:noNamespaceSchemaLocation="../vendor/squizlabs/php_codesniffer/phpcs.xsd"
  5. >
  6. <arg name="basepath" value="../../"/>
  7. <arg name="cache" value="cache.json"/>
  8. <arg name="colors"/>
  9. <arg name="extensions" value="php"/>
  10. <arg value="n"/><!-- Only errors, without warnings -->
  11. <arg value="s"/><!-- Display sniffs' names -->
  12. <rule ref="PHPCompatibility">
  13. <!-- Attributes are interpreted as a comments on PHP <8.0, so they don't break the code (when they're single line) -->
  14. <exclude name="PHPCompatibility.Attributes.NewAttributes.Found"/>
  15. <!-- We use named arguments in few places when using Attributes, let's decide if we want to continue doing so -->
  16. <exclude name="PHPCompatibility.FunctionUse.NewNamedParameters.Found"/>
  17. <!-- We explicitly check in codebase if new constants are defined -->
  18. <exclude name="PHPCompatibility.Constants.NewConstants"/>
  19. <!-- We use Sf 8.1 polyfill (but no polyfill ruleset available yet)-->
  20. <exclude name="PHPCompatibility.FunctionUse.NewFunctions.array_is_listFound"/>
  21. <!-- we use it to test code using high PHP version -->
  22. <exclude name="PHPCompatibility.Numbers.RemovedHexadecimalNumericStrings.Found"/>
  23. <exclude-pattern>tests/Fixtures/**/*</exclude-pattern>
  24. </rule>
  25. <rule ref="PHPCompatibilitySymfonyPolyfillPHP80"/>
  26. <config name="testVersion" value="7.4-8.3"/>
  27. <file>../../src/</file>
  28. <file>../../tests/</file>
  29. <file>../../php-cs-fixer</file>
  30. </ruleset>