Skip to content

Commit 0a2c04f

Browse files
authored
Merge pull request #2 from bensquire/claude/php-version-upgrade-011CUoL9KGfLh5K7ajm2dPNc
Upgraded PHP requirement to 8.3+ with modern features
2 parents f313585 + ef8d3f7 commit 0a2c04f

File tree

8 files changed

+1237
-437
lines changed

8 files changed

+1237
-437
lines changed

.github/workflows/tests.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [ main, master ]
6+
pull_request:
7+
branches: [ main, master ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
php-version: ['8.3']
17+
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v4
21+
22+
- name: Setup PHP
23+
uses: shivammathur/setup-php@v2
24+
with:
25+
php-version: ${{ matrix.php-version }}
26+
extensions: gd, hash
27+
coverage: none
28+
29+
- name: Validate composer.json and composer.lock
30+
run: composer validate --strict
31+
32+
- name: Cache Composer packages
33+
id: composer-cache
34+
uses: actions/cache@v4
35+
with:
36+
path: vendor
37+
key: ${{ runner.os }}-php-${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }}
38+
restore-keys: |
39+
${{ runner.os }}-php-${{ matrix.php-version }}-
40+
41+
- name: Install dependencies
42+
run: composer install --prefer-dist --no-progress
43+
44+
- name: Run test suite
45+
run: vendor/bin/phpunit

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
vendor/
22
build/
3+
.phpunit.cache/
4+
composer.lock

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@
1717
"wiki": "https://github.com/bensquire/php-color-extractor/wiki"
1818
},
1919
"require": {
20-
"php": ">=5.6.0",
21-
"ext-hash": "*"
20+
"php": "^8.3 || ^8.4",
21+
"ext-gd": "*"
2222
},
2323
"require-dev": {
24-
"phpunit/phpunit": "5.*"
24+
"phpunit/phpunit": "^11.0"
2525
},
2626
"autoload": {
27-
"psr-0": {
28-
"PHPColorExtractor": "src/"
27+
"psr-4": {
28+
"PHPColorExtractor\\": "src/PHPColorExtractor/"
2929
}
3030
}
3131
}

0 commit comments

Comments
 (0)