1616- [ Changing the name of an action column in the database] ( #changed-action-repository )
1717- [ Action storage directory changed] ( #actions-location )
1818
19- ### Call Upgrade Command
19+ ## The easiest way to upgrade
2020
2121> Note
2222> If you used inheritance of actions from other actions, then you will need to process these files manually.
2323
2424For your convenience, we have created an upgrade console command:
2525
2626``` bash
27+ composer require dragon-code/laravel-migration-actions:^3.0
2728php artisan migrate:actions:upgrade
29+ php artisan migrate
2830```
2931
3032It will do the following:
@@ -34,6 +36,7 @@ It will do the following:
3436- Replace the ` up ` method with ` __invoke ` if the class does not have a ` down ` method
3537- Replace named classes with anonymous ones
3638- Create a configuration file according to the data saved in your project
39+ - Changes properties from ` snake_case ` to ` camelCase `
3740
3841## Updating Dependencies
3942
@@ -45,7 +48,7 @@ Laravel Actions now requires PHP 8.0.2 or greater.
4548
4649You should update the following dependency in your application's ` composer.json ` file:
4750
48- - ` dragon-code/laravel-actions ` to ` ^3.0 `
51+ - ` dragon-code/laravel-migration- actions ` to ` ^3.0 `
4952
5053## Configuration
5154
@@ -57,7 +60,8 @@ php artisan vendor:publish --provider="DragonCode\LaravelActions\ServiceProvider
5760
5861## Actions Location
5962
60- Move the action files to the ` actions ` folder in the project root, or update the ` actions.path ` option in the configuration file.
63+ Move the action files to the ` actions ` folder in the project root, or update the ` actions.path ` option in the
64+ configuration file.
6165
6266## Parent Namespace
6367
@@ -93,14 +97,14 @@ Just call the `php artisan migrate` command to make changes to the action reposi
9397
9498Make sure all overridden properties are typed:
9599
96- ```
97- protected $once >> protected bool $once
98- protected $transactions >> protected bool $transactions
99- protected $transaction_attempts >> protected int $transactionAttempts
100- protected $environment >> protected string|array|null $environment
101- protected $except_environment >> protected string|array|null $exceptEnvironment
102- protected $before >> protected bool $before
103- ```
100+ | Old Name | New Name |
101+ | --------------------------------- | -------------------------------------------------- |
102+ | protected $once | protected bool $once |
103+ | protected $transactions | protected bool $transactions |
104+ | protected $transaction_attempts | protected int $transactionAttempts |
105+ | protected $environment | protected string\ | array\ | null $environment |
106+ | protected $except_environment | protected string \| array \| null $exceptEnvironment |
107+ | protected $before | protected bool $before |
104108
105109## Added recursive search for actions in a folder
106110
0 commit comments