Skip to content

Commit

Permalink
PHP 8.4 support (#16)
Browse files Browse the repository at this point in the history
* php84: add PHP 8.4 support

* php84: temporary remove psalm

* php84: ci: max-parallel: 10
  • Loading branch information
zeriyoshi authored Nov 25, 2024
1 parent f91efda commit e22647f
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 29 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ jobs:
Linux:
runs-on: ubuntu-latest
strategy:
max-parallel: 10
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
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
6 changes: 2 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@
"description": "Current time modification extension wrapper library.",
"type": "library",
"require": {
"php": "~8.1.0 || ~8.2.0 || ~8.3.0",
"php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.1",
"ext-colopl_timeshifter": "^1.0"
},
"require-dev": {
"phpstan/phpstan": "^1",
"vimeo/psalm": "^5",
"phpunit/phpunit": "^10",
"phpstan/phpstan-phpunit": "^1",
"psalm/plugin-phpunit": "^0.19"
"phpstan/phpstan-phpunit": "^1"
},
"license": "PHP-3.01",
"autoload": {
Expand Down
2 changes: 1 addition & 1 deletion ext/php_colopl_timeshifter.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ bool get_is_hooked();
extern zend_module_entry colopl_timeshifter_module_entry;
# define phpext_colopl_timeshifter_ptr &colopl_timeshifter_module_entry

# define PHP_COLOPL_TIMESHIFTER_VERSION "1.1.6"
# define PHP_COLOPL_TIMESHIFTER_VERSION "1.1.7"

ZEND_BEGIN_MODULE_GLOBALS(colopl_timeshifter)
struct pdo_dbh_methods hooked_mysql_driver_methods;
Expand Down
1 change: 0 additions & 1 deletion library_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,4 @@ cd "/project"
composer install
composer exec -- phpunit "tests"
composer exec -- phpstan
composer exec -- psalm
cd -
17 changes: 0 additions & 17 deletions psalm.xml

This file was deleted.

3 changes: 0 additions & 3 deletions src/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,8 @@ public static function hookDateInterval(\DateInterval $dateInterval): bool
*/
$actualInterval = clone $dateInterval;
if (is_int($actualInterval->days) && $actualInterval->days > 0 && $actualInterval->days !== $actualInterval->d) {
/** @psalm-suppress InaccessibleProperty */
$actualInterval->d = $actualInterval->days;
/** @psalm-suppress InaccessibleProperty */
$actualInterval->y = 0;
/** @psalm-suppress InaccessibleProperty */
$actualInterval->m = 0;
}

Expand Down

0 comments on commit e22647f

Please sign in to comment.