Skip to content

Commit bf206c1

Browse files
Merge pull request #152 from TheDragonCode/5.x
Removed support for older versions of Laravel
2 parents 2dd27c1 + 3f9fd7a commit bf206c1

File tree

61 files changed

+168
-579
lines changed

Some content is hidden

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

61 files changed

+168
-579
lines changed

.github/workflows/phpunit.yml

Lines changed: 7 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: phpunit
1+
name: Tests
22

33
on: [ push, pull_request ]
44

@@ -9,32 +9,8 @@ jobs:
99
strategy:
1010
fail-fast: true
1111
matrix:
12-
php: [ "8.0", "8.1", "8.2", "8.3" ]
13-
laravel: [ "7.0", "8.0", "9.0", "10.0", "11.0" ]
14-
exclude:
15-
- laravel: "7.0"
16-
php: "8.1"
17-
18-
- laravel: "7.0"
19-
php: "8.2"
20-
21-
- laravel: "7.0"
22-
php: "8.3"
23-
24-
- laravel: "8.0"
25-
php: "8.3"
26-
27-
- laravel: "9.0"
28-
php: "8.3"
29-
30-
- laravel: "10.0"
31-
php: "8.0"
32-
33-
- laravel: "11.0"
34-
php: "8.0"
35-
36-
- laravel: "11.0"
37-
php: "8.1"
12+
php: [ "8.2", "8.3" ]
13+
laravel: [ "10.0", "11.0" ]
3814

3915
name: PHP ${{ matrix.php }}, Laravel ${{ matrix.laravel }}
4016

@@ -52,5 +28,9 @@ jobs:
5228
- name: Install dependencies
5329
run: composer require --dev laravel/framework:^${{ matrix.laravel }}
5430

31+
- name: Install Doctrine
32+
if: matrix.laravel == '10.0'
33+
run: composer require doctrine/dbal
34+
5535
- name: Execute tests
5636
run: sudo vendor/bin/phpunit

composer.json

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -39,42 +39,40 @@
3939
}
4040
],
4141
"require": {
42-
"php": "^8.0.2",
42+
"php": "^8.2",
4343
"composer-runtime-api": "^2.2",
44-
"doctrine/dbal": "^2.13 || ^3.4",
45-
"dragon-code/laravel-support": "^3.5",
4644
"dragon-code/simple-dto": "^2.5.1",
4745
"dragon-code/support": "^6.6",
48-
"illuminate/console": "^7.30.6 || ^8.75 || ^9.0 || ^10.0 || ^11.0",
49-
"illuminate/container": "^7.30.6 || ^8.75 || ^9.0 || ^10.0 || ^11.0",
50-
"illuminate/database": "^7.30.6 || ^8.75 || ^9.0 || ^10.0 || ^11.0",
51-
"illuminate/support": "^7.30.6 || ^8.75 || ^9.0 || ^10.0 || ^11.0",
52-
"symfony/console": "^5.3 || ^6.0 || ^7.0"
46+
"illuminate/console": "^10.0 || ^11.0",
47+
"illuminate/container": "^10.0 || ^11.0",
48+
"illuminate/database": "^10.0 || ^11.0",
49+
"illuminate/support": "^10.0 || ^11.0",
50+
"symfony/console": " ^6.0 || ^7.0"
5351
},
5452
"require-dev": {
5553
"mockery/mockery": "^1.3.1",
5654
"nesbot/carbon": "^2.62.1 || ^3.0",
57-
"orchestra/testbench": "^5.20 || ^6.25 || ^7.9 || ^8.0 || ^9.0",
58-
"phpunit/phpunit": "^9.6 || ^10.0",
59-
"ramsey/uuid": "^3.7 || ^4.0"
55+
"orchestra/testbench": "^8.0 || ^9.0",
56+
"phpunit/phpunit": "^10.0",
57+
"ramsey/uuid": "^4.0"
6058
},
6159
"conflict": {
6260
"andrey-helldar/laravel-actions": "*",
6361
"dragon-code/laravel-migration-actions": "*"
6462
},
63+
"suggest": {
64+
"doctrine/dbal": "This package must be installed if you are using Laravel 10."
65+
},
6566
"minimum-stability": "stable",
6667
"prefer-stable": true,
6768
"autoload": {
6869
"psr-4": {
69-
"DragonCode\\LaravelActions\\": "src"
70-
},
71-
"classmap": [
72-
"polyfill"
73-
]
70+
"DragonCode\\LaravelActions\\": "src/"
71+
}
7472
},
7573
"autoload-dev": {
7674
"psr-4": {
77-
"Tests\\": "tests"
75+
"Tests\\": "tests/"
7876
}
7977
},
8078
"config": {

src/Database/BaseChangeColumn.php renamed to database/migrations/2022_08_18_180137_change_migration_actions_table.php

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

33
declare(strict_types=1);
44

5-
namespace DragonCode\LaravelActions\Database;
6-
75
use DragonCode\LaravelActions\Action;
86
use DragonCode\LaravelActions\Helpers\Config;
97
use Illuminate\Database\Schema\Blueprint;
108
use Illuminate\Support\Facades\Schema;
119

12-
abstract class BaseChangeColumn extends Action
13-
{
14-
protected Config $config;
15-
16-
public function __construct()
17-
{
18-
$this->config = app(Config::class);
19-
}
20-
10+
return new class extends Action {
2111
public function up(): void
2212
{
2313
if ($this->hasTable()) {
@@ -59,6 +49,6 @@ protected function doesntHaveColumn(string $column): bool
5949

6050
protected function table(): string
6151
{
62-
return $this->config->table();
52+
return app(Config::class)->table();
6353
}
64-
}
54+
};

src/Database/BaseRenameMigrationsActionsTableToActions.php renamed to database/migrations/2023_01_21_172923_rename_migrations_actions_table_to_actions.php

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

33
declare(strict_types=1);
44

5-
namespace DragonCode\LaravelActions\Database;
6-
75
use DragonCode\LaravelActions\Action;
86
use DragonCode\LaravelActions\Helpers\Config;
97
use Illuminate\Support\Facades\Schema;
10-
use RuntimeException;
11-
12-
class BaseRenameMigrationsActionsTableToActions extends Action
13-
{
14-
protected Config $config;
15-
16-
public function __construct()
17-
{
18-
$this->config = app(Config::class);
19-
}
208

9+
return new class extends Action {
2110
public function up(): void
2211
{
2312
if (Schema::hasTable('migration_actions') && $this->doesntSame('migration_actions', $this->table())) {
@@ -50,6 +39,6 @@ protected function doesntSame(string $first, string $second): bool
5039

5140
protected function table(): string
5241
{
53-
return $this->config->table();
42+
return app(Config::class)->table();
5443
}
55-
}
44+
};

database/migrations/anonymous/2022_08_18_180137_change_migration_actions_table.php

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

database/migrations/anonymous/2023_01_21_172923_rename_migrations_actions_table_to_actions.php

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

database/migrations/named/2022_08_18_180137_change_migration_actions_table.php

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

database/migrations/named/2023_01_21_172923_rename_migrations_actions_table_to_actions.php

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

docs/.vuepress/config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export default defineUserConfig({
7070
editLink: true,
7171

7272
navbar: [
73-
{text: '4.x', link: '/prologue/changelog/4.x.md'}
73+
{text: '5.x', link: '/prologue/changelog/5.x.md'}
7474
],
7575

7676
sidebarDepth: 1,
Lines changed: 4 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Installation
22

3-
To get the latest version of `Laravel Actions`, simply require the project using [Composer](https://getcomposer.org):
3+
To get the latest version of `Deploy Actions for Laravel`, simply require the project using [Composer](https://getcomposer.org):
44

55
```bash
66
composer require dragon-code/laravel-actions
@@ -11,35 +11,13 @@ Or manually update `require` block of `composer.json` and run `composer update`
1111
```json
1212
{
1313
"require": {
14-
"dragon-code/laravel-actions": "^4.0"
14+
"dragon-code/laravel-actions": "^5.0"
1515
}
1616
}
1717
```
1818

19-
## Laravel Framework
20-
21-
Run the `php artisan vendor:publish --provider="DragonCode\LaravelActions\ServiceProvider"` console command for the config file publishing.
22-
23-
## Lumen Framework
24-
25-
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
26-
Laravel and the main configuration parameters are instead located in `bootstrap/app.php`, some alterations must be made.
27-
28-
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.
29-
30-
```php
31-
// $app->register(App\Providers\AppServiceProvider::class);
32-
```
33-
34-
If you are not using that line, that is usually handy to manage gracefully multiple Lumen installations, you will have to add this line of code under
35-
the `Register Service Providers` section of your `bootstrap/app.php`.
36-
37-
```php
38-
$app->register(\DragonCode\LaravelActions\ServiceProvider::class);
39-
```
40-
41-
Next, you can copy the config file:
19+
If necessary, you can publish the configuration file by calling the console command:
4220

4321
```bash
44-
cp vendor/dragon-code/laravel-actions/config/actions.php config/actions.php
22+
php artisan vendor:publish --provider="DragonCode\LaravelActions\ServiceProvider"
4523
```

0 commit comments

Comments
 (0)