Skip to content

Commit a7fa4cf

Browse files
committed
Ruleset file: add schema tags to the ruleset
As of PHPCS 3.2.0, PHPCS offers an XSD schema for rulesets which defines what can be used in the XML ruleset file. As of a couple of weeks ago, the XSD schema is now available via permalinks. This commit adds the relevant schema tags to the PHPCS Ruleset file(s). Refs: * squizlabs/PHP_CodeSniffer 1433 * https://github.com/squizlabs/PHP_CodeSniffer/releases/tag/3.2.0 * PHPCSStandards/PHP_CodeSniffer 1094 * https://github.com/PHPCSStandards/schema.phpcodesniffer.com
1 parent 6fb1504 commit a7fa4cf

File tree

9 files changed

+18
-9
lines changed

9 files changed

+18
-9
lines changed

PHPCompatibilitySymfonyPolyfillPHP54/ruleset.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0"?>
2-
<ruleset name="PHPCompatibilitySymfonyPolyfillPHP54">
2+
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="PHPCompatibilitySymfonyPolyfillPHP54" xsi:noNamespaceSchemaLocation="https://schema.phpcodesniffer.com/phpcs.xsd">
3+
34
<description>PHPCompatibility ruleset for PHP_CodeSniffer which accounts for polyfills provided by the Symfony PHP 5.4 library.</description>
45

56
<rule ref="PHPCompatibility">

PHPCompatibilitySymfonyPolyfillPHP55/ruleset.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0"?>
2-
<ruleset name="PHPCompatibilitySymfonyPolyfillPHP55">
2+
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="PHPCompatibilitySymfonyPolyfillPHP55" xsi:noNamespaceSchemaLocation="https://schema.phpcodesniffer.com/phpcs.xsd">
3+
34
<description>PHPCompatibility ruleset for PHP_CodeSniffer which accounts for polyfills provided by the Symfony PHP 5.5 library.</description>
45

56
<!-- https://github.com/symfony/polyfill-php55/blob/main/composer.json -->

PHPCompatibilitySymfonyPolyfillPHP56/ruleset.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0"?>
2-
<ruleset name="PHPCompatibilitySymfonyPolyfillPHP56">
2+
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="PHPCompatibilitySymfonyPolyfillPHP56" xsi:noNamespaceSchemaLocation="https://schema.phpcodesniffer.com/phpcs.xsd">
3+
34
<description>PHPCompatibility ruleset for PHP_CodeSniffer which accounts for polyfills provided by the Symfony PHP 5.6 libary.</description>
45

56
<rule ref="PHPCompatibility">

PHPCompatibilitySymfonyPolyfillPHP70/ruleset.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0"?>
2-
<ruleset name="PHPCompatibilitySymfonyPolyfillPHP70">
2+
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="PHPCompatibilitySymfonyPolyfillPHP70" xsi:noNamespaceSchemaLocation="https://schema.phpcodesniffer.com/phpcs.xsd">
3+
34
<description>PHPCompatibility ruleset for PHP_CodeSniffer which accounts for polyfills provided by the Symfony PHP 7.0 library.</description>
45

56
<!-- https://github.com/symfony/polyfill-php70/blob/main/composer.json -->

PHPCompatibilitySymfonyPolyfillPHP71/ruleset.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0"?>
2-
<ruleset name="PHPCompatibilitySymfonyPolyfillPHP71">
2+
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="PHPCompatibilitySymfonyPolyfillPHP71" xsi:noNamespaceSchemaLocation="https://schema.phpcodesniffer.com/phpcs.xsd">
3+
34
<description>PHPCompatibility ruleset for PHP_CodeSniffer which accounts for polyfills provided by the Symfony PHP 7.1 library.</description>
45

56
<rule ref="PHPCompatibility">

PHPCompatibilitySymfonyPolyfillPHP72/ruleset.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0"?>
2-
<ruleset name="PHPCompatibilitySymfonyPolyfillPHP72">
2+
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="PHPCompatibilitySymfonyPolyfillPHP72" xsi:noNamespaceSchemaLocation="https://schema.phpcodesniffer.com/phpcs.xsd">
3+
34
<description>PHPCompatibility ruleset for PHP_CodeSniffer which accounts for polyfills provided by the Symfony PHP 7.2 library.</description>
45

56
<rule ref="PHPCompatibility">

PHPCompatibilitySymfonyPolyfillPHP73/ruleset.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0"?>
2-
<ruleset name="PHPCompatibilitySymfonyPolyfillPHP73">
2+
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="PHPCompatibilitySymfonyPolyfillPHP73" xsi:noNamespaceSchemaLocation="https://schema.phpcodesniffer.com/phpcs.xsd">
3+
34
<description>PHPCompatibility ruleset for PHP_CodeSniffer which accounts for polyfills provided by the Symfony PHP 7.3 library.</description>
45

56
<rule ref="PHPCompatibility">

PHPCompatibilitySymfonyPolyfillPHP74/ruleset.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0"?>
2-
<ruleset name="PHPCompatibilitySymfonyPolyfillPHP74">
2+
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="PHPCompatibilitySymfonyPolyfillPHP74" xsi:noNamespaceSchemaLocation="https://schema.phpcodesniffer.com/phpcs.xsd">
3+
34
<description>PHPCompatibility ruleset for PHP_CodeSniffer which accounts for polyfills provided by the Symfony PHP 7.4 library.</description>
45

56
<rule ref="PHPCompatibility">

PHPCompatibilitySymfonyPolyfillPHP80/ruleset.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0"?>
2-
<ruleset name="PHPCompatibilitySymfonyPolyfillPHP80">
2+
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="PHPCompatibilitySymfonyPolyfillPHP80" xsi:noNamespaceSchemaLocation="https://schema.phpcodesniffer.com/phpcs.xsd">
3+
34
<description>PHPCompatibility ruleset for PHP_CodeSniffer which accounts for polyfills provided by the Symfony PHP 8.0 library.</description>
45

56
<rule ref="PHPCompatibility">

0 commit comments

Comments
 (0)