From 7e2973c8de87e66e97d2149bdd890a5b84b15ed6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20K=C3=BCndig?= Date: Wed, 14 Jun 2023 09:25:51 +0200 Subject: [PATCH] Renamed artisan command to offline:seeder --- README.md | 17 +++++++++++++---- console/PluginSeedCommand.php | 2 +- updates/version.yaml | 1 + 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 78e8536..d4fe200 100644 --- a/README.md +++ b/README.md @@ -152,10 +152,19 @@ class Provider extends \System\Classes\AppBase The `--plugins` flag can be used to seed specific entities: ```bash -php artisan plugin:seed --plugins=Blog\\Post +php artisan offline:seeder --plugins=Blog\\Post ``` -## Migrate from 1.0 +## Migrate from 2.x + +October 3.3 introduced its own `plugin:seed` Artisan command. To +resolve this conflict, the Artisan command of this plugin was +renamed to `offline:seeder`. + +No special migration work is required, you can just use the new +Artisan command. + +## Migrate from 1.x To migrate old seeders from Version 1.0 of this plugin, make the following changes: @@ -174,7 +183,7 @@ YourModel::factory()->special()->make(); ## Running seeders -Simply run `php artisan plugin:seed` to run the seeders of all plugins. The seeder of each plugin will be only run once. +Simply run `php artisan offline:seeder` to run the seeders of all plugins. The seeder of each plugin will be only run once. To run a seeder for a already seeded plugin, use the `--fresh` option. Be aware that this will rollback and reinstall all plugins with a registered seeder completely, so any plugin data will be lost. @@ -182,7 +191,7 @@ all plugins with a registered seeder completely, so any plugin data will be lost You can use the `--plugins` option to run only specified seeders. Simply provide a comma-separated list of plugin names. ``` -php artisan plugin:seed --plugins=Vendor.PluginA,Vendor.PluginB --fresh +php artisan offline:seeder --plugins=Vendor.PluginA,Vendor.PluginB --fresh ``` ## Included factories diff --git a/console/PluginSeedCommand.php b/console/PluginSeedCommand.php index f56e546..253f2a4 100644 --- a/console/PluginSeedCommand.php +++ b/console/PluginSeedCommand.php @@ -8,7 +8,7 @@ class PluginSeedCommand extends Command { - protected $name = 'plugin:seed'; + protected $name = 'offline:seeder'; protected $description = 'Runs all plugin seeders'; diff --git a/updates/version.yaml b/updates/version.yaml index dfeb5b6..f749e8d 100644 --- a/updates/version.yaml +++ b/updates/version.yaml @@ -15,3 +15,4 @@ "2.0.2": "Fixed factory bug" "2.1.0": "Implemented seeder support for Tailor entities" "2.1.2": "Bugfix for Tailor seeders" +"3.0.0": "Renamed artisan command to offline:seeder, to prevent conflict with October 3.3"