Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion .github/workflows/quality-assurance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php: [ '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ]
php: [ '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5' ]
composer-flags: [ '' ]
phpunit-flags: [ '--coverage-text' ]
steps:
Expand All @@ -23,3 +23,18 @@ jobs:
tools: composer:v2
- run: composer install --no-progress ${{ matrix.composer-flags }}
- run: vendor/bin/phpunit ${{ matrix.phpunit-flags }}
phpstan:
name: PHPStan checks on ${{ matrix.php }}
runs-on: ubuntu-latest
strategy:
matrix:
php: [ '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5' ]
steps:
- uses: actions/checkout@v2
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: xdebug
tools: composer:v2
- run: composer install --no-progress
- run: vendor/bin/phpstan
22 changes: 22 additions & 0 deletions MAINTENANCE-TERMS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Maintenance Terms

Current as of 2025

The code, text and data in this repository are provided as-is under
the terms of the repository's LICENSE.md file, as a gift to the commons
and the common good. In providing this software as-is, its author(s)
admit no further obligations from anyone using the software for any reason,
particularly with respect to:

- Response time,
- Change review and integration,
- Disclosure schedules,
- Discretionary, proprietary or otherwise secretive communications, and
- Any other non-contractual obligations or conventions, regardless of
their presumed urgency or severity.

The author(s) hope you find it valuable on those terms.

Terms created by Mike Hoye - mhoye, 2025

Original: https://github.com/mhoye/maintenance-terms
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
compose_command = docker-compose run -u $(id -u ${USER}):$(id -g ${USER}) --rm php81
compose_command = docker compose run -u $(id -u ${USER}):$(id -g ${USER}) --rm php81

build:
docker-compose build
docker compose build

shell: build
$(compose_command) bash

destroy:
docker-compose down -v
docker compose down -v

composer: build
$(compose_command) composer install
Expand Down
11 changes: 8 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,20 @@
"phpunit/phpunit": "^7.0 || ^8.0 || ^9.0",
"psr/http-factory": "^1.0",
"psr/http-message": "1.*",
"phpstan/phpstan": "^1.3"
"phpstan/phpstan": "^2.1"
},
"extra": {
"branch-alias": {
"dev-master": "2.0.x-dev"
}
},
"scripts": {
"test": "php vendor/bin/phpunit",
"test-coverage": "php vendor/bin/phpunit --coverage-html coverage"
"test": "XDEBUG_MODE=develop,debug phpunit",
"phpstan": "php -d memory_limit=256M vendor/bin/phpstan",
"coverage": "XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-text",
"all-checks": [
"@test",
"@phpstan"
]
}
}
1 change: 0 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
# Run "docker-compose down -v" to fully wipe everything and start over.
# Run "docker-compose run -u $(id -u ${USER}):$(id -g ${USER}) --rm php80 bash" to log into the container to run tests selectively.

version: "3"
services:
php81:
build: ./docker/php/81
Expand Down
2 changes: 1 addition & 1 deletion src/JsonException.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public static function fromJsonError(int $jsonError, $failedValue): self
/**
* @param mixed $failedValue
*/
public function __construct(string $message = '', int $code = 0, \Throwable $previous = null, $failedValue = null)
public function __construct(string $message = '', int $code = 0, ?\Throwable $previous = null, $failedValue = null)
{
parent::__construct($message, $code, $previous);
$this->setFailedValue($failedValue);
Expand Down
2 changes: 1 addition & 1 deletion src/JsonParseException.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class JsonParseException extends JsonException
* This version forces a string for $failedValue, as that's the only thing that
* could fail to parse, since that's all you can even try to parse.
*/
public function __construct(string $message = '', int $code = 0, \Throwable $previous = null, string $failedValue = '')
public function __construct(string $message = '', int $code = 0, ?\Throwable $previous = null, string $failedValue = '')
{
parent::__construct($message, $code, $previous);
$this->setFailedValue($failedValue);
Expand Down