- container_xml_path -> containerXmlPath (phpstan-symfony v2 rename); the old key made phpstan abort with an invalid-configuration error, so analysis silently never ran - add the missing tests/doctrine_object_manager.php loader - drop a stale ignoreErrors pattern phpstan now runs and surfaces 42 pre-existing level-5 errors (tracked separately).
17 lines
479 B
PHP
17 lines
479 B
PHP
<?php
|
|
|
|
// Loader used by phpstan-doctrine to resolve entity metadata for static analysis.
|
|
// Boots the Symfony kernel and returns the default EntityManager.
|
|
|
|
use App\Kernel;
|
|
use Symfony\Component\Dotenv\Dotenv;
|
|
|
|
require __DIR__ . '/../vendor/autoload.php';
|
|
|
|
(new Dotenv())->bootEnv(__DIR__ . '/../.env');
|
|
|
|
$kernel = new Kernel($_SERVER['APP_ENV'] ?? 'dev', (bool) ($_SERVER['APP_DEBUG'] ?? true));
|
|
$kernel->boot();
|
|
|
|
return $kernel->getContainer()->get('doctrine')->getManager();
|