Skip to content

Commit 2ff9ac7

Browse files
Merge pull request #202 from TheDragonCode/7.x
Removed Laravel 10
2 parents bbc0987 + cfdece0 commit 2ff9ac7

26 files changed

+76
-80
lines changed

.github/workflows/phpunit.yml renamed to .github/workflows/tests.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@ jobs:
1010
fail-fast: true
1111
matrix:
1212
php: [ "8.2", "8.3", "8.4" ]
13-
laravel: [ "10.0", "11.0", "12.0" ]
14-
exclude:
15-
- laravel: "10.0"
16-
php: "8.4"
13+
laravel: [ "11.0", "12.0" ]
1714

1815
name: PHP ${{ matrix.php }}, Laravel ${{ matrix.laravel }}
1916

@@ -31,9 +28,5 @@ jobs:
3128
- name: Install dependencies
3229
run: composer require --dev laravel/framework:^${{ matrix.laravel }}
3330

34-
- name: Install Doctrine
35-
if: matrix.laravel == '10.0'
36-
run: composer require doctrine/dbal
37-
3831
- name: Execute tests
3932
run: sudo vendor/bin/phpunit

composer.json

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,20 +41,15 @@
4141
"php": "^8.2",
4242
"composer-runtime-api": "^2.2",
4343
"dragon-code/support": "^6.6",
44-
"illuminate/console": "^10.0 || ^11.0 || ^12.0",
45-
"illuminate/container": "^10.0 || ^11.0 || ^12.0",
46-
"illuminate/database": "^10.0 || ^11.0 || ^12.0",
47-
"illuminate/support": "^10.0 || ^11.0 || ^12.0",
44+
"laravel/framework": "^11.0 || ^12.0",
4845
"laravel/prompts": ">=0.1",
49-
"spatie/laravel-data": "^4.14",
50-
"symfony/console": "^6.0 || ^7.0"
46+
"spatie/laravel-data": "^4.14"
5147
},
5248
"require-dev": {
5349
"mockery/mockery": "^1.3.1",
5450
"nesbot/carbon": "^2.62.1 || ^3.0",
55-
"orchestra/testbench": "^8.0 || ^9.0 || ^10.0",
56-
"phpunit/phpunit": "^10.0 || ^11.0 || ^12.0",
57-
"ramsey/uuid": "^4.0"
51+
"orchestra/testbench": "^9.0 || ^10.0",
52+
"phpunit/phpunit": "^11.0 || ^12.0"
5853
},
5954
"conflict": {
6055
"andrey-helldar/laravel-actions": "*",

tests/Concerns/AssertDatabase.php

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,12 @@ protected function assertDatabaseDoesntTable(string $table): void
2424
);
2525
}
2626

