Skip to content

Commit d09c4b9

Browse files
committed
Drop Laravel 10/11 support, upgrade to Pest v4 and Testbench v10
- Narrow illuminate/contracts to ^12.0, orchestra/testbench to ^10.0 - Upgrade pestphp/pest to ^v4.0, pest-plugin-arch and pest-plugin-laravel to ^4.0 - Remove nunomaduro/collision ^7 support (keep ^8.6.1 only) - Update phpunit.xml.dist schema to PHPUnit 12.5 - Remove archived pest-plugin-faker installation step and related test - Update CI matrix: Laravel 12.* / Testbench 10.*, drop nesbot/carbon
1 parent 6c55067 commit d09c4b9

5 files changed

Lines changed: 11 additions & 39 deletions

File tree

.github/workflows/run-tests.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,11 @@ jobs:
1818
matrix:
1919
os: [ubuntu-latest, windows-latest]
2020
php: [8.4, 8.3]
21-
laravel: [11.*]
21+
laravel: [12.*]
2222
stability: [prefer-lowest, prefer-stable]
2323
include:
24-
- laravel: 11.*
25-
testbench: 9.*
26-
carbon: ^2.63
24+
- laravel: 12.*
25+
testbench: 10.*
2726

2827
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
2928

@@ -45,7 +44,7 @@ jobs:
4544
4645
- name: Install dependencies
4746
run: |
48-
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "nesbot/carbon:${{ matrix.os == 'windows-latest' && '^^^' || '' }}${{ matrix.carbon }}" --no-interaction --no-update
47+
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
4948
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
5049
5150
- name: List Installed Dependencies

composer.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,17 @@
1818
"require": {
1919
"php": "^8.3",
2020
"spatie/laravel-package-tools": "^1.19",
21-
"illuminate/contracts": "^10.0||^11.0||^12.0"
21+
"illuminate/contracts": "^12.0"
2222
},
2323
"require-dev": {
2424
"larastan/larastan": "^v3.1",
2525
"laravel/pint": "^v1.21",
2626
"mockery/mockery": "*",
27-
"nunomaduro/collision": "^8.6.1||^7.10.0",
28-
"orchestra/testbench": "^9.11.0||^8.22.0",
29-
"pestphp/pest": "^v3.7.4",
30-
"pestphp/pest-plugin-arch": "^3.0",
31-
"pestphp/pest-plugin-laravel": "^3.1",
27+
"nunomaduro/collision": "^8.6.1",
28+
"orchestra/testbench": "^10.0",
29+
"pestphp/pest": "^v4.0",
30+
"pestphp/pest-plugin-arch": "^4.0",
31+
"pestphp/pest-plugin-laravel": "^4.0",
3232
"phpstan/extension-installer": "^1.4.3",
3333
"phpstan/phpstan-deprecation-rules": "^2.0.0",
3434
"phpstan/phpstan-phpunit": "^2.0.1",

phpunit.xml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phpunit
33
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.3/phpunit.xsd"
4+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/12.5/phpunit.xsd"
55
backupGlobals="false"
66
bootstrap="vendor/autoload.php"
77
colors="true"

src/Commands/InstallCommand.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,6 @@ public function handle(): int
7676
self::fail('❌ Failed to install mockery');
7777
}
7878

79-
$process = Process::run('composer require pestphp/pest-plugin-faker --dev -n');
80-
if ($process->failed()) {
81-
self::fail('❌ Failed to install pest plugin faker');
82-
}
83-
8479
$process = Process::run('composer require pestphp/pest-plugin-laravel --dev -n');
8580
if ($process->failed()) {
8681
self::fail('❌ Failed to install pest plugin laravel');

tests/Feature/InstallCommandTest.php

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,6 @@
268268
Process::assertRan('composer require pestphp/pest --dev --with-all-dependencies -n');
269269
Process::assertRan('./vendor/bin/pest --init');
270270
Process::assertRan('composer require mockery/mockery --dev -n');
271-
Process::assertRan('composer require pestphp/pest-plugin-faker --dev -n');
272271
Process::assertRan('composer require pestphp/pest-plugin-laravel --dev -n');
273272
Process::assertRan('composer require pestphp/pest-plugin-livewire --dev -n');
274273
});
@@ -315,27 +314,6 @@
315314

316315
});
317316

318-
it('fails if cannot install faker', function (): void {
319-
// Arrange
320-
File::shouldReceive('copy')
321-
->andReturn(true);
322-
323-
Process::fake([
324-
'composer require pestphp/pest-plugin-faker --dev*' => Process::result(
325-
exitCode: 1
326-
),
327-
'*' => Process::result( // fake all other commands
328-
exitCode: 0
329-
),
330-
]);
331-
332-
// Act
333-
$this->artisan('laravel-init:install')
334-
->assertExitCode(1)
335-
->expectsOutputToContain('Failed to install pest plugin faker');
336-
337-
});
338-
339317
it('fails if cannot install pest plugin laravel', function (): void {
340318
// Arrange
341319
File::shouldReceive('copy')

0 commit comments

Comments
 (0)