From 9e845145773d747b8b8c047e3114665ceb158bb5 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Mon, 28 Oct 2019 10:35:53 +0100 Subject: [PATCH] Add phpstan/phpstan to check PHP fatal/warning errors --- .gitattributes | 1 + composer.json | 3 ++- phpstan.neon | 11 +++++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 phpstan.neon diff --git a/.gitattributes b/.gitattributes index dfdf92e74b..b2eb745e3a 100755 --- a/.gitattributes +++ b/.gitattributes @@ -11,6 +11,7 @@ .php_cs export-ignore codesize.xml export-ignore phpcs.xml export-ignore +phpstan.neon export-ignore /tests export-ignore .editorconfig export-ignore diff --git a/composer.json b/composer.json index 7d3f019532..c230ff1df7 100755 --- a/composer.json +++ b/composer.json @@ -184,7 +184,8 @@ "behat/mink-extension": "@stable", "behat/mink-goutte-driver": "@stable", "behat/mink-selenium2-driver": "@stable", - "phpstan/phpstan": "^0.11.19" + "phpstan/phpstan": "^0.11.19", + "phpstan/phpstan-symfony": "^0.11.6" }, "scripts": { "auto-scripts": { diff --git a/phpstan.neon b/phpstan.neon new file mode 100644 index 0000000000..9c87948f47 --- /dev/null +++ b/phpstan.neon @@ -0,0 +1,11 @@ +parameters: + autoload_files: + - %rootDir%/../../../main/work/work.lib.php + excludes_analyse: + - %rootDir%/../../../tests/* + - %rootDir%/../../../main/webservices/* + - %rootDir%/../../../main/inc/lib/pear/* + - %rootDir%/../../../main/inc/lib/nusoap/* + - %rootDir%/../../../main/inc/lib/search/* + - %rootDir%/../../../src/CoreBundle/Migrations/Schema/* + level: max \ No newline at end of file