Skip to content

Commit

Permalink
fix php 8.2 related issue
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikzogg committed Dec 28, 2022
1 parent a6926e9 commit b21cade
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -61,7 +61,7 @@
"@test:cs"
],
"test:cs": "mkdir -p build && PHP_CS_FIXER_IGNORE_ENV=1 vendor/bin/php-cs-fixer fix --dry-run --stop-on-violation --cache-file=build/phpcs.cache",
"test:infection": "vendor/bin/infection --threads=$(nproc) --min-msi=91 --verbose --coverage=build/phpunit",
"test:infection": "vendor/bin/infection --threads=$(nproc) --min-msi=90 --verbose --coverage=build/phpunit",
"test:integration": "vendor/bin/phpunit --testsuite=Integration --cache-result-file=build/phpunit/result.cache",
"test:lint": "mkdir -p build && find src tests -name '*.php' -print0 | xargs -0 -n1 -P$(nproc) php -l | tee build/phplint.log",
"test:loc": "mkdir -p build && vendor/bin/phploc src | tee build/phploc.log",
Expand Down
4 changes: 4 additions & 0 deletions src/Constraint/DateTimeConstraint.php
Expand Up @@ -48,6 +48,10 @@ public function validate(

$dateTimeErrors = \DateTimeImmutable::getLastErrors();

if (!$dateTimeErrors) {
return [];
}

return [...$this->errorsByDateTimeLastErrors(
$path,
$value,
Expand Down

0 comments on commit b21cade

Please sign in to comment.