Skip to content

Commit 02bfb39

Browse files
Merge pull request #167 from TheDragonCode/6.x
Removed `operations:stub` command
2 parents 11888d3 + 03b3e56 commit 02bfb39

File tree

6 files changed

+19
-148
lines changed

6 files changed

+19
-148
lines changed

docs/prologue/upgrade-guide/6.x.md

+9
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
- [Changed directory location](#changed-directory-location)
1515
- [Database transactions](#database-transactions)
1616
- [Removed `$async` property](#removed-async-property)
17+
- [Removed `operations:stub` command](#removed-operationsstub-command)
1718

1819
## Low-Impact Changes
1920

@@ -162,3 +163,11 @@ You can use the previously available `isAsync` method instead.
162163

163164
If you published a stub file, then you also need to rename it from `stubs/action.stub` to `stubs/deploy-operation.stub`
164165
and make changes to its structure.
166+
167+
## Removed `operations:stub` command
168+
169+
The `php artisan operations:stub` console command has been removed. Use another command instead:
170+
171+
```bash
172+
php artisan vendor:publish --tag=stubs --provider="DragonCode\LaravelDeployOperations\ServiceProvider"
173+
```

src/Console/StubPublish.php

-25
This file was deleted.

src/Constants/Names.php

-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,5 @@ class Names
1212
public const Reset = 'operations:reset';
1313
public const Rollback = 'operations:rollback';
1414
public const Status = 'operations:status';
15-
public const StubPublish = 'operations:stub';
1615
public const Upgrade = 'operations:upgrade';
1716
}

src/Processors/StubPublish.php

-41
This file was deleted.

src/ServiceProvider.php

+10-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ public function boot(): void
1515
{
1616
if ($this->app->runningInConsole()) {
1717
$this->publishConfig();
18+
$this->publishStub();
1819

1920
$this->registerAbout();
2021
$this->registerCommands();
@@ -38,7 +39,6 @@ protected function registerCommands(): void
3839
Console\Reset::class,
3940
Console\Rollback::class,
4041
Console\Status::class,
41-
Console\StubPublish::class,
4242
Console\Upgrade::class,
4343
]);
4444
}
@@ -55,6 +55,15 @@ protected function publishConfig(): void
5555
], 'config');
5656
}
5757

58+
protected function publishStub(): void
59+
{
60+
$this->publishes([
61+
__DIR__ . '/../resources/stubs/deploy-operation.stub' => $this->app->basePath(
62+
'stubs/deploy-operation.stub'
63+
),
64+
], 'stubs');
65+
}
66+
5867
protected function registerConfig(): void
5968
{
6069
$this->mergeConfigFrom(__DIR__ . '/../config/deploy-operations.php', 'deploy-operations');

tests/Commands/StubPublishTest.php

-80
This file was deleted.

0 commit comments

Comments
 (0)