mirror of
https://github.com/halaxa/json-machine.git
synced 2025-01-16 20:48:17 +01:00
Support for PHP 8.4, dropped support for PHP < 7.2
This commit is contained in:
parent
bd675a3ecd
commit
779d58c4f9
5
Makefile
5
Makefile
@ -5,15 +5,14 @@ LATEST_PHP := 8.0 3.1.1
|
||||
COVERAGE_PHP := 7.4 3.1.1
|
||||
|
||||
define PHP_VERSIONS
|
||||
"7.0 2.7.2"\
|
||||
"7.1 2.9.8"\
|
||||
"7.2 3.1.1"\
|
||||
"7.3 3.1.1"\
|
||||
"7.4 3.1.1"\
|
||||
"8.0 3.1.1"\
|
||||
"8.1 3.1.1"\
|
||||
"8.2 3.2.0"\
|
||||
"8.3-rc 3.3.0alpha3"
|
||||
"8.3 3.3.2"\
|
||||
"8.4-rc 3.4.0beta1"
|
||||
endef
|
||||
|
||||
define DOCKER_RUN
|
||||
|
@ -37,7 +37,7 @@ printf "
|
||||
&& pecl install xdebug-$XDEBUG_VERSION \
|
||||
&& docker-php-ext-enable xdebug \
|
||||
&& docker-php-ext-enable opcache \
|
||||
&& wget https://getcomposer.org/download/2.2.18/composer.phar -O /usr/local/bin/composer \
|
||||
&& wget https://getcomposer.org/download/2.8.1/composer.phar -O /usr/local/bin/composer \
|
||||
&& chmod +x /usr/local/bin/composer
|
||||
" | docker build --quiet --tag "$CONTAINER_NAME" - > /dev/null
|
||||
|
||||
|
@ -1,20 +0,0 @@
|
||||
{
|
||||
"name": "halaxa/json-machine",
|
||||
"config": {
|
||||
"lock": false,
|
||||
"sort-packages": true
|
||||
},
|
||||
"require": {
|
||||
"php": "<7.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"ext-json": "*",
|
||||
"phpunit/phpunit": "^5.0"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {"JsonMachine\\": "src/"}
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {"JsonMachineTest\\": "test/JsonMachineTest"}
|
||||
}
|
||||
}
|
@ -1,10 +1,4 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
if [ $(php -r "echo PHP_VERSION_ID;") -lt 70200 ]
|
||||
then
|
||||
set -x
|
||||
COMPOSER=build/composer-lt-7.2.json composer --quiet update
|
||||
else
|
||||
set -x
|
||||
composer --quiet update
|
||||
fi
|
||||
set -x
|
||||
composer --quiet update
|
||||
|
@ -21,7 +21,7 @@
|
||||
"sort-packages": true
|
||||
},
|
||||
"require": {
|
||||
"php": "7.0 - 8.3"
|
||||
"php": "7.2 - 8.4"
|
||||
},
|
||||
"require-dev": {
|
||||
"ext-json": "*",
|
||||
|
@ -59,7 +59,7 @@ class ItemsOptions extends \ArrayObject
|
||||
return $pointer;
|
||||
}
|
||||
|
||||
private function opt_decoder(ItemDecoder $decoder = null)
|
||||
private function opt_decoder(?ItemDecoder $decoder = null)
|
||||
{
|
||||
return $decoder;
|
||||
}
|
||||
|
@ -54,11 +54,11 @@ class Parser implements \IteratorAggregate, PositionAware
|
||||
|
||||
/**
|
||||
* @param array|string $jsonPointer Follows json pointer RFC https://tools.ietf.org/html/rfc6901
|
||||
* @param ItemDecoder $jsonDecoder
|
||||
* @param ?ItemDecoder $jsonDecoder
|
||||
*
|
||||
* @throws InvalidArgumentException
|
||||
*/
|
||||
public function __construct(Traversable $tokens, $jsonPointer = '', ItemDecoder $jsonDecoder = null)
|
||||
public function __construct(Traversable $tokens, $jsonPointer = '', ?ItemDecoder $jsonDecoder = null)
|
||||
{
|
||||
$jsonPointers = (new ValidJsonPointers((array) $jsonPointer))->toArray();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user