Skip to content

Commit a62e6c6

Browse files
authored
Allow to install in PHP8 environment (#35)
1 parent f4e5181 commit a62e6c6

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

.github/workflows/ci.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ jobs:
1313
strategy:
1414
matrix:
1515
operating-system: [ ubuntu-latest ]
16-
php: [ '7.4' ]
17-
# php: [ '7.4', '8.0' ]
16+
php: [ '7.4', '8.0' ]
1817

1918
name: PHP ${{ matrix.php }}
2019

@@ -54,4 +53,4 @@ jobs:
5453
path: ${{ steps.composer-cache.outputs.dir }}
5554
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
5655
restore-keys: |
57-
${{ runner.os }}-composer-
56+
${{ runner.os }}-composer-

composer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cubicl/php-structure-check",
3-
"description": "Structural check of arrays for PHP 7.3+",
3+
"description": "Structural check of arrays for PHP 7.4+",
44
"keywords": [
55
"array",
66
"structure",
@@ -49,6 +49,6 @@
4949
},
5050
"require": {
5151
"ext-json": "*",
52-
"php": "^7.4"
52+
"php": "^7.4|^8.0"
5353
}
5454
}

src/Type/DatetimeType.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,6 @@ private function isValidDatetime(string $value): bool
3838
$date = DateTime::createFromFormat($this->datetimeFormat, $value, new DateTimeZone($this->datetimeZone));
3939
$errors = DateTime::getLastErrors();
4040

41-
return $date && $errors['warning_count'] === 0 && $errors['error_count'] === 0;
41+
return $date && !$errors;
4242
}
4343
}

0 commit comments

Comments
 (0)