Skip to content

Commit

Permalink
PHP 8.4 (#316)
Browse files Browse the repository at this point in the history
* PHP 8.4

* bumping phpunit minimum

* removing dev package versions
  • Loading branch information
jaydiablo authored Jan 10, 2025
1 parent 61c04c9 commit 97e4e1d
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 13 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ jobs:
fail-fast: false
matrix:
operating-system: [ubuntu-latest]
php-versions: ["8.0", "8.1", "8.2", "8.3"]
php-versions: ["8.0", "8.1", "8.2", "8.3", "8.4"]
composer-args: ["", "--prefer-lowest"]
runs-on: ${{ matrix.operating-system }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@2.30.2
uses: shivammathur/setup-php@2.32.0
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring
Expand Down Expand Up @@ -49,7 +49,7 @@ jobs:
- name: Test
run: composer test-with-coverage
- name: Upload Coverage
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v5
with:
files: ./clover.xml
verbose: true
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"prefer-stable": true,
"require": {
"ext-session": "*",
"php": "~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0",
"php": "~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0",
"diablomedia/zendframework1-exception": "^1.1.1",
"diablomedia/zendframework1-config": "^2.0.5",
"diablomedia/zendframework1-loader": "^1.0.5"
Expand All @@ -30,10 +30,10 @@
}
},
"require-dev": {
"phpunit/phpunit": "^9.6.19 || ^10.5.18",
"phpunit/phpunit": "^9.6.22 || ^10.5.18",
"phpunit/php-code-coverage": "^9.2.26 || ^10.1.14",
"phpstan/phpstan": "1.10.67",
"friendsofphp/php-cs-fixer": "3.54.0",
"phpstan/phpstan": "2.1.1",
"friendsofphp/php-cs-fixer": "3.67.0",
"maglnet/composer-require-checker": "^3.0.0",
"phpro/grumphp-shim": "^2.0.0"
},
Expand Down
3 changes: 3 additions & 0 deletions grumphp.yml.dist
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# grumphp.yml
grumphp:
environment:
variables:
PHP_CS_FIXER_IGNORE_ENV: "true"
tasks:
composer:
strict: true
Expand Down
7 changes: 5 additions & 2 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
parameters:
checkGenericClassInNonGenericObjectType: false
checkMissingIterableValueType: false
treatPhpDocTypesAsCertain: false
level: 8
paths:
- ./
excludePaths:
- %rootDir%/../../../tests/*
- %rootDir%/../../../vendor/*
ignoreErrors:
-
identifier: missingType.iterableValue
-
identifier: missingType.generics
# Arrays can be callable
-
message: '#Parameter \#1 \$callback of function set_error_handler expects \(callable\(int, string, string, int(, array)?\): bool\)\|null, array{.Zend_Session…., .handleSessionStartE….} given\.#'
Expand Down
8 changes: 4 additions & 4 deletions tests/Zend/Session/SessionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function setUp(): void
// _unitTestEnabled is utilised by other tests to handle session data processing
// Zend_Session tests should pass with _unitTestEnabled turned off
Zend_Session::$_unitTestEnabled = false;
error_reporting(E_ALL | E_STRICT);
error_reporting(E_ALL);
}

/**
Expand All @@ -84,9 +84,9 @@ public function tearDown(): void
session_save_path($this->_savePath);

$this->assertSame(
E_ALL | E_STRICT,
error_reporting(E_ALL | E_STRICT),
'A test altered error_reporting to something other than E_ALL | E_STRICT'
E_ALL,
error_reporting(E_ALL),
'A test altered error_reporting to something other than E_ALL'
);

Zend_Session_Namespace::unlockAll();
Expand Down

0 comments on commit 97e4e1d

Please sign in to comment.