Skip to content

Commit 3238c2f

Browse files
committed
v0.5.0: modernize deps, commit lockfile, add PHP 7.4-8.5 CI matrix
- Bump minimum PHP to 7.4; bump defuse/php-encryption to ^2.4 - Replace abandoned PHPUnit ^5.6 with ^9.6 and satooshi/php-coveralls with php-coveralls/php-coveralls ^2.7 (closes open vulnerability) - Commit composer.lock so Dependabot can raise dependency PRs - Rewrite CI as a PHP 7.4-8.5 matrix using shivammathur/setup-php; CI now actually runs PHPUnit (previously only PHPStan ran) - Split static analysis into its own job on PHP 8.3 - Annotate Manager session-handler methods with #[\ReturnTypeWillChange] to silence PHP 8.1+ tentative-return-type deprecations - Drop .travis.yml; drop "version" field from composer.json
1 parent c36e838 commit 3238c2f

8 files changed

Lines changed: 3957 additions & 57 deletions

File tree

.github/workflows/ci.yml

Lines changed: 67 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,74 @@
11
name: CI
22

3-
on: [push]
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
48

59
jobs:
6-
build-test:
10+
test:
11+
name: PHPUnit (PHP ${{ matrix.php }})
12+
runs-on: ubuntu-latest
13+
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
php: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5']
18+
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- name: Setup PHP ${{ matrix.php }}
23+
uses: shivammathur/setup-php@v2
24+
with:
25+
php-version: ${{ matrix.php }}
26+
extensions: mbstring, openssl, sodium
27+
coverage: xdebug
28+
tools: composer:v2
29+
30+
- name: Validate composer.json and composer.lock
31+
run: composer validate --strict
32+
33+
- name: Cache Composer dependencies
34+
uses: actions/cache@v4
35+
with:
36+
path: vendor
37+
key: composer-${{ matrix.php }}-${{ hashFiles('composer.lock') }}
38+
restore-keys: composer-${{ matrix.php }}-
39+
40+
- name: Install dependencies
41+
run: composer install --prefer-dist --no-progress --no-interaction
42+
43+
- name: Run PHPUnit
44+
run: vendor/bin/phpunit --coverage-clover build/logs/clover.xml
45+
46+
- name: Upload coverage to Coveralls
47+
if: matrix.php == '8.3'
48+
env:
49+
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
50+
run: vendor/bin/php-coveralls -v
51+
continue-on-error: true
52+
53+
static-analysis:
54+
name: PHPStan
755
runs-on: ubuntu-latest
856

957
steps:
10-
- uses: actions/checkout@v2
11-
12-
- name: Install dependencies
13-
uses: php-actions/composer@v6
14-
with:
15-
version: 1
16-
php_version: 7.4
17-
18-
- name: PHPStan Static Analysis
19-
uses: php-actions/phpstan@v3
20-
with:
21-
path: php/
22-
php_version: 7.4
23-
level: 2
58+
- uses: actions/checkout@v4
59+
60+
- name: Setup PHP
61+
uses: shivammathur/setup-php@v2
62+
with:
63+
php-version: '8.3'
64+
tools: composer:v2
65+
66+
- name: Install dependencies
67+
run: composer install --prefer-dist --no-progress --no-interaction
68+
69+
- name: PHPStan Static Analysis
70+
uses: php-actions/phpstan@v3
71+
with:
72+
path: php/
73+
php_version: 8.3
74+
level: 2

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
/vendor/
2-
composer.lock
2+
/build/
3+
.phpunit.result.cache
4+
.phpunit.cache/
5+
.claude/settings.local.json

.travis.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,23 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/)
55
and this project adheres to [Semantic Versioning](http://semver.org/).
66

7+
## 0.5.0 - 2026-04-14
8+
### Changed
9+
- Bumped minimum PHP version to 7.4
10+
- Upgraded `defuse/php-encryption` to `^2.4`
11+
- Upgraded PHPUnit to `^9.6` (replaces abandoned `^5.6`)
12+
- Replaced abandoned `satooshi/php-coveralls` with `php-coveralls/php-coveralls ^2.7`
13+
- Rewrote CI workflow as a PHP 7.4–8.5 matrix using `shivammathur/setup-php`; CI now actually runs PHPUnit in addition to PHPStan
14+
- Annotated `Manager` session-handler methods with `#[\ReturnTypeWillChange]` so PHP 8.1+ no longer emits tentative-return-type deprecations
15+
16+
### Added
17+
- Committed `composer.lock` so Dependabot can raise dependency PRs
18+
- `composer test` / `composer test-coverage` scripts
19+
20+
### Removed
21+
- `.travis.yml` (superseded by GitHub Actions)
22+
- `version` field from `composer.json` (versions are defined by git tags)
23+
724
## 0.4.0 - 2021-07-21
825
### Changed
926
- Add PHPStan static code analysis

composer.json

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
"name": "ericmann/sessionz",
33
"description": "PHP Session Manager Interface",
44
"type": "library",
5-
"version": "0.3.1",
65
"license": "MIT",
76
"authors": [
87
{
@@ -17,11 +16,15 @@
1716
}
1817
},
1918
"require": {
20-
"php": ">=5.6",
21-
"defuse/php-encryption": "^2.0"
19+
"php": ">=7.4",
20+
"defuse/php-encryption": "^2.4"
2221
},
2322
"require-dev": {
24-
"phpunit/phpunit": "^5.6",
25-
"satooshi/php-coveralls": "^1.0"
23+
"phpunit/phpunit": "^9.6",
24+
"php-coveralls/php-coveralls": "^2.7"
25+
},
26+
"scripts": {
27+
"test": "phpunit",
28+
"test-coverage": "phpunit --coverage-clover build/logs/clover.xml"
2629
}
2730
}

0 commit comments

Comments
 (0)