Skip to content

Commit e20ddce

Browse files
committed
register Scramble ServiceProvider, update composer.json, and simplify deployment script
1 parent 5a6f2ea commit e20ddce

3 files changed

Lines changed: 17 additions & 11 deletions

File tree

app/Providers/AppServiceProvider.php

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,14 @@
44

55
namespace App\Providers;
66

7+
use App\Common\Contracts\GitHubRetrieverInterface;
8+
use App\Common\GitHubRetriever;
79
use App\Domains\PullRequests\Commands\Contracts\CreatePullRequestCommandInterface;
810
use App\Domains\PullRequests\Commands\CreatePullRequestCommand;
11+
use App\Domains\PullRequests\Mappers\Contracts\GitHubIssueResponseToIssueDataMapperInterface;
12+
use App\Domains\PullRequests\Mappers\Contracts\GitHubPullRequestResponseToPullRequestDataMapperInterface;
13+
use App\Domains\PullRequests\Mappers\GitHubIssueResponseToIssueDataMapper;
14+
use App\Domains\PullRequests\Mappers\GitHubPullRequestResponseToPullRequestDataMapper;
915
use App\Domains\PullRequests\Retrievers\Contracts\IssueRetrieverInterface;
1016
use App\Domains\PullRequests\Retrievers\Contracts\PullRequestRetrieverInterface;
1117
use App\Domains\PullRequests\Retrievers\IssueRetriever;
@@ -14,17 +20,11 @@
1420
use App\Domains\Repositories\Mappers\PullRequestToResponseMapper;
1521
use App\Models\Repository;
1622
use App\Policies\RepositoryPolicy;
17-
use Gate;
18-
use Override;
19-
use App\Common\Contracts\GitHubRetrieverInterface;
20-
use App\Common\GitHubRetriever;
21-
use App\Domains\PullRequests\Mappers\Contracts\GitHubIssueResponseToIssueDataMapperInterface;
22-
use App\Domains\PullRequests\Mappers\Contracts\GitHubPullRequestResponseToPullRequestDataMapperInterface;
23-
use App\Domains\PullRequests\Mappers\GitHubIssueResponseToIssueDataMapper;
24-
use App\Domains\PullRequests\Mappers\GitHubPullRequestResponseToPullRequestDataMapper;
2523
use Carbon\CarbonImmutable;
2624
use Date;
25+
use Gate;
2726
use Illuminate\Support\ServiceProvider;
27+
use Override;
2828

2929
class AppServiceProvider extends ServiceProvider
3030
{
@@ -45,6 +45,7 @@ class AppServiceProvider extends ServiceProvider
4545
public function register(): void
4646
{
4747
$this->registerTelescope();
48+
$this->registerScramble();
4849
}
4950

5051
/**
@@ -58,6 +59,13 @@ public function boot(): void
5859
$this->registerPolicies();
5960
}
6061

62+
private function registerScramble(): void
63+
{
64+
if ($this->app->environment('local') && class_exists(\Dedoc\Scramble\ScrambleServiceProvider::class)) {
65+
$this->app->register(\Dedoc\Scramble\ScrambleServiceProvider::class);
66+
}
67+
}
68+
6169
private function registerTelescope(): void
6270
{
6371
if ($this->app->environment('local') && class_exists(\Laravel\Telescope\TelescopeServiceProvider::class)) {

bin/deploy

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ docker compose up -d --no-deps app queue scheduler
77

88
docker compose exec -T app composer install --no-interaction --no-dev --optimize-autoloader --no-scripts
99

10-
docker compose exec -T app php artisan package:discover --ansi
11-
docker compose exec -T app php artisan config:clear
12-
1310
docker compose exec -T app npm ci
1411
docker compose exec -T app npm run build
1512

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080
"extra": {
8181
"laravel": {
8282
"dont-discover": [
83+
"dedoc/scramble",
8384
"laravel/telescope"
8485
]
8586
}

0 commit comments

Comments
 (0)