Skip to content

Commit

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

* removing dev package versions

---------

Co-authored-by: Dorian Villet <[email protected]>
  • Loading branch information
jaydiablo and gnutix authored Jan 10, 2025
1 parent 8df22b9 commit ce17b38
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 15 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
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"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-config": "^2.0.5",
"diablomedia/zendframework1-loader": "^1.0.5",
Expand All @@ -35,8 +35,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
11 changes: 7 additions & 4 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,23 @@ parameters:
- ./src/Zend/Validate/Hostname/*
ignoreErrors:
- '#Variable \$context in isset\(\) always exists and is not nullable\.#'
- '#Binary operation "\*" between string and .+ results in an error\.#'
- '#Binary operation "\*" between 3 and string results in an error\.#'
- '#Binary operation "\*" between non-empty-string and .+ results in an error\.#'
- '#Binary operation "\*" between 3 and non-empty-string results in an error\.#'
# This is intentional for short circuiting/execution flow management
-
message: '#Do-while loop condition is always false\.#'
path: ./src/Zend/Validate/Hostname.php
-
message: '#Binary operation "\*" between int<1, max> and string results in an error\.#'
message: '#Binary operation "\*" between int<1, max> and non-empty-string results in an error\.#'
path: ./src/Zend/Validate/Ccnum.php
count: 1
-
message: '#Binary operation "\*" between int<1, max> and string results in an error\.#'
message: '#Binary operation "\*" between int<1, max> and non-empty-string results in an error\.#'
path: ./src/Zend/Validate/CreditCard.php
count: 1
-
message: '#Call to function method_exists\(\) with object and ''__toString'' will always evaluate to true\.#'
path: ./src/Zend/Validate/NotEmpty.php
# This does seem like a bug in ZF1, as the loop with $j will never run
-
message: '#Comparison operation "<" between int<4, max> and 4 is always false\.#'
Expand Down
5 changes: 2 additions & 3 deletions src/Zend/Validate/EmailAddress.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,11 +229,10 @@ public function getHostnameValidator()
}

/**
* @param Zend_Validate_Hostname $hostnameValidator OPTIONAL
* @param int $allow OPTIONAL
* @param int $allow OPTIONAL
* @return $this
*/
public function setHostnameValidator(Zend_Validate_Hostname $hostnameValidator = null, $allow = Zend_Validate_Hostname::ALLOW_DNS)
public function setHostnameValidator(Zend_Validate_Hostname|null $hostnameValidator = null, $allow = Zend_Validate_Hostname::ALLOW_DNS)
{
if (!$hostnameValidator) {
$hostnameValidator = new Zend_Validate_Hostname($allow);
Expand Down
3 changes: 1 addition & 2 deletions src/Zend/Validate/Hostname.php
Original file line number Diff line number Diff line change
Expand Up @@ -1581,10 +1581,9 @@ public function getIpValidator()
}

/**
* @param Zend_Validate_Ip $ipValidator OPTIONAL
* @return Zend_Validate_Hostname
*/
public function setIpValidator(Zend_Validate_Ip $ipValidator = null)
public function setIpValidator(Zend_Validate_Ip|null $ipValidator = null)
{
if ($ipValidator === null) {
$ipValidator = new Zend_Validate_Ip();
Expand Down

0 comments on commit ce17b38

Please sign in to comment.