-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add phpstan extension utility scripts
- Loading branch information
1 parent
76c5147
commit 54992ed
Showing
2 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); |