Skip to content

Removed Laravel 10 #202

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 1, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Removed Laravel 10
  • Loading branch information
andrey-helldar committed Apr 1, 2025
commit 83d1ff20dc907af7e13fc2d6b24cc4b120131a57
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ jobs:
fail-fast: true
matrix:
php: [ "8.2", "8.3", "8.4" ]
laravel: [ "10.0", "11.0", "12.0" ]
exclude:
- laravel: "10.0"
php: "8.4"
laravel: [ "11.0", "12.0" ]

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

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

- name: Install Doctrine
if: matrix.laravel == '10.0'
run: composer require doctrine/dbal

- name: Execute tests
run: sudo vendor/bin/phpunit
13 changes: 4 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,15 @@
"php": "^8.2",
"composer-runtime-api": "^2.2",
"dragon-code/support": "^6.6",
"illuminate/console": "^10.0 || ^11.0 || ^12.0",
"illuminate/container": "^10.0 || ^11.0 || ^12.0",
"illuminate/database": "^10.0 || ^11.0 || ^12.0",
"illuminate/support": "^10.0 || ^11.0 || ^12.0",
"laravel/framework": "^11.0 || ^12.0",
"laravel/prompts": ">=0.1",
"spatie/laravel-data": "^4.14",
"symfony/console": "^6.0 || ^7.0"
"spatie/laravel-data": "^4.14"
},
"require-dev": {
"mockery/mockery": "^1.3.1",
"nesbot/carbon": "^2.62.1 || ^3.0",
"orchestra/testbench": "^8.0 || ^9.0 || ^10.0",
"phpunit/phpunit": "^10.0 || ^11.0 || ^12.0",
"ramsey/uuid": "^4.0"
"orchestra/testbench": "^9.0 || ^10.0",
"phpunit/phpunit": "^11.0 || ^12.0"
},
"conflict": {
"andrey-helldar/laravel-actions": "*",
Expand Down
40 changes: 20 additions & 20 deletions tests/Commands/MutexTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,6 @@ class MutexTest extends TestCase

protected MutexService $mutex;

protected function setUp(): void
{
$this->command = new class extends Command {
public int $ran = 0;

public function handle(): int
{
++$this->ran;

return self::SUCCESS;
}
};

$this->mutex = m::mock(MutexService::class);

$container = Container::getInstance();
$container->instance(MutexService::class, $this->mutex);
$this->command->setLaravel($container);
}

public function testCanRunIsolatedCommandIfNotBlocked()
{
$this->mutex->shouldReceive('create')
Expand Down Expand Up @@ -91,6 +71,26 @@ public function testCanRunCommandAgainNonAutomated()
$this->assertEquals(1, $this->command->ran);
}

protected function setUp(): void
{
$this->command = new class extends Command {
public int $ran = 0;

public function handle(): int
{
++$this->ran;

return self::SUCCESS;
}
};

$this->mutex = m::mock(MutexService::class);

$container = Container::getInstance();
$container->instance(MutexService::class, $this->mutex);
$this->command->setLaravel($container);
}

protected function runCommand($withIsolated = true)
{
$input = new ArrayInput(['--' . Options::Isolated => $withIsolated]);
Expand Down
16 changes: 12 additions & 4 deletions tests/Concerns/AssertDatabase.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,12 @@ protected function assertDatabaseDoesntTable(string $table): void
);
}

protected function assertDatabaseOperationHas(string $table, $value, $connection = null, string $column = 'operation'): void
{
protected function assertDatabaseOperationHas(
string $table,
$value,
$connection = null,
string $column = 'operation'
): void {
$this->assertDatabaseHasLike($table, $column, $value, $connection);
}

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

protected function assertDatabaseOperationDoesntLike(string $table, $value, $connection = null, string $column = 'operation'): void
{
protected function assertDatabaseOperationDoesntLike(
string $table,
$value,
$connection = null,
string $column = 'operation'
): void {
$this->assertDatabaseDoesntLike($table, $column, $value, $connection);
}

Expand Down
4 changes: 2 additions & 2 deletions tests/fixtures/app/async/2021_04_06_212742_every_time.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
use DragonCode\LaravelDeployOperations\Operation;
use Illuminate\Database\Query\Builder;
use Illuminate\Support\Facades\DB;
use Ramsey\Uuid\Uuid;
use Illuminate\Support\Str;

return new class extends Operation {
public function __invoke(): void
{
$this->table()->insert([
'value' => Uuid::uuid4(),
'value' => Str::random(4),
]);
}

Expand Down
4 changes: 2 additions & 2 deletions tests/fixtures/app/async/2023_04_06_212637_foo_bar.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
use DragonCode\LaravelDeployOperations\Operation;
use Illuminate\Database\Query\Builder;
use Illuminate\Support\Facades\DB;
use Ramsey\Uuid\Uuid;
use Illuminate\Support\Str;

return new class extends Operation {
public function __invoke(): void
{
$this->table()->insert([
'value' => Uuid::uuid4(),
'value' => Str::random(4),
]);
}

Expand Down
4 changes: 2 additions & 2 deletions tests/fixtures/app/operations/2020_12_07_153105_foo_bar.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
use DragonCode\LaravelDeployOperations\Operation;
use Illuminate\Database\Query\Builder;
use Illuminate\Support\Facades\DB;
use Ramsey\Uuid\Uuid;
use Illuminate\Support\Str;

return new class extends Operation {
public function up(): void
{
$this->table()->insert([
'value' => Uuid::uuid4(),
'value' => Str::random(4),
]);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
use DragonCode\LaravelDeployOperations\Operation;
use Illuminate\Database\Query\Builder;
use Illuminate\Support\Facades\DB;
use Ramsey\Uuid\Uuid;
use Illuminate\Support\Str;

return new class extends Operation {
public function up(): void
{
$this->table()->insert([
'value' => Uuid::uuid4(),
'value' => Str::random(4),
]);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@
use DragonCode\LaravelDeployOperations\Operation;
use Illuminate\Database\Query\Builder;
use Illuminate\Support\Facades\DB;
use Ramsey\Uuid\Uuid;
use Illuminate\Support\Str;

return new class extends Operation {
public function up(): void
{
$this->table()->insert([
'value' => Uuid::uuid4(),
'value' => Str::random(4),
]);
}

public function down(): void
{
$this->table()->insert([
'value' => Uuid::uuid4(),
'value' => Str::random(4),
]);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@
use DragonCode\LaravelDeployOperations\Operation;
use Illuminate\Database\Query\Builder;
use Illuminate\Support\Facades\DB;
use Ramsey\Uuid\Uuid;
use Illuminate\Support\Str;

return new class extends Operation {
public function up(): void
{
$this->table()->insert([
'value' => Uuid::uuid4(),
'value' => Str::random(4),
]);
}

public function down(): void
{
$this->table()->insert([
'value' => Uuid::uuid4(),
'value' => Str::random(4),
]);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@
use DragonCode\LaravelDeployOperations\Operation;
use Illuminate\Database\Query\Builder;
use Illuminate\Support\Facades\DB;
use Ramsey\Uuid\Uuid;
use Illuminate\Support\Str;

return new class extends Operation {
public function up(): void
{
$this->table()->insert([
'value' => Uuid::uuid4(),
'value' => Str::random(4),
]);
}

public function down(): void
{
$this->table()->insert([
'value' => Uuid::uuid4(),
'value' => Str::random(4),
]);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@
use DragonCode\LaravelDeployOperations\Operation;
use Illuminate\Database\Query\Builder;
use Illuminate\Support\Facades\DB;
use Ramsey\Uuid\Uuid;
use Illuminate\Support\Str;

return new class extends Operation {
public function up(): void
{
$this->table()->insert([
'value' => Uuid::uuid4(),
'value' => Str::random(4),
]);
}

public function down(): void
{
$this->table()->insert([
'value' => Uuid::uuid4(),
'value' => Str::random(4),
]);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@
use DragonCode\LaravelDeployOperations\Operation;
use Illuminate\Database\Query\Builder;
use Illuminate\Support\Facades\DB;
use Ramsey\Uuid\Uuid;
use Illuminate\Support\Str;

return new class extends Operation {
public function up(): void
{
$this->table()->insert([
'value' => Uuid::uuid4(),
'value' => Str::random(4),
]);
}

public function down(): void
{
$this->table()->insert([
'value' => Uuid::uuid4(),
'value' => Str::random(4),
]);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@
use DragonCode\LaravelDeployOperations\Operation;
use Illuminate\Database\Query\Builder;
use Illuminate\Support\Facades\DB;
use Ramsey\Uuid\Uuid;
use Illuminate\Support\Str;

return new class extends Operation {
public function up(): void
{
$this->table()->insert([
'value' => Uuid::uuid4(),
'value' => Str::random(4),
]);
}

public function down(): void
{
$this->table()->insert([
'value' => Uuid::uuid4(),
'value' => Str::random(4),
]);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@
use DragonCode\LaravelDeployOperations\Operation;
use Illuminate\Database\Query\Builder;
use Illuminate\Support\Facades\DB;
use Ramsey\Uuid\Uuid;
use Illuminate\Support\Str;

return new class extends Operation {
public function up(): void
{
$this->table()->insert([
'value' => Uuid::uuid4(),
'value' => Str::random(4),
]);
}

public function down(): void
{
$this->table()->insert([
'value' => Uuid::uuid4(),
'value' => Str::random(4),
]);
}

Expand Down
6 changes: 3 additions & 3 deletions tests/fixtures/app/operations/2021_10_26_143247_run_allow.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@
use DragonCode\LaravelDeployOperations\Operation;
use Illuminate\Database\Query\Builder;
use Illuminate\Support\Facades\DB;
use Ramsey\Uuid\Uuid;
use Illuminate\Support\Str;

return new class extends Operation {
public function up(): void
{
$this->table()->insert([
'value' => Uuid::uuid4(),
'value' => Str::random(4),
]);
}

public function down(): void
{
$this->table()->insert([
'value' => Uuid::uuid4(),
'value' => Str::random(4),
]);
}

Expand Down
Loading