Skip to content

Commit

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

* removing dev versions

* removing unnecessary docblocks

* bumping zf1-json version
  • Loading branch information
jaydiablo authored Jan 10, 2025
1 parent 6febbfc commit 184f5a3
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 16 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 @@ -10,9 +10,9 @@
"license": "BSD-3-Clause",
"prefer-stable": true,
"require": {
"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-json": "^1.0.7"
"diablomedia/zendframework1-json": "^1.0.11"
},
"autoload": {
"psr-0": {
Expand All @@ -29,8 +29,8 @@
},
"require-dev": {
"phpunit/phpunit": "^9.6.19 || ^10.5.18",
"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
24 changes: 20 additions & 4 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
-
message: '#Argument of an invalid type DOMDocument\|SimpleXMLElement\|false supplied for foreach, only iterables are supported\.#'
path: src/Zend/Config/Xml.php
Expand All @@ -31,5 +34,18 @@ parameters:
-
message: '#Parameter \#1 \$callback of function set_error_handler expects \(callable\(int, string, string, int(, array)?\): bool\)\|null, array\{\$this\(Zend_Config_Yaml\), ._loadFileErrorHandl….\} given\.#'
path: src/Zend/Config/Yaml.php
includes:
- phpstan-php8.php
-
message: '#^Strict comparison using \!\=\= between list\<string\> and false will always evaluate to true\.$#'
identifier: notIdentical.alwaysTrue
count: 2
path: src/Zend/Config/Ini.php
-
message: '#^Negated boolean expression is always false\.$#'
identifier: booleanNot.alwaysFalse
count: 1
path: src/Zend/Config/Writer/Xml.php
-
message: '#^Negated boolean expression is always false\.$#'
identifier: booleanNot.alwaysFalse
count: 1
path: src/Zend/Config/Xml.php
4 changes: 1 addition & 3 deletions src/Zend/Config/Writer.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,8 @@ abstract class Zend_Config_Writer
* Create a new adapter
*
* $options can only be passed as array or be omitted
*
* @param null|array $options
*/
public function __construct(array $options = null)
public function __construct(array|null $options = null)
{
if (is_array($options)) {
$this->setOptions($options);
Expand Down
3 changes: 1 addition & 2 deletions src/Zend/Config/Writer/FileAbstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,10 @@ public function setExclusiveLock($exclusiveLock)
* Write configuration to file.
*
* @param string $filename
* @param Zend_Config|null $config
* @param bool $exclusiveLock
* @return void
*/
public function write($filename = null, Zend_Config $config = null, $exclusiveLock = null)
public function write($filename = null, Zend_Config|null $config = null, $exclusiveLock = null)
{
if ($filename !== null) {
$this->setFilename($filename);
Expand Down

0 comments on commit 184f5a3

Please sign in to comment.