diff --git a/.php_cs.dist.php b/.php-cs-fixer.dist.php
similarity index 82%
rename from .php_cs.dist.php
rename to .php-cs-fixer.dist.php
index bf15b5876..d0e5acebc 100644
--- a/.php_cs.dist.php
+++ b/.php-cs-fixer.dist.php
@@ -9,13 +9,24 @@ declare(strict_types=1);
* the LICENSE file that was distributed with this source code.
*/
-$config = require __DIR__ . '/tests/app/vendor/drupol/php-conventions/config/php73/php_cs_fixer.config.php';
+$finder = PhpCsFixer\Finder::create();
-$config
- ->getFinder()
- ->ignoreDotFiles(false)
+$finder
+ ->in(__DIR__.'/src')
+ ->append([__FILE__])
+ ->exclude(['docs/', 'tests/app'])
->notPath('tests/app')
- ->name(['.php_cs.dist.php']);
+ ->ignoreDotFiles(true)
+ ->name('**.php')
+ ;
+
+$config = new PhpCsFixer\Config();
+$config
+ ->setFinder($finder)
+ ->setRiskyAllowed(true)
+ ->setCacheFile('.php_cs.cache')
+ ->setUsingCache(true)
+;
$rules = $config->getRules();
@@ -68,9 +79,15 @@ $riskyRules = [
// 'psr_autoloading' => false,
];
+$untilFullSwitchToPhp8 = [
+ 'blank_line_between_import_groups' => false,
+ 'declare_strict_types' => true,
+];
+
$rules = array_merge(
$rules,
- $riskyRules
+ $riskyRules,
+ $untilFullSwitchToPhp8,
);
$rules['header_comment']['header'] = trim(file_get_contents(__DIR__ . '/resource/header.txt'));
diff --git a/composer.json b/composer.json
index c672c1dc0..d85a590c6 100644
--- a/composer.json
+++ b/composer.json
@@ -64,18 +64,21 @@
},
"require-dev": {
"doctrine/doctrine-fixtures-bundle": "^3.3",
- "drupol/php-conventions": "^5",
"fakerphp/faker": "^1.13",
"nelmio/alice": "^3.8",
"phpspec/prophecy-phpunit": "^2.0",
+ "phpstan/phpstan": "^1.9",
"phpstan/phpstan-strict-rules": "^1.0",
"phpunit/phpunit": ">= 7.5",
+ "psalm/plugin-phpunit": "^0.18.4",
+ "psalm/plugin-symfony": "^4.0.2",
"symfony/debug-bundle": "^5.1",
"symfony/dotenv": "^4.4",
"symfony/maker-bundle": "^1.20",
"symfony/phpunit-bridge": "^4.4",
"symfony/stopwatch": "^4.4",
- "symfony/var-dumper": "^4.4"
+ "symfony/var-dumper": "^4.4",
+ "vimeo/psalm": "^4.30.0"
},
"conflict": {
"symfony/symfony": "*"
diff --git a/grumphp.yml b/grumphp.yml
deleted file mode 100644
index c81830d5b..000000000
--- a/grumphp.yml
+++ /dev/null
@@ -1,40 +0,0 @@
-imports:
- - {
- resource: tests/app/vendor/drupol/php-conventions/config/php73/grumphp.yml,
- }
-
-parameters:
- tasks.phpcsfixer.config: .php_cs.dist.php
- tasks.license.name: AGPL-3.0
- tasks.license.holder: Champs-Libres
- tasks.license.date_from: 2001
-
- tasks.phpcsfixer.allow_risky: true
- tasks.phpcsfixer.diff: true
- tasks.phpstan.level: 1
- tasks.phpstan.blocking: true
- tasks.phpstan.ignore_patterns:
- - "/.github/"
- - "/.idea/"
- - "/build/"
- - "/benchmarks/"
- - "/docs/"
- - "/node_modules/"
- - "/resource/"
- - "/spec/"
- - "/var/"
- - "/vendor/"
- - "/tests/app"
-
- # Psalm
- tasks.psalm.blocking: true
- tasks.psalm.ignore_patterns:
- - "/.github/"
- - "/.idea/"
- - "/build/"
- - "/benchmarks/"
- - "/node_modules/"
- - "/resource/"
- - "/spec/"
- - "/var/"
- - "/vendor/"
diff --git a/psalm.xml b/psalm.xml
index 40e5d78e8..77193f05b 100644
--- a/psalm.xml
+++ b/psalm.xml
@@ -9,9 +9,10 @@
cacheDirectory="./.psalm"
>
-
+
-
+
+
@@ -20,9 +21,27 @@
-
+
+
+
+
+
+
+
diff --git a/tests/app b/tests/app
index 8694ad7c4..3cb4c26fe 160000
--- a/tests/app
+++ b/tests/app
@@ -1 +1 @@
-Subproject commit 8694ad7c4de306f9d5e35af966d24fb2e3e1c2ff
+Subproject commit 3cb4c26fe774229b4c566cffd2d5f79bf6ca848b