diff --git a/.gitignore b/.gitignore
index a45c104..a2050f5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -43,6 +43,13 @@
/.php_cs.cache
+# ------------------------------------------------------------------------------
+### PHP_CodeSniffer
+# ------------------------------------------------------------------------------
+/.phpcs-cache
+/phpcs.xml
+
+
# -----------------------------------------------------------------------------
### Build files
# -----------------------------------------------------------------------------
@@ -117,6 +124,7 @@ Temporary Items
# ------------------------------------------------------------------------------
# Windows thumbnail cache files
Thumbs.db
+Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db
diff --git a/composer.json b/composer.json
index 776b25d..90a54b8 100644
--- a/composer.json
+++ b/composer.json
@@ -27,7 +27,7 @@
"phpstan/phpstan": "^0.11.1",
"phpunit/phpunit": "^8.0",
"sebastian/phpcpd": "^4.1",
- "squizlabs/php_codesniffer": " ^2.9",
+ "squizlabs/php_codesniffer": "^3.4",
"vimeo/psalm": "^3.0"
},
"autoload": {
diff --git a/docs/Development.md b/docs/Development.md
index 211e9f4..19c6632 100644
--- a/docs/Development.md
+++ b/docs/Development.md
@@ -105,13 +105,6 @@ docker-compose exec php phing -f phing/tests.xml test:phpunit
docker-compose run --rm phpunit --verbose --no-coverage
```
-# Versions of packages
-
-### squizlabs/php_codesniffer
-
-I have to use [squizlabs/php_codesniffer](https://packagist.org/packages/squizlabs/php_codesniffer) `^2.9` instead of
-`^3.3`, because [Phing doesn't support 3.x PHP_CodeSniffer](https://github.com/phingofficial/phing/issues/716).
-
# Mutation Tests
Served by [Infection — Mutation Testing Framework](https://infection.github.io).
diff --git a/phing/properties.dist b/phing/properties.dist
index 941410c..c287955 100644
--- a/phing/properties.dist
+++ b/phing/properties.dist
@@ -47,6 +47,7 @@ dir.tests = ${project.basedir}/tests
dir.build = ${project.basedir}/build
dir.reports = ${dir.build}/reports
dir.reports.coverage = ${dir.reports}/phpunit-coverage
+dir.reports.code_sniffer = ${dir.reports}/code_sniffer
# Data directories
#
@@ -72,6 +73,10 @@ check.php_coveralls.command = ./vendor/bin/php-coveralls --ansi -v
#
tests.cs_fixer.command = ./vendor/bin/php-cs-fixer fix --verbose
+# Path of the PHP_CodeSniffer (https://github.com/squizlabs/PHP_CodeSniffer)
+#
+tests.code_sniffer.command = ./vendor/bin/phpcs --report-full=${dir.reports.code_sniffer}/full.txt --report-summary=${dir.reports.code_sniffer}/summary.txt --report-checkstyle=${dir.reports.code_sniffer}/checkstyle.xml
+
# Test database path
#
tests.database = ${dir.data.temporary}/database.sqlite
diff --git a/phing/tests.xml b/phing/tests.xml
index 1edeb2c..631b3e1 100644
--- a/phing/tests.xml
+++ b/phing/tests.xml
@@ -55,14 +55,9 @@
test:infection"
/>
-
+
-
-
-
-
-
-
+
@@ -112,6 +107,7 @@
+
diff --git a/phpcs.xml.dist b/phpcs.xml.dist
new file mode 100644
index 0000000..2930822
--- /dev/null
+++ b/phpcs.xml.dist
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+ src/
+ tests/
+
+