22
33## High Impact Changes
44
5- - Replacing named classes with anonymous ones
6- - Change the location of the configuration file
7- - Changing the namespace of the parent class
8- - Changing variable names from ` snake_case ` to ` camelCase `
9- - Added recursive search for actions in a folder
10- - PHP 7.3 and 7.4 was dropped
5+ - [ Change the location of the configuration file ] ( #configuration )
6+ - [ Replacing named classes with anonymous ones ] ( #anonymous-classes )
7+ - [ Changing the namespace of the parent class] ( #parent-namespace )
8+ - [ Changing variable names from ` snake_case ` to ` camelCase ` and added typing ] ( #changed-properties )
9+ - [ Added recursive search for actions in a folder] ( #added-recursive-search-for-actions-in-a-folder )
10+ - [ PHP 7.3 and 7.4 was dropped] ( #php-802-required )
1111- Laravel 6.0 was dropped
1212- Dragon Code: Contracts (` dragon-code/contracts ` ) was dropped
13- - Added property typing
1413
1514## Medium Impact Changes
1615
17- - Changing the name of an action column in the database
18- - Action storage directory changed
16+ - [ Changing the name of an action column in the database] ( #changed-migration-repository )
17+ - [ Action storage directory changed] ( #actions-location )
1918
2019## Upgrading To 3.x from 2.x
2120
22- ### Updating Dependencies
23-
24- #### PHP 8.0.2 Required
25-
26- Laravel Actions now requires PHP 8.0.2 or greater.
27-
28- #### Composer Dependencies
29-
30- You should update the following dependency in your application's ` composer.json ` file:
31-
32- - ` dragon-code/laravel-migration-actions ` to ` ^3.0 `
33-
3421### Call Upgrade Command
3522
23+ > Note
24+ > If you used inheritance of actions from other actions, then you will need to process these files manually.
25+
3626For your convenience, we have created an upgrade console command:
3727
3828``` bash
@@ -47,12 +37,21 @@ It will do the following:
4737- Replace named classes with anonymous ones
4838- Create a configuration file according to the data saved in your project
4939
50- > Note
51- > If you used inheritance of actions from other actions, then you will need to process these files manually.
40+ ### Updating Dependencies
41+
42+ #### PHP 8.0.2 Required
43+
44+ Laravel Actions now requires PHP 8.0.2 or greater.
45+
46+ #### Composer Dependencies
47+
48+ You should update the following dependency in your application's ` composer.json ` file:
49+
50+ - ` dragon-code/laravel-migration-actions ` to ` ^3.0 `
5251
5352### Configuration
5453
55- Publish the config file and migrate the settings from the ` config/database.php ` file.
54+ Publish the config file and migrate the settings from the ` config/database.php ` file to ` config/actions.php ` .
5655
5756``` bash
5857php artisan vendor:publish --provider=" DragonCode\LaravelActions\ServiceProvider"
@@ -62,7 +61,6 @@ php artisan vendor:publish --provider="DragonCode\LaravelActions\ServiceProvider
6261
6362Move the action files to the ` actions ` folder in the project root, or update the ` actions.path ` option in the configuration file.
6463
65-
6664### Parent Namespace
6765
6866Replace ` DragonCode\LaravelActions\Support\Actionable ` with ` DragonCode\LaravelActions\Action ` .
@@ -91,17 +89,35 @@ If your class does not contain a `down` method, then you can replace the `up` me
9189
9290### Changed Migration Repository
9391
94- Just call the ` php artisan migrate ` command to make changes to the action repository table.
92+ Just call the ` php artisan migrate ` command to make changes to the action repository table.
9593
96- ### Added property typing
94+ ### Changed Properties
9795
9896Make sure all overridden properties are typed:
9997
10098```
101- protected $once >> protected bool $once
102- protected $transactions >> protected bool $transactions
103- protected $transactionAttempts >> protected int $transactionAttempts
104- protected $environment >> protected string|array|null $environment
105- protected $exceptEnvironment >> protected string|array|null $exceptEnvironment
106- protected $before >> protected bool $before
99+ protected $once >> protected bool $once
100+ protected $transactions >> protected bool $transactions
101+ protected $transaction_attempts >> protected int $transactionAttempts
102+ protected $environment >> protected string|array|null $environment
103+ protected $except_environment >> protected string|array|null $exceptEnvironment
104+ protected $before >> protected bool $before
105+ ```
106+
107+ ### Added recursive search for actions in a folder
108+
109+ #### Before:
110+
111+ ``` bash
112+ 2022_10_13_013321_test1
113+ 2022_10_13_013326_test2
114+ bar/2022_10_13_013323_test3 # will not be called
115+ ```
116+
117+ #### After:
118+
119+ ``` bash
120+ 2022_10_13_013321_test1
121+ 2022_10_13_013326_test2
122+ bar/2022_10_13_013323_test3 # will be called
107123```
0 commit comments