Skip to content

Commit

Permalink
Support for PHP 8.4, dropped support for PHP < 7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
halaxa committed Oct 7, 2024
1 parent bd675a3 commit 779d58c
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 36 deletions.
5 changes: 2 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion build/build-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
20 changes: 0 additions & 20 deletions build/composer-lt-7.2.json

This file was deleted.

10 changes: 2 additions & 8 deletions build/composer-update.sh
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"sort-packages": true
},
"require": {
"php": "7.0 - 8.3"
"php": "7.2 - 8.4"
},
"require-dev": {
"ext-json": "*",
Expand Down
2 changes: 1 addition & 1 deletion src/ItemsOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ private function opt_pointer($pointer)
return $pointer;
}

private function opt_decoder(ItemDecoder $decoder = null)
private function opt_decoder(?ItemDecoder $decoder = null)
{
return $decoder;
}
Expand Down
4 changes: 2 additions & 2 deletions src/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit 779d58c

Please sign in to comment.