From a71b5b7fddd722cb83d55dc43e45bfd2a088049d Mon Sep 17 00:00:00 2001 From: Pascal Baljet Date: Tue, 2 Jan 2024 11:42:09 +0100 Subject: [PATCH 1/6] Support for PHP 8.3. Dropped support for Laravel 9 --- .github/workflows/run-tests.yml | 6 ++---- composer.json | 14 +++++++------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index ff23a95..cb08421 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -11,15 +11,13 @@ jobs: fail-fast: true matrix: os: [ubuntu-20.04] - php: [8.2, 8.1] - laravel: [10.*, 9.*] + php: [8.3, 8.2, 8.1] + laravel: [10.*] ffmpeg: [5.0, 4.4] dependency-version: [prefer-lowest, prefer-stable] include: - laravel: 10.* testbench: 8.* - - laravel: 9.* - testbench: 7.* name: ${{ matrix.os }} - P${{ matrix.php }} - L${{ matrix.laravel }} - FF${{ matrix.ffmpeg }} - ${{ matrix.dependency-version }} diff --git a/composer.json b/composer.json index a10a280..4ddd225 100755 --- a/composer.json +++ b/composer.json @@ -20,19 +20,19 @@ } ], "require": { - "php": "^8.1|^8.2", - "illuminate/contracts": "^9.0|^10.0", - "php-ffmpeg/php-ffmpeg": "^1.1", - "ramsey/collection": "^1.0|^2.0" + "php": "^8.1|^8.2|^8.3", + "illuminate/contracts": "^10.0", + "php-ffmpeg/php-ffmpeg": "^1.2", + "ramsey/collection": "^2.0" }, "require-dev": { "league/flysystem-memory": "^3.10", "mockery/mockery": "^1.4.4", "nesbot/carbon": "^2.66", - "orchestra/testbench": "^7.0|^8.0", - "phpunit/phpunit": "^9.5.10", + "orchestra/testbench": "^8.0", + "phpunit/phpunit": "^10.4", "spatie/image": "^2.2", - "spatie/phpunit-snapshot-assertions": "^4.2" + "spatie/phpunit-snapshot-assertions": "^5.0" }, "autoload": { "psr-4": { From f4032eecfcff8e57997f02d446e4d0235b6d7224 Mon Sep 17 00:00:00 2001 From: Pascal Baljet Date: Tue, 2 Jan 2024 13:20:03 +0100 Subject: [PATCH 2/6] Fixed HTTP tests --- phpunit.xml.dist | 27 +++++---------------------- tests/TileTest.php | 10 +++++----- 2 files changed, 10 insertions(+), 27 deletions(-) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 3e341f1..8275be5 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,29 +1,12 @@ + backupGlobals="false" + colors="true" + processIsolation="false" + stopOnFailure="false"> tests - - - src/ - - - - - - - - - - + \ No newline at end of file diff --git a/tests/TileTest.php b/tests/TileTest.php index be7ed69..7598c8f 100644 --- a/tests/TileTest.php +++ b/tests/TileTest.php @@ -10,6 +10,11 @@ class TileTest extends TestCase { + public static function provideThumbnailAmount() + { + return array_map(fn ($i) => [$i], range(1, 10)); + } + /** @test */ public function it_has_a_tile_filter() { @@ -94,11 +99,6 @@ public function it_can_generate_thumbnails_with_a_specified_quality() ); } - public function provideThumbnailAmount() - { - return array_map(fn ($i) => [$i], range(1, 10)); - } - /** @test */ public function it_has_a_tile_filter_and_can_store_the_vtt_file() { From e22380ba67617dd46a6ffa0c0b0a2581a98d9364 Mon Sep 17 00:00:00 2001 From: Pascal Baljet Date: Tue, 2 Jan 2024 13:23:51 +0100 Subject: [PATCH 3/6] Update run-tests.yml --- .github/workflows/run-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index cb08421..a908862 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -13,7 +13,7 @@ jobs: os: [ubuntu-20.04] php: [8.3, 8.2, 8.1] laravel: [10.*] - ffmpeg: [5.0, 4.4] + ffmpeg: [6.1, 5.1, 4.4] dependency-version: [prefer-lowest, prefer-stable] include: - laravel: 10.* @@ -33,7 +33,7 @@ jobs: coverage: none - name: Install FFmpeg - uses: Iamshankhadeep/setup-ffmpeg@ffmpeg-5.0-20220119 + uses: AnimMouse/setup-ffmpeg@v1 with: token: ${{ secrets.CI_GITHUB_TOKEN }} version: ${{ matrix.ffmpeg }} From 730691eca82019ac3623eb43e523c29c65cee582 Mon Sep 17 00:00:00 2001 From: Pascal Baljet Date: Tue, 2 Jan 2024 13:28:03 +0100 Subject: [PATCH 4/6] Update AddFilterTest.php --- tests/AddFilterTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/AddFilterTest.php b/tests/AddFilterTest.php index 5a8f859..eebe892 100644 --- a/tests/AddFilterTest.php +++ b/tests/AddFilterTest.php @@ -15,7 +15,7 @@ use ProtoneMedia\LaravelFFMpeg\Filters\WatermarkFactory; use ProtoneMedia\LaravelFFMpeg\MediaOpener; -class AddFilter extends TestCase +class AddFilterTest extends TestCase { /** @test */ public function it_can_add_a_filter_using_a_closure() From 73f3d85fbcbee4e89ced5872ffebaf759ff89514 Mon Sep 17 00:00:00 2001 From: Pascal Baljet Date: Tue, 2 Jan 2024 13:35:00 +0100 Subject: [PATCH 5/6] Update run-tests.yml --- .github/workflows/run-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index a908862..cb08421 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -13,7 +13,7 @@ jobs: os: [ubuntu-20.04] php: [8.3, 8.2, 8.1] laravel: [10.*] - ffmpeg: [6.1, 5.1, 4.4] + ffmpeg: [5.0, 4.4] dependency-version: [prefer-lowest, prefer-stable] include: - laravel: 10.* @@ -33,7 +33,7 @@ jobs: coverage: none - name: Install FFmpeg - uses: AnimMouse/setup-ffmpeg@v1 + uses: Iamshankhadeep/setup-ffmpeg@ffmpeg-5.0-20220119 with: token: ${{ secrets.CI_GITHUB_TOKEN }} version: ${{ matrix.ffmpeg }} From 722628d650fb984997e2c0c06824184e603d280c Mon Sep 17 00:00:00 2001 From: Pascal Baljet Date: Tue, 2 Jan 2024 17:08:42 +0100 Subject: [PATCH 6/6] Update run-tests.yml --- .github/workflows/run-tests.yml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index cb08421..93a1e10 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -51,15 +51,7 @@ jobs: key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}-dep-${{ matrix.dependency-version }} - name: Execute tests - run: vendor/bin/phpunit --stop-on-error --stop-on-failure --order-by random - if: matrix.os == 'ubuntu-20.04' + run: vendor/bin/phpunit --order-by random env: FFMPEG_TEMPORARY_FILES_ROOT: ${{ github.workspace }} FFMPEG_TEMPORARY_ENCRYPTED_HLS: /dev/shm - - - name: Execute tests - run: vendor/bin/phpunit --stop-on-error --stop-on-failure --order-by random - if: matrix.os == 'windows-2019' - env: - FFMPEG_TEMPORARY_FILES_ROOT: ${{ github.workspace }} - FFMPEG_TEMPORARY_ENCRYPTED_HLS: ${{ github.workspace }}