Skip to content

Commit bf80bf2

Browse files
authored
Merge pull request #43 from Crell/maintenance
Maintenance updates
2 parents b41d66d + 4474dc3 commit bf80bf2

File tree

7 files changed

+51
-10
lines changed

7 files changed

+51
-10
lines changed

.github/workflows/quality-assurance.yaml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
php: [ '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ]
14+
php: [ '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5' ]
1515
composer-flags: [ '' ]
1616
phpunit-flags: [ '--coverage-text' ]
1717
steps:
@@ -23,3 +23,18 @@ jobs:
2323
tools: composer:v2
2424
- run: composer install --no-progress ${{ matrix.composer-flags }}
2525
- run: vendor/bin/phpunit ${{ matrix.phpunit-flags }}
26+
phpstan:
27+
name: PHPStan checks on ${{ matrix.php }}
28+
runs-on: ubuntu-latest
29+
strategy:
30+
matrix:
31+
php: [ '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5' ]
32+
steps:
33+
- uses: actions/checkout@v2
34+
- uses: shivammathur/setup-php@v2
35+
with:
36+
php-version: ${{ matrix.php }}
37+
coverage: xdebug
38+
tools: composer:v2
39+
- run: composer install --no-progress
40+
- run: vendor/bin/phpstan

MAINTENANCE-TERMS.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Maintenance Terms
2+
3+
Current as of 2025
4+
5+
The code, text and data in this repository are provided as-is under
6+
the terms of the repository's LICENSE.md file, as a gift to the commons
7+
and the common good. In providing this software as-is, its author(s)
8+
admit no further obligations from anyone using the software for any reason,
9+
particularly with respect to:
10+
11+
- Response time,
12+
- Change review and integration,
13+
- Disclosure schedules,
14+
- Discretionary, proprietary or otherwise secretive communications, and
15+
- Any other non-contractual obligations or conventions, regardless of
16+
their presumed urgency or severity.
17+
18+
The author(s) hope you find it valuable on those terms.
19+
20+
Terms created by Mike Hoye - mhoye, 2025
21+
22+
Original: https://github.com/mhoye/maintenance-terms

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
compose_command = docker-compose run -u $(id -u ${USER}):$(id -g ${USER}) --rm php81
1+
compose_command = docker compose run -u $(id -u ${USER}):$(id -g ${USER}) --rm php81
22

33
build:
4-
docker-compose build
4+
docker compose build
55

66
shell: build
77
$(compose_command) bash
88

99
destroy:
10-
docker-compose down -v
10+
docker compose down -v
1111

1212
composer: build
1313
$(compose_command) composer install

composer.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,20 @@
3232
"phpunit/phpunit": "^7.0 || ^8.0 || ^9.0",
3333
"psr/http-factory": "^1.0",
3434
"psr/http-message": "1.*",
35-
"phpstan/phpstan": "^1.3"
35+
"phpstan/phpstan": "^2.1"
3636
},
3737
"extra": {
3838
"branch-alias": {
3939
"dev-master": "2.0.x-dev"
4040
}
4141
},
4242
"scripts": {
43-
"test": "php vendor/bin/phpunit",
44-
"test-coverage": "php vendor/bin/phpunit --coverage-html coverage"
43+
"test": "XDEBUG_MODE=develop,debug phpunit",
44+
"phpstan": "php -d memory_limit=256M vendor/bin/phpstan",
45+
"coverage": "XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-text",
46+
"all-checks": [
47+
"@test",
48+
"@phpstan"
49+
]
4550
}
4651
}

docker-compose.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
# Run "docker-compose down -v" to fully wipe everything and start over.
66
# Run "docker-compose run -u $(id -u ${USER}):$(id -g ${USER}) --rm php80 bash" to log into the container to run tests selectively.
77

8-
version: "3"
98
services:
109
php81:
1110
build: ./docker/php/81

src/JsonException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public static function fromJsonError(int $jsonError, $failedValue): self
6161
/**
6262
* @param mixed $failedValue
6363
*/
64-
public function __construct(string $message = '', int $code = 0, \Throwable $previous = null, $failedValue = null)
64+
public function __construct(string $message = '', int $code = 0, ?\Throwable $previous = null, $failedValue = null)
6565
{
6666
parent::__construct($message, $code, $previous);
6767
$this->setFailedValue($failedValue);

src/JsonParseException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class JsonParseException extends JsonException
1212
* This version forces a string for $failedValue, as that's the only thing that
1313
* could fail to parse, since that's all you can even try to parse.
1414
*/
15-
public function __construct(string $message = '', int $code = 0, \Throwable $previous = null, string $failedValue = '')
15+
public function __construct(string $message = '', int $code = 0, ?\Throwable $previous = null, string $failedValue = '')
1616
{
1717
parent::__construct($message, $code, $previous);
1818
$this->setFailedValue($failedValue);

0 commit comments

Comments
 (0)