diff --git a/composer.json b/composer.json
index f2116f1525b238613a1d228d496dd58d0ee28e56..0ee7df6eea21ef32c0fb03f639991746e80dbfb2 100644
--- a/composer.json
+++ b/composer.json
@@ -36,6 +36,7 @@
         "friendsofphp/php-cs-fixer": "^3.0",
         "phpstan/phpstan": "^1.0.0",
         "phpstan/phpstan-phpunit": "^1.0.0",
+        "phpstan/phpstan-symfony": "^1.2",
         "phpunit/phpunit": "^9",
         "symfony/browser-kit": "^5.3",
         "symfony/http-client": "^5.3",
diff --git a/composer.lock b/composer.lock
index 29a4053532e4f513933d525af9529ebc21ae49d3..82a791ef0ae08ea3065ee078d9b1f6f630f56bfd 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "6a18edebaa03d4b26c19260f5cde4650",
+    "content-hash": "97bcb46b7361fb19ff417e2ab98dbeb9",
     "packages": [
         {
             "name": "api-platform/core",
@@ -7704,6 +7704,77 @@
             },
             "time": "2022-04-20T15:24:25+00:00"
         },
+        {
+            "name": "phpstan/phpstan-symfony",
+            "version": "1.2.9",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/phpstan/phpstan-symfony.git",
+                "reference": "f4cb3b8915d3656e780f305f01c86b70ff933272"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/phpstan/phpstan-symfony/zipball/f4cb3b8915d3656e780f305f01c86b70ff933272",
+                "reference": "f4cb3b8915d3656e780f305f01c86b70ff933272",
+                "shasum": ""
+            },
+            "require": {
+                "ext-simplexml": "*",
+                "php": "^7.2 || ^8.0",
+                "phpstan/phpstan": "^1.8.2"
+            },
+            "conflict": {
+                "symfony/framework-bundle": "<3.0"
+            },
+            "require-dev": {
+                "nikic/php-parser": "^4.13.0",
+                "php-parallel-lint/php-parallel-lint": "^1.2",
+                "phpstan/phpstan-phpunit": "^1.0",
+                "phpstan/phpstan-strict-rules": "^1.0",
+                "phpunit/phpunit": "^9.5",
+                "psr/container": "1.0 || 1.1.1",
+                "symfony/config": "^4.2 || ^5.0",
+                "symfony/console": "^4.0 || ^5.0",
+                "symfony/dependency-injection": "^4.0 || ^5.0",
+                "symfony/form": "^4.0 || ^5.0",
+                "symfony/framework-bundle": "^4.4 || ^5.0",
+                "symfony/http-foundation": "^5.1",
+                "symfony/messenger": "^4.2 || ^5.0",
+                "symfony/polyfill-php80": "^1.24",
+                "symfony/serializer": "^4.0 || ^5.0"
+            },
+            "type": "phpstan-extension",
+            "extra": {
+                "phpstan": {
+                    "includes": [
+                        "extension.neon",
+                        "rules.neon"
+                    ]
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "PHPStan\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Lukáš Unger",
+                    "email": "looky.msc@gmail.com",
+                    "homepage": "https://lookyman.net"
+                }
+            ],
+            "description": "Symfony Framework extensions and rules for PHPStan",
+            "support": {
+                "issues": "https://github.com/phpstan/phpstan-symfony/issues",
+                "source": "https://github.com/phpstan/phpstan-symfony/tree/1.2.9"
+            },
+            "time": "2022-08-05T20:13:38+00:00"
+        },
         {
             "name": "phpunit/php-code-coverage",
             "version": "9.2.15",
diff --git a/phpstan.neon b/phpstan.neon
index 14ed4fc63090e30f9fc853f5017e8e9ded2a7785..a24758d3a0c62c030f60686f666aef69764c13c9 100644
--- a/phpstan.neon
+++ b/phpstan.neon
@@ -1,5 +1,6 @@
 includes:
     - vendor/phpstan/phpstan-phpunit/extension.neon
+    - vendor/phpstan/phpstan-symfony/extension.neon
 
 parameters:
     inferPrivatePropertyTypeFromConstructor: true
@@ -7,9 +8,3 @@ parameters:
     paths:
         - src
         - tests
-    excludePaths:
-        - tests/bootstrap.php
-        - src/Swagger/DocumentationNormalizer.php
-    ignoreErrors:
-        - message: '#.*NodeDefinition::children.*#'
-          path: ./src/DependencyInjection
diff --git a/tests/bootstrap.php b/tests/bootstrap.php
index cc712a19ad9b3e163ccc7e5d4ca02cba247445ae..672f9abe66f047755ed092e240f0cfb9d3845481 100644
--- a/tests/bootstrap.php
+++ b/tests/bootstrap.php
@@ -2,12 +2,8 @@
 
 declare(strict_types=1);
 
-use Symfony\Component\Dotenv\Dotenv;
-
 require dirname(__DIR__).'/vendor/autoload.php';
 
 if (file_exists(dirname(__DIR__).'/config/bootstrap.php')) {
     require dirname(__DIR__).'/config/bootstrap.php';
-} elseif (method_exists(Dotenv::class, 'bootEnv')) {
-    (new Dotenv())->bootEnv(dirname(__DIR__).'/.env');
 }