Skip to content

Commit

Permalink
Add phpstan extension utility scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
juliusstoerrle committed Sep 7, 2024
1 parent 76c5147 commit 54992ed
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
14 changes: 14 additions & 0 deletions webservice/tests/console-application.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/**
* This file is used by phpstan/phpstan-symfony extionsion for Symfony console command validation.
*/

use App\Kernel;
use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Component\Dotenv\Dotenv;

require __DIR__ . '/../vendor/autoload.php';

(new Dotenv())->bootEnv(__DIR__ . '/../.env');

$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
return new Application($kernel);
14 changes: 14 additions & 0 deletions webservice/tests/object-manager.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/**
* This file is used by phpstan/phpstan-doctrine extionsion for DQL validation.
*/

use App\Kernel;
use Symfony\Component\Dotenv\Dotenv;

require __DIR__ . '/../vendor/autoload.php';

(new Dotenv())->bootEnv(__DIR__ . '/../.env');

$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
$kernel->boot();
return $kernel->getContainer()->get('doctrine')->getManager();

0 comments on commit 54992ed

Please sign in to comment.