File tree 1 file changed +5
-17
lines changed
src/Support/PHPUnit/EventSubscribers 1 file changed +5
-17
lines changed Original file line number Diff line number Diff line change 2
2
3
3
namespace RonasIT \AutoDoc \Support \PHPUnit \EventSubscribers ;
4
4
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 ;
9
7
10
- final class SwaggerSaveDocumentationSubscriber implements FinishedSubscriber
8
+ final class SwaggerSaveDocumentationSubscriber implements ExecutionFinishedSubscriber
11
9
{
12
- public function notify (Finished $ event ): void
10
+ public function notify (ExecutionFinished $ event ): void
13
11
{
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 ' );
25
13
}
26
14
}
You can’t perform that action at this time.
0 commit comments