Skip to content

Commit 2278548

Browse files
Updated upgrade documentation
1 parent 3093328 commit 2278548

File tree

2 files changed

+39
-14
lines changed

2 files changed

+39
-14
lines changed

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

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,17 @@
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
2424
For your convenience, we have created an upgrade console command:
2525

2626
```bash
27+
composer require dragon-code/laravel-migration-actions:^3.0
2728
php artisan migrate:actions:upgrade
29+
php artisan migrate
2830
```
2931

3032
It 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

4649
You 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

9498
Make 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

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

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
### High Impact Changes
44

5-
- [Renamed project namespace](#renamed-project-namespace)
5+
- [Rename package name](#rename-package-name)
66
- [Changing the names of console commands](#changing-the-names-of-console-commands)
77

88
### Medium Impact Changes
@@ -13,7 +13,27 @@
1313

1414
- [Changed the default name of the table for storing actions](#changed-the-default-name-of-the-table-for-storing-actions)
1515

16-
## Renamed project namespace
16+
## The easiest way to upgrade
17+
18+
> Note
19+
> If you used inheritance of actions from other actions, then you will need to process these files manually.
20+
21+
For your convenience, we have created an upgrade console command:
22+
23+
```bash
24+
composer remove dragon-code/laravel-migration-actions
25+
composer require dragon-code/laravel-actions:^4.0
26+
php artisan actions:upgrade
27+
php artisan migrate
28+
```
29+
30+
It will do the following:
31+
32+
- Renaming manually invoked commands in a project to a new name
33+
34+
## Updating Dependencies
35+
36+
### Rename package name
1737

1838
You should update the following dependency in your application's `composer.json` file:
1939

@@ -75,4 +95,5 @@ DragonCode\LaravelActions\Constants\Names::ACTIONS
7595

7696
The new table name is `actions`.
7797

78-
You can also specify any name in the application [settings](https://github.com/TheDragonCode/laravel-actions/blob/main/config/actions.php).
98+
You can also specify any name in the
99+
application [settings](https://github.com/TheDragonCode/laravel-actions/blob/main/config/actions.php).

0 commit comments

Comments
 (0)