File tree Expand file tree Collapse file tree 1 file changed +5
-17
lines changed
src/Support/PHPUnit/EventSubscribers Expand file tree Collapse file tree 1 file changed +5
-17
lines changed Original file line number Diff line number Diff line change 22
33namespace RonasIT \AutoDoc \Support \PHPUnit \EventSubscribers ;
44
5- use Illuminate \Contracts \Console \Kernel ;
6- use PHPUnit \Event \Application \Finished ;
7- use PHPUnit \Event \Application \FinishedSubscriber ;
8- use RonasIT \AutoDoc \Services \SwaggerService ;
5+ use PHPUnit \Event \TestRunner \ExecutionFinished ;
6+ use PHPUnit \Event \TestRunner \ExecutionFinishedSubscriber ;
97
10- final class SwaggerSaveDocumentationSubscriber implements FinishedSubscriber
8+ final class SwaggerSaveDocumentationSubscriber implements ExecutionFinishedSubscriber
119{
12- public function notify (Finished $ event ): void
10+ public function notify (ExecutionFinished $ event ): void
1311 {
14- $ this ->createApplication ();
15-
16- app (SwaggerService::class)->saveProductionData ();
17- }
18-
19- protected function createApplication (): void
20- {
21- $ app = require base_path ('bootstrap/app.php ' );
22-
23- $ app ->loadEnvironmentFrom ('.env.testing ' );
24- $ app ->make (Kernel::class)->bootstrap ();
12+ shell_exec ('php artisan swagger:push-documentation ' );
2513 }
2614}
You can’t perform that action at this time.
0 commit comments