Skip to content

Commit 6b398ab

Browse files
author
Andrey Helldar
committed
Changed namespace
1 parent 1920caf commit 6b398ab

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+137
-1005
lines changed

.codecov.yml

Lines changed: 0 additions & 1 deletion
This file was deleted.

.editorconfig

Lines changed: 0 additions & 760 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 0 additions & 5 deletions
This file was deleted.

.github/workflows/coverage.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

.github/workflows/phpunit.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
php: [ "7.3", "7.4", "8.0" ]
1212
laravel: [ "6.0", "7.0", "8.0" ]
1313

14-
name: Laravel ${{ matrix.laravel }}, PHP ${{ matrix.php }}
14+
name: PHP ${{ matrix.php }}, Laravel ${{ matrix.laravel }}
1515

1616
steps:
1717
- name: Checkout code
@@ -24,12 +24,8 @@ jobs:
2424
extensions: curl, mbstring, zip, pcntl, pdo, pdo_sqlite, iconv
2525
coverage: none
2626

27-
- name: Composer self update
28-
run: composer self-update
29-
3027
- name: Install dependencies
31-
run: |
32-
composer require laravel/framework:^${{ matrix.laravel }}
33-
composer update --prefer-stable --prefer-dist --no-progress --no-interaction
28+
run: composer require --dev laravel/framework:^${{ matrix.laravel }}
29+
3430
- name: Execute tests
3531
run: sudo vendor/bin/phpunit

README.md

Lines changed: 40 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -2,50 +2,49 @@
22

33
<img src="https://preview.dragon-code.pro/TheDragonCode/laravel-actions.svg?brand=laravel" alt="Laravel Actions"/>
44

5-
[![StyleCI Status][badge_styleci]][link_styleci]
6-
[![Github Workflow Status][badge_build]][link_build]
7-
[![Coverage Status][badge_coverage]][link_scrutinizer]
8-
[![Scrutinizer Code Quality][badge_quality]][link_scrutinizer]
9-
105
[![Stable Version][badge_stable]][link_packagist]
116
[![Unstable Version][badge_unstable]][link_packagist]
127
[![Total Downloads][badge_downloads]][link_packagist]
8+
[![Github Workflow Status][badge_build]][link_build]
139
[![License][badge_license]][link_license]
1410

15-
[![For Laravel][badge_laravel]][link_packagist]
16-
[![For Lumen][badge_lumen]][link_packagist]
17-
1811
> Actions are like version control for your migration process, allowing your team to modify and share the application's actionable schema. If you have ever had to tell a teammate to manually perform any action on a producton server, you've come across an issue that actions solves.
1912
2013
## Installation
2114

2215
To get the latest version of Laravel Actions, simply require the project using [Composer](https://getcomposer.org):
2316

2417
```bash
25-
$ composer require andrey-helldar/laravel-actions
18+
$ composer require dragon-code/laravel-actions
2619
```
2720

2821
Or manually update `require` block of `composer.json` and run `composer update`.
2922

3023
```json
3124
{
3225
"require": {
33-
"andrey-helldar/laravel-actions": "^1.7"
26+
"dragon-code/laravel-actions": "^2.0"
3427
}
3528
}
3629
```
3730

31+
### Upgrade from `andrey-helldar/laravel-actions`
32+
33+
1. In your `composer.json` file, replace `"andrey-helldar/laravel-actions": "^1.0"` with `"dragon-code/laravel-actions": "^2.0"`.
34+
2. Replace the `Helldar\LaravelActions` namespace prefix with `DragonCode\LaravelActions` in your app;
35+
3. Run the `command composer` update.
36+
4. Profit!
37+
3838
#### Laravel Framework
3939

4040
Nothing else needs to be done. All is ready 😊
4141

4242
#### Lumen Framework
4343

44-
This package is focused on Laravel development, but it can also be used in Lumen with some workarounds. Because Lumen works a little different, as it is like a
45-
barebone version of Laravel and the main configuration parameters are instead located in `bootstrap/app.php`, some alterations must be made.
44+
This package is focused on Laravel development, but it can also be used in Lumen with some workarounds. Because Lumen works a little different, as it is like a barebone version of
45+
Laravel and the main configuration parameters are instead located in `bootstrap/app.php`, some alterations must be made.
4646

47-
You can install `Laravel Actions` in `app/Providers/AppServiceProvider.php`, and uncommenting this line that registers the App Service Providers so it can
48-
properly load.
47+
You can install `Laravel Actions` in `app/Providers/AppServiceProvider.php`, and uncommenting this line that registers the App Service Providers so it can properly load.
4948

5049
```
5150
// $app->register(App\Providers\AppServiceProvider::class);
@@ -55,7 +54,7 @@ If you are not using that line, that is usually handy to manage gracefully multi
5554
the `Register Service Providers` section of your `bootstrap/app.php`.
5655

5756
```php
58-
$app->register(\Helldar\LaravelActions\ServiceProvider::class);
57+
$app->register(\DragonCode\LaravelActions\ServiceProvider::class);
5958
```
6059

6160
## How to use
@@ -68,8 +67,7 @@ To create a migration, use the `make:migration:action` Artisan command:
6867
php artisan make:migration:action my_action
6968
```
7069

71-
The new action will be placed in your `database/actions` directory. Each action file name contains a timestamp, which allows Laravel to determine the order of
72-
the actions.
70+
The new action will be placed in your `database/actions` directory. Each action file name contains a timestamp, which allows Laravel to determine the order of the actions.
7371

7472
> At the first start, you need to create a table by running the `migrate:actions:install` command.
7573
>
@@ -85,8 +83,8 @@ php artisan migrate:actions
8583

8684
#### Forcing Actions To Run In Production
8785

88-
Some action operations are destructive, which means they may cause you to lose data. In order to protect you from running these commands against your production
89-
database, you will be prompted for confirmation before the commands are executed. To force the commands to run without a prompt, use the `--force` flag:
86+
Some action operations are destructive, which means they may cause you to lose data. In order to protect you from running these commands against your production database, you will
87+
be prompted for confirmation before the commands are executed. To force the commands to run without a prompt, use the `--force` flag:
9088

9189
```
9290
php artisan migrate:actions --force
@@ -99,7 +97,7 @@ In some cases, you need to call the code every time you deploy the application.
9997
To do this, override the `$once` variable in the action file:
10098

10199
```php
102-
use Helldar\LaravelActions\Support\Actionable;
100+
use DragonCode\LaravelActions\Support\Actionable;
103101

104102
class Reindex extends Actionable
105103
{
@@ -114,8 +112,7 @@ class Reindex extends Actionable
114112

115113
If the value is `$once = false`, the `up` method will be called every time the `migrate:actions` command called.
116114

117-
In this case, information about it will not be written to the `migration_actions` table and, therefore, the `down` method will not be called when the rollback
118-
command is called.
115+
In this case, information about it will not be written to the `migration_actions` table and, therefore, the `down` method will not be called when the rollback command is called.
119116

120117
#### Execution In A Specific Environment
121118

@@ -124,7 +121,7 @@ In some cases, it becomes necessary to execute an action in a specific environme
124121
For this you can use the `$environment` parameter:
125122

126123
```php
127-
use Helldar\LaravelActions\Support\Actionable;
124+
use DragonCode\LaravelActions\Support\Actionable;
128125

129126
class Reindex extends Actionable
130127
{
@@ -141,7 +138,7 @@ class Reindex extends Actionable
141138
You can also specify multiple environment names:
142139

143140
```php
144-
use Helldar\LaravelActions\Support\Actionable;
141+
use DragonCode\LaravelActions\Support\Actionable;
145142

146143
class Reindex extends Actionable
147144
{
@@ -164,7 +161,7 @@ In some cases, it becomes necessary to execute an action excluding certain envir
164161
For this you can use the `$except_environment` parameter:
165162

166163
```php
167-
use Helldar\LaravelActions\Support\Actionable;
164+
use DragonCode\LaravelActions\Support\Actionable;
168165

169166
class Reindex extends Actionable
170167
{
@@ -181,7 +178,7 @@ class Reindex extends Actionable
181178
You can also specify multiple environment names:
182179

183180
```php
184-
use Helldar\LaravelActions\Support\Actionable;
181+
use DragonCode\LaravelActions\Support\Actionable;
185182

186183
class Reindex extends Actionable
187184
{
@@ -199,14 +196,14 @@ By default, no actions will be excluded. The same happens if you specify `null`
199196

200197
#### Database Transactions
201198

202-
In some cases, it becomes necessary to undo previously performed actions in the database. For example, when code execution throws an error. To do this, the code
203-
must be wrapped in a transaction.
199+
In some cases, it becomes necessary to undo previously performed actions in the database. For example, when code execution throws an error. To do this, the code must be wrapped in
200+
a transaction.
204201

205-
By setting the `$transactions = true` parameter, you will ensure that your code is wrapped in a transaction without having to manually call
206-
the `DB::transaction()` method. This will reduce the time it takes to create the action.
202+
By setting the `$transactions = true` parameter, you will ensure that your code is wrapped in a transaction without having to manually call the `DB::transaction()` method. This
203+
will reduce the time it takes to create the action.
207204

208205
```php
209-
use Helldar\LaravelActions\Support\Actionable;
206+
use DragonCode\LaravelActions\Support\Actionable;
210207

211208
class AddSomeData extends Actionable
212209
{
@@ -229,15 +226,13 @@ class AddSomeData extends Actionable
229226

230227
### Rolling Back Actions
231228

232-
To roll back the latest action operation, you may use the `rollback` command. This command rolls back the last "batch" of actions, which may include multiple
233-
action files:
229+
To roll back the latest action operation, you may use the `rollback` command. This command rolls back the last "batch" of actions, which may include multiple action files:
234230

235231
```
236232
php artisan migrate:actions:rollback
237233
```
238234

239-
You may roll back a limited number of actions by providing the `step` option to the rollback command. For example, the following command will roll back the last
240-
five actions:
235+
You may roll back a limited number of actions by providing the `step` option to the rollback command. For example, the following command will roll back the last five actions:
241236

242237
```
243238
php artisan migrate:actions:rollback --step=5
@@ -251,15 +246,15 @@ php artisan migrate:actions:reset
251246

252247
### Roll Back & Action Using A Single Command
253248

254-
The `migrate:actions:refresh` command will roll back all of your migrations and then execute the `migrate:actions` command. This command effectively re-creates
255-
your entire database:
249+
The `migrate:actions:refresh` command will roll back all of your migrations and then execute the `migrate:actions` command. This command effectively re-creates your entire
250+
database:
256251

257252
```
258253
php artisan migrate:actions:refresh
259254
```
260255

261-
You may roll back & re-migrate a limited number of migrations by providing the `step` option to the `refresh` command. For example, the following command will
262-
roll back & re-migrate the last five migrations:
256+
You may roll back & re-migrate a limited number of migrations by providing the `step` option to the `refresh` command. For example, the following command will roll back &
257+
re-migrate the last five migrations:
263258

264259
```
265260
php artisan migrate:actions:refresh --step=5
@@ -278,32 +273,18 @@ php artisan migrate:actions:status
278273
This package is licensed under the [MIT License](LICENSE).
279274

280275

281-
[badge_build]: https://img.shields.io/github/workflow/status/andrey-helldar/laravel-actions/phpunit?style=flat-square
282-
283-
[badge_downloads]: https://img.shields.io/packagist/dt/andrey-helldar/laravel-actions.svg?style=flat-square
276+
[badge_build]: https://img.shields.io/github/workflow/status/TheDragonCode/laravel-actions/phpunit?style=flat-square
284277

285-
[badge_laravel]: https://img.shields.io/badge/Laravel-6.x%20%7C%207.x%20%7C%208.x-orange.svg?style=flat-square
278+
[badge_downloads]: https://img.shields.io/packagist/dt/dragon-code/laravel-actions.svg?style=flat-square
286279

287-
[badge_lumen]: https://img.shields.io/badge/Lumen-6.x%20%7C%207.x%20%7C%208.x-orange.svg?style=flat-square
280+
[badge_license]: https://img.shields.io/packagist/l/dragon-code/laravel-actions.svg?style=flat-square
288281

289-
[badge_license]: https://img.shields.io/packagist/l/andrey-helldar/laravel-actions.svg?style=flat-square
290-
291-
[badge_coverage]: https://img.shields.io/scrutinizer/coverage/g/andrey-helldar/laravel-actions/main?style=flat-square
292-
293-
[badge_quality]: https://img.shields.io/scrutinizer/quality/g/andrey-helldar/laravel-actions/main?style=flat-square
294-
295-
[badge_stable]: https://img.shields.io/github/v/release/andrey-helldar/laravel-actions?label=stable&style=flat-square
296-
297-
[badge_styleci]: https://styleci.io/repos/317845207/shield
282+
[badge_stable]: https://img.shields.io/github/v/release/TheDragonCode/laravel-actions?label=stable&style=flat-square
298283

299284
[badge_unstable]: https://img.shields.io/badge/unstable-dev--main-orange?style=flat-square
300285

301-
[link_build]: https://github.com/andrey-helldar/laravel-actions/actions
286+
[link_build]: https://github.com/TheDragonCode/laravel-actions/actions
302287

303288
[link_license]: LICENSE
304289

305-
[link_packagist]: https://packagist.org/packages/andrey-helldar/laravel-actions
306-
307-
[link_scrutinizer]: https://scrutinizer-ci.com/g/andrey-helldar/laravel-actions/?branch=main
308-
309-
[link_styleci]: https://github.styleci.io/repos/317845207
290+
[link_packagist]: https://packagist.org/packages/dragon-code/laravel-actions

SECURITY.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

composer.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
{
2-
"name": "andrey-helldar/laravel-actions",
2+
"name": "dragon-code/laravel-actions",
33
"description": "Performing actions with saving the list of called files",
44
"type": "library",
55
"license": "MIT",
6-
"keywords": ["laravel", "migration", "migrations", "action", "actions"],
6+
"keywords": ["laravel", "migration", "migrations", "action", "actions", "dragon-code", "dragon", "andrey-helldar"],
77
"authors": [
88
{
99
"name": "Andrey Helldar",
1010
"email": "helldar@ai-rus.com"
1111
}
1212
],
1313
"support": {
14-
"issues": "https://github.com/andrey-helldar/laravel-actions/issues",
15-
"source": "https://github.com/andrey-helldar/laravel-actions"
14+
"issues": "https://github.com/TheDragonCode/laravel-actions/issues",
15+
"source": "https://github.com/TheDragonCode/laravel-actions"
1616
},
1717
"require": {
1818
"php": "^7.3|^8.0",
@@ -22,14 +22,15 @@
2222
"symfony/console": "^4.3|^5.0"
2323
},
2424
"require-dev": {
25+
"dragon-code/laravel-support": "^3.1",
2526
"mockery/mockery": "^1.3.1",
2627
"orchestra/testbench": "^4.0|^5.0|^6.0",
2728
"phpunit/phpunit": "^8.0|^9.0",
2829
"ramsey/uuid": "^3.7|^4.0"
2930
},
3031
"autoload": {
3132
"psr-4": {
32-
"Helldar\\LaravelActions\\": "src"
33+
"DragonCode\\LaravelActions\\": "src"
3334
}
3435
},
3536
"autoload-dev": {
@@ -46,7 +47,7 @@
4647
"extra": {
4748
"laravel": {
4849
"providers": [
49-
"Helldar\\LaravelActions\\ServiceProvider"
50+
"DragonCode\\LaravelActions\\ServiceProvider"
5051
]
5152
}
5253
}

resources/stubs/action.stub

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
use Helldar\LaravelActions\Support\Actionable;
3+
use DragonCode\LaravelActions\Support\Actionable;
44

55
class DummyClass extends Actionable
66
{

src/Console/Install.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?php
22

3-
namespace Helldar\LaravelActions\Console;
3+
namespace DragonCode\LaravelActions\Console;
44

5-
use Helldar\LaravelActions\Constants\Names;
6-
use Helldar\LaravelActions\Traits\Database;
7-
use Helldar\LaravelActions\Traits\Infoable;
5+
use DragonCode\LaravelActions\Constants\Names;
6+
use DragonCode\LaravelActions\Traits\Database;
7+
use DragonCode\LaravelActions\Traits\Infoable;
88
use Illuminate\Database\Console\Migrations\InstallCommand as BaseCommand;
99

1010
class Install extends BaseCommand

0 commit comments

Comments
 (0)