From 1a94608c4461b2f02e3afbf6a6a68f124811b548 Mon Sep 17 00:00:00 2001 From: Arunas Skirius Date: Wed, 19 Feb 2025 12:39:25 +0200 Subject: [PATCH 1/4] laravel 12 support --- .github/workflows/run-tests.yml | 10 +++++++++- composer.json | 10 +++++----- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index bea62b49..cc8a276b 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -14,15 +14,19 @@ jobs: matrix: os: [ubuntu-latest, windows-latest] php: [8.2, 8.1, 8.0] - laravel: [9.*, 10.*, 11.*] + laravel: [9.*, 10.*, 11.*, 12.*] stability: [prefer-lowest, prefer-stable] exclude: - php: 8.0 laravel: 10.* - php: 8.0 laravel: 11.* + - php: 8.0 + laravel: 12.* - php: 8.1 laravel: 11.* + - php: 8.1 + laravel: 12.* - php: 8.2 laravel: 9.* include: @@ -38,6 +42,10 @@ jobs: testbench: 9.* pest: 2.* collision: 8.* + - laravel: 12.* + testbench: 10.* + pest: 3.* + collision: 8.* name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} diff --git a/composer.json b/composer.json index 0764a0c4..09cf8d17 100644 --- a/composer.json +++ b/composer.json @@ -20,17 +20,17 @@ ], "require": { "php": "^8.0", - "illuminate/contracts": "^8.0|^9.0|^10.0|^11.0", - "opcodesio/mail-parser": "^0.1.6" + "illuminate/contracts": "^8.0|^9.0|^10.0|^11.0|^12.0", + "opcodesio/mail-parser": "^0.1.6|^0.2" }, "require-dev": { "guzzlehttp/guzzle": "^7.2", "itsgoingd/clockwork": "^5.1", "laravel/pint": "^1.0", "nunomaduro/collision": "^7.0|^8.0", - "orchestra/testbench": "^7.6|^8.0|^9.0", - "pestphp/pest": "^2.0", - "pestphp/pest-plugin-laravel": "^2.0", + "orchestra/testbench": "^7.6|^8.0|^9.0|^10.0", + "pestphp/pest": "^2.0|^3.7", + "pestphp/pest-plugin-laravel": "^2.0|^3.1", "spatie/test-time": "^1.3" }, "suggest": { From 543a782c086c7228d3b475c77b927d400897f314 Mon Sep 17 00:00:00 2001 From: Arunas Skirius Date: Wed, 19 Feb 2025 12:47:42 +0200 Subject: [PATCH 2/4] downgrade mail-parser for now --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 09cf8d17..577dd9c7 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,7 @@ "require": { "php": "^8.0", "illuminate/contracts": "^8.0|^9.0|^10.0|^11.0|^12.0", - "opcodesio/mail-parser": "^0.1.6|^0.2" + "opcodesio/mail-parser": "^0.1.6" }, "require-dev": { "guzzlehttp/guzzle": "^7.2", From 068860d5f0bc0e0829c140266a0f913823e2419c Mon Sep 17 00:00:00 2001 From: Arunas Skirius Date: Wed, 19 Feb 2025 12:52:51 +0200 Subject: [PATCH 3/4] fix dummy file creation with unix paths --- tests/Pest.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/Pest.php b/tests/Pest.php index c21ea6fc..a89d8a9b 100644 --- a/tests/Pest.php +++ b/tests/Pest.php @@ -39,6 +39,8 @@ function generateLogFile(?string $fileName = null, ?string $content = null, bool $fileName = \Illuminate\Support\Str::random().'.log'; } + $fileName = str_replace('/', DIRECTORY_SEPARATOR, $fileName); + $path = storage_path('logs'.DIRECTORY_SEPARATOR.$fileName); $folder = dirname($path); From e29baced52b2db051d62b7351255f14128ac482e Mon Sep 17 00:00:00 2001 From: Arunas Skirius Date: Thu, 20 Feb 2025 11:39:36 +0200 Subject: [PATCH 4/4] fix tests for Windows --- tests/Unit/FilePathsTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Unit/FilePathsTest.php b/tests/Unit/FilePathsTest.php index 52dd18fe..a22fa367 100644 --- a/tests/Unit/FilePathsTest.php +++ b/tests/Unit/FilePathsTest.php @@ -120,7 +120,7 @@ expect($files)->toHaveCount(1); $file = $files[0]; expect($file->path)->toBe($originalFile->path) - ->and($file->displayPath)->toBe('TestPath/first.log') + ->and($file->displayPath)->toBe('TestPath'.DIRECTORY_SEPARATOR.'first.log') ->and($file->subFolder)->toBe('TestPath'); }); @@ -136,6 +136,6 @@ expect($files)->toHaveCount(1); $file = $files[0]; expect($file->path)->toBe($originalFile->path) - ->and($file->displayPath)->toBe('TestPath/first.log') + ->and($file->displayPath)->toBe('TestPath'.DIRECTORY_SEPARATOR.'first.log') ->and($file->subFolder)->toBe('TestPath'); });