Skip to content

Commit b16fd89

Browse files
authored
Support for PHP 8.3. Dropped support for Laravel 9 (#513)
* Support for PHP 8.3. Dropped support for Laravel 9 * Fixed HTTP tests * Update run-tests.yml * Update AddFilterTest.php * Update run-tests.yml * Update run-tests.yml
1 parent 15a9469 commit b16fd89

File tree

5 files changed

+21
-48
lines changed

5 files changed

+21
-48
lines changed

.github/workflows/run-tests.yml

+3-13
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,13 @@ jobs:
1111
fail-fast: true
1212
matrix:
1313
os: [ubuntu-20.04]
14-
php: [8.2, 8.1]
15-
laravel: [10.*, 9.*]
14+
php: [8.3, 8.2, 8.1]
15+
laravel: [10.*]
1616
ffmpeg: [5.0, 4.4]
1717
dependency-version: [prefer-lowest, prefer-stable]
1818
include:
1919
- laravel: 10.*
2020
testbench: 8.*
21-
- laravel: 9.*
22-
testbench: 7.*
2321

2422
name: ${{ matrix.os }} - P${{ matrix.php }} - L${{ matrix.laravel }} - FF${{ matrix.ffmpeg }} - ${{ matrix.dependency-version }}
2523

@@ -53,15 +51,7 @@ jobs:
5351
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}-dep-${{ matrix.dependency-version }}
5452

5553
- name: Execute tests
56-
run: vendor/bin/phpunit --stop-on-error --stop-on-failure --order-by random
57-
if: matrix.os == 'ubuntu-20.04'
54+
run: vendor/bin/phpunit --order-by random
5855
env:
5956
FFMPEG_TEMPORARY_FILES_ROOT: ${{ github.workspace }}
6057
FFMPEG_TEMPORARY_ENCRYPTED_HLS: /dev/shm
61-
62-
- name: Execute tests
63-
run: vendor/bin/phpunit --stop-on-error --stop-on-failure --order-by random
64-
if: matrix.os == 'windows-2019'
65-
env:
66-
FFMPEG_TEMPORARY_FILES_ROOT: ${{ github.workspace }}
67-
FFMPEG_TEMPORARY_ENCRYPTED_HLS: ${{ github.workspace }}

composer.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,19 @@
2020
}
2121
],
2222
"require": {
23-
"php": "^8.1|^8.2",
24-
"illuminate/contracts": "^9.0|^10.0",
25-
"php-ffmpeg/php-ffmpeg": "^1.1",
26-
"ramsey/collection": "^1.0|^2.0"
23+
"php": "^8.1|^8.2|^8.3",
24+
"illuminate/contracts": "^10.0",
25+
"php-ffmpeg/php-ffmpeg": "^1.2",
26+
"ramsey/collection": "^2.0"
2727
},
2828
"require-dev": {
2929
"league/flysystem-memory": "^3.10",
3030
"mockery/mockery": "^1.4.4",
3131
"nesbot/carbon": "^2.66",
32-
"orchestra/testbench": "^7.0|^8.0",
33-
"phpunit/phpunit": "^9.5.10",
32+
"orchestra/testbench": "^8.0",
33+
"phpunit/phpunit": "^10.4",
3434
"spatie/image": "^2.2",
35-
"spatie/phpunit-snapshot-assertions": "^4.2"
35+
"spatie/phpunit-snapshot-assertions": "^5.0"
3636
},
3737
"autoload": {
3838
"psr-4": {

phpunit.xml.dist

+5-22
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,12 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phpunit bootstrap="vendor/autoload.php"
3-
backupGlobals="false"
4-
backupStaticAttributes="false"
5-
colors="true"
6-
verbose="true"
7-
convertErrorsToExceptions="true"
8-
convertNoticesToExceptions="true"
9-
convertWarningsToExceptions="true"
10-
processIsolation="false"
11-
stopOnFailure="false">
3+
backupGlobals="false"
4+
colors="true"
5+
processIsolation="false"
6+
stopOnFailure="false">
127
<testsuites>
138
<testsuite name="FFMpeg Test Suite">
149
<directory>tests</directory>
1510
</testsuite>
1611
</testsuites>
17-
<filter>
18-
<whitelist>
19-
<directory suffix=".php">src/</directory>
20-
</whitelist>
21-
</filter>
22-
<logging>
23-
<log type="tap" target="build/report.tap"/>
24-
<log type="junit" target="build/report.junit.xml"/>
25-
<log type="coverage-html" target="build/coverage" charset="UTF-8" yui="true" highlight="true"/>
26-
<log type="coverage-text" target="build/coverage.txt"/>
27-
<log type="coverage-clover" target="build/logs/clover.xml"/>
28-
</logging>
29-
</phpunit>
12+
</phpunit>

tests/AddFilterTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
use ProtoneMedia\LaravelFFMpeg\Filters\WatermarkFactory;
1616
use ProtoneMedia\LaravelFFMpeg\MediaOpener;
1717

18-
class AddFilter extends TestCase
18+
class AddFilterTest extends TestCase
1919
{
2020
/** @test */
2121
public function it_can_add_a_filter_using_a_closure()

tests/TileTest.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@
1010

1111
class TileTest extends TestCase
1212
{
13+
public static function provideThumbnailAmount()
14+
{
15+
return array_map(fn ($i) => [$i], range(1, 10));
16+
}
17+
1318
/** @test */
1419
public function it_has_a_tile_filter()
1520
{
@@ -94,11 +99,6 @@ public function it_can_generate_thumbnails_with_a_specified_quality()
9499
);
95100
}
96101

97-
public function provideThumbnailAmount()
98-
{
99-
return array_map(fn ($i) => [$i], range(1, 10));
100-
}
101-
102102
/** @test */
103103
public function it_has_a_tile_filter_and_can_store_the_vtt_file()
104104
{

0 commit comments

Comments
 (0)