Skip to content

Commit

Permalink
Support PHP 8.4 (#25)
Browse files Browse the repository at this point in the history
* php84: use PHP 8.4

* php84: use php_random.h PHP >= 8.4

* php84: test: PHP_ZTS is now bool

* update CHANGELOG.md

* php84: ci: update actions

* php84: lower coverage

* php84: update composer.json

* php84: remove psalm
  • Loading branch information
zeriyoshi authored Nov 25, 2024
1 parent 276e0fc commit caa89ca
Show file tree
Hide file tree
Showing 13 changed files with 18 additions and 189 deletions.
2 changes: 1 addition & 1 deletion .github/octocov.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
coverage:
paths:
- ../lcov.info
acceptable: current >= 60%
acceptable: current >= 50%
testExecutionTime:
if: false
comment:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
matrix:
platform: ['linux/amd64', 'linux/arm64/v8', 'linux/s390x']
version: ['8.1', '8.2', '8.3']
version: ['8.1', '8.2', '8.3', '8.4']
type: ['cli', 'zts']
distro: ['bookworm', 'alpine']
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
version: ['8.3']
version: ['8.4']
type: ['cli', 'zts']
distro: ['bookworm']
outputs:
Expand Down
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# 11.0.2-dev
# 11.0.3
- Add support for PHP 8.4

# 11.0.2
- Add official support for PHP 8.3
- Upgrade pskel

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARG PLATFORM=${BUILDPLATFORM:-linux/amd64}
ARG IMAGE=php
ARG TAG=8.3-cli-bookworm
ARG TAG=8.4-cli-bookworm

FROM --platform=${PLATFORM} ${IMAGE}:${TAG}

Expand Down
4 changes: 1 addition & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,12 @@
}
},
"require": {
"php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0"
"php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.1"
},
"require-dev": {
"phpunit/phpunit": "^9.6.18",
"phpstan/phpstan": "^1.10.65",
"vimeo/psalm": "^5.23.1",
"phpstan/phpstan-phpunit": "^1.3.16",
"psalm/plugin-phpunit": "^0.19",
"php-cs-fixer/shim": "^3.52.1",
"rector/rector": "^1.0.3"
},
Expand Down
7 changes: 6 additions & 1 deletion ext/php_colopl_bc.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@
#define PHP_COLOPL_BC_H

#include "php.h"

#if PHP_VERSION_ID < 80400
#include "ext/standard/php_lcg.h"
#else
#include "ext/random/php_random.h"
#endif

#include "php_colopl_bc_php70.h"
#include "php_colopl_bc_php74.h"
Expand All @@ -37,7 +42,7 @@ extern zend_module_entry colopl_bc_module_entry;
#define COLOPL_BC_PHP74_SORT_MODE_DEPRECATED 1
#define COLOPL_BC_PHP74_SORT_MODE_LOG 2

#define PHP_COLOPL_BC_VERSION "11.0.2"
#define PHP_COLOPL_BC_VERSION "11.0.3"

ZEND_BEGIN_MODULE_GLOBALS(colopl_bc)
bool rand_is_seeded;
Expand Down
2 changes: 1 addition & 1 deletion ext/tests/php70/array_rand_zts.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ colopl_bc
date.timezone=UTC
--SKIPIF--
<?php
if (PHP_ZTS === 0) print 'skip NTS not supported';
if (PHP_ZTS === 0 || PHP_ZTS === false) print 'skip NTS not supported';
?>
--FILE--
<?php
Expand Down
2 changes: 1 addition & 1 deletion ext/tests/php70/shuffle_zts.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ colopl_bc
date.timezone=UTC
--SKIPIF--
<?php
if (PHP_ZTS === 0) print 'skip NTS not supported';
if (PHP_ZTS === 0 || PHP_ZTS === false) print 'skip NTS not supported';
?>
--FILE--
<?php
Expand Down
2 changes: 1 addition & 1 deletion ext/tests/php70/str_shuffle_zts.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ colopl_bc
date.timezone=UTC
--SKIPIF--
<?php
if (PHP_ZTS === 0) print 'skip NTS not supported';
if (PHP_ZTS === 0 || PHP_ZTS === false) print 'skip NTS not supported';
?>
--FILE--
<?php
Expand Down
1 change: 0 additions & 1 deletion library_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,4 @@ cd "/project"
composer install
composer exec -- phpunit "tests"
composer exec -- phpstan
composer exec -- psalm
cd -
156 changes: 0 additions & 156 deletions psalm-baseline.xml

This file was deleted.

20 changes: 0 additions & 20 deletions psalm.xml

This file was deleted.

0 comments on commit caa89ca

Please sign in to comment.