27-
protected function assertDatabaseOperationHas(string $table, $value, $connection = null, string $column = 'operation'): void
28-
{
27+
protected function assertDatabaseOperationHas(
28+
string $table,
29+
$value,
30+
$connection = null,
31+
string $column = 'operation'
32+
): void {
2933
$this->assertDatabaseHasLike($table, $column, $value, $connection);
3034
}
3135

@@ -39,8 +43,12 @@ protected function assertDatabaseHasLike(string $table, string $column, $value,
3943
$this->assertTrue($exists);
4044
}
4145

42-
protected function assertDatabaseOperationDoesntLike(string $table, $value, $connection = null, string $column = 'operation'): void
43-
{
46+
protected function assertDatabaseOperationDoesntLike(
47+
string $table,
48+
$value,
49+
$connection = null,
50+
string $column = 'operation'
51+
): void {
4452
$this->assertDatabaseDoesntLike($table, $column, $value, $connection);
4553
}
4654

tests/fixtures/app/async/2021_04_06_212742_every_time.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
use DragonCode\LaravelDeployOperations\Operation;
66
use Illuminate\Database\Query\Builder;
77
use Illuminate\Support\Facades\DB;
8-
use Ramsey\Uuid\Uuid;
8+
use Illuminate\Support\Str;
99

1010
return new class extends Operation {
1111
public function __invoke(): void
1212
{
1313
$this->table()->insert([
14-
'value' => Uuid::uuid4(),
14+
'value' => Str::random(4),
1515
]);
1616
}
1717

tests/fixtures/app/async/2023_04_06_212637_foo_bar.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
use DragonCode\LaravelDeployOperations\Operation;
66
use Illuminate\Database\Query\Builder;
77
use Illuminate\Support\Facades\DB;
8-
use Ramsey\Uuid\Uuid;
8+
use Illuminate\Support\Str;
99

1010
return new class extends Operation {
1111
public function __invoke(): void
1212
{
1313
$this->table()->insert([
14-
'value' => Uuid::uuid4(),
14+
'value' => Str::random(4),
1515
]);
1616
}
1717

tests/fixtures/app/operations/2020_12_07_153105_foo_bar.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
use DragonCode\LaravelDeployOperations\Operation;
66
use Illuminate\Database\Query\Builder;
77
use Illuminate\Support\Facades\DB;
8-
use Ramsey\Uuid\Uuid;
8+
use Illuminate\Support\Str;
99

1010
return new class extends Operation {
1111
public function up(): void
1212
{
1313
$this->table()->insert([
14-
'value' => Uuid::uuid4(),
14+
'value' => Str::random(4),
1515
]);
1616
}
1717

tests/fixtures/app/operations/2021_01_02_020947_every_time.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
use DragonCode\LaravelDeployOperations\Operation;
66
use Illuminate\Database\Query\Builder;
77
use Illuminate\Support\Facades\DB;
8-
use Ramsey\Uuid\Uuid;
8+
use Illuminate\Support\Str;
99

1010
return new class extends Operation {
1111
public function up(): void
1212
{
1313
$this->table()->insert([
14-
'value' => Uuid::uuid4(),
14+
'value' => Str::random(4),
1515
]);
1616
}
1717

tests/fixtures/app/operations/2021_05_24_120003_run_on_all.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,20 @@
55
use DragonCode\LaravelDeployOperations\Operation;
66
use Illuminate\Database\Query\Builder;
77
use Illuminate\Support\Facades\DB;
8-
use Ramsey\Uuid\Uuid;
8+
use Illuminate\Support\Str;
99

1010
return new class extends Operation {
1111
public function up(): void
1212
{
1313
$this->table()->insert([
14-
'value' => Uuid::uuid4(),
14+
'value' => Str::random(4),
1515
]);
1616
}
1717

1818
public function down(): void
1919
{
2020
$this->table()->insert([
21-
'value' => Uuid::uuid4(),
21+
'value' => Str::random(4),
2222
]);
2323
}
2424

tests/fixtures/app/operations/2021_05_24_120003_run_on_many_environments.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,20 @@
55
use DragonCode\LaravelDeployOperations\Operation;
66
use Illuminate\Database\Query\Builder;
77
use Illuminate\Support\Facades\DB;
8-
use Ramsey\Uuid\Uuid;
8+
use Illuminate\Support\Str;
99

1010
return new class extends Operation {
1111
public function up(): void
1212
{
1313
$this->table()->insert([
14-
'value' => Uuid::uuid4(),
14+
'value' => Str::random(4),
1515
]);
1616
}
1717

1818
public function down(): void
1919
{
2020
$this->table()->insert([
21-
'value' => Uuid::uuid4(),
21+
'value' => Str::random(4),
2222
]);
2323
}
2424

tests/fixtures/app/operations/2021_05_24_120003_run_on_production.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,20 @@
55
use DragonCode\LaravelDeployOperations\Operation;
66
use Illuminate\Database\Query\Builder;
77
use Illuminate\Support\Facades\DB;
8-
use Ramsey\Uuid\Uuid;
8+
use Illuminate\Support\Str;
99

1010
return new class extends Operation {
1111
public function up(): void
1212
{
1313
$this->table()->insert([
14-
'value' => Uuid::uuid4(),
14+
'value' => Str::random(4),
1515
]);
1616
}
1717

1818
public function down(): void
1919
{
2020
$this->table()->insert([
21-
'value' => Uuid::uuid4(),
21+
'value' => Str::random(4),
2222
]);
2323
}
2424

tests/fixtures/app/operations/2021_05_24_120003_run_on_testing.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,20 @@
55
use DragonCode\LaravelDeployOperations\Operation;
66
use Illuminate\Database\Query\Builder;
77
use Illuminate\Support\Facades\DB;
8-
use Ramsey\Uuid\Uuid;
8+
use Illuminate\Support\Str;
99

1010
return new class extends Operation {
1111
public function up(): void
1212
{
1313
$this->table()->insert([
14-
'value' => Uuid::uuid4(),
14+
'value' => Str::random(4),
1515
]);
1616
}
1717

1818
public function down(): void
1919
{
2020
$this->table()->insert([
21-
'value' => Uuid::uuid4(),
21+
'value' => Str::random(4),
2222
]);
2323
}
2424

tests/fixtures/app/operations/2021_06_07_132849_run_except_production.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,20 @@
55
use DragonCode\LaravelDeployOperations\Operation;
66
use Illuminate\Database\Query\Builder;
77
use Illuminate\Support\Facades\DB;
8-
use Ramsey\Uuid\Uuid;
8+
use Illuminate\Support\Str;
99

1010
return new class extends Operation {
1111
public function up(): void
1212
{
1313
$this->table()->insert([
14-
'value' => Uuid::uuid4(),
14+
'value' => Str::random(4),
1515
]);
1616
}
1717

1818
public function down(): void
1919
{
2020
$this->table()->insert([
21-
'value' => Uuid::uuid4(),
21+
'value' => Str::random(4),
2222
]);
2323
}
2424

tests/fixtures/app/operations/2021_06_07_132917_run_except_testing.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,20 @@
55
use DragonCode\LaravelDeployOperations\Operation;
66
use Illuminate\Database\Query\Builder;
77
use Illuminate\Support\Facades\DB;
8-
use Ramsey\Uuid\Uuid;
8+
use Illuminate\Support\Str;
99

1010
return new class extends Operation {
1111
public function up(): void
1212
{
1313
$this->table()->insert([
14-
'value' => Uuid::uuid4(),
14+
'value' => Str::random(4),
1515
]);
1616
}
1717

1818
public function down(): void
1919
{
2020
$this->table()->insert([
21-
'value' => Uuid::uuid4(),
21+
'value' => Str::random(4),
2222
]);
2323
}
2424

tests/fixtures/app/operations/2021_06_07_134045_run_except_many_environments.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,20 @@
55
use DragonCode\LaravelDeployOperations\Operation;
66
use Illuminate\Database\Query\Builder;
77
use Illuminate\Support\Facades\DB;
8-
use Ramsey\Uuid\Uuid;
8+
use Illuminate\Support\Str;
99

1010
return new class extends Operation {
1111
public function up(): void
1212
{
1313
$this->table()->insert([
14-
'value' => Uuid::uuid4(),
14+
'value' => Str::random(4),
1515
]);
1616
}
1717

1818
public function down(): void
1919
{
2020
$this->table()->insert([
21-
'value' => Uuid::uuid4(),
21+
'value' => Str::random(4),
2222
]);
2323
}
2424

tests/fixtures/app/operations/2021_10_26_143247_run_allow.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,20 @@
55
use DragonCode\LaravelDeployOperations\Operation;
66
use Illuminate\Database\Query\Builder;
77
use Illuminate\Support\Facades\DB;
8-
use Ramsey\Uuid\Uuid;
8+
use Illuminate\Support\Str;
99

1010
return new class extends Operation {
1111
public function up(): void
1212
{
1313
$this->table()->insert([
14-
'value' => Uuid::uuid4(),
14+
'value' => Str::random(4),
1515
]);
1616
}
1717

1818
public function down(): void
1919
{
2020
$this->table()->insert([
21-
'value' => Uuid::uuid4(),
21+
'value' => Str::random(4),
2222
]);
2323
}
2424

tests/fixtures/app/operations/2021_10_26_143304_run_disallow.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,20 @@
55
use DragonCode\LaravelDeployOperations\Operation;
66
use Illuminate\Database\Query\Builder;
77
use Illuminate\Support\Facades\DB;
8-
use Ramsey\Uuid\Uuid;
8+
use Illuminate\Support\Str;
99

1010
return new class extends Operation {
1111
public function up(): void
1212
{
1313
$this->table()->insert([
14-
'value' => Uuid::uuid4(),
14+
'value' => Str::random(4),
1515
]);
1616
}
1717

1818
public function down(): void
1919
{
2020
$this->table()->insert([
21-
'value' => Uuid::uuid4(),
21+
'value' => Str::random(4),
2222
]);
2323
}
2424

tests/fixtures/app/operations/2021_12_23_165047_run_success.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,27 @@
55
use DragonCode\LaravelDeployOperations\Operation;
66
use Illuminate\Database\Query\Builder;
77
use Illuminate\Support\Facades\DB;
8-
use Ramsey\Uuid\Uuid;
8+
use Illuminate\Support\Str;
99

1010
return new class extends Operation {
1111
public function up(): void
1212
{
1313
$this->table()->insert([
14-
'value' => Uuid::uuid4(),
14+
'value' => Str::random(4),
1515
]);
1616
}
1717

1818
public function down(): void
1919
{
2020
$this->table()->insert([
21-
'value' => Uuid::uuid4(),
21+
'value' => Str::random(4),
2222
]);
2323
}
2424

2525
public function success(): void
2626
{
2727
$this->table()->insert([
28-
'value' => Uuid::uuid4(),
28+
'value' => Str::random(4),
2929
]);
3030
}
3131

0 commit comments

Comments
 (0)