Skip to content

Commit bb27c70

Browse files
committed
Do not use Safe DateTime
1 parent f369c85 commit bb27c70

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

phpstan.neon.dist

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,7 @@ includes:
99
- vendor/phpstan/phpstan-phpunit/rules.neon
1010
- vendor/phpstan/phpstan-strict-rules/rules.neon
1111
- vendor/thecodingmachine/phpstan-safe-rule/phpstan-safe-rule.neon
12+
13+
ignoreErrors:
14+
# Adds unnecessary maintanence overhead
15+
- "~Class DateTime(Immutable)? is unsafe to use. Its methods can return FALSE instead of throwing an exception. Please add 'use Safe\\\\DateTime(Immutable)?;' at the beginning of the file to use the variant provided by the 'thecodingmachine/safe' library~"

src/Type/DateTimeType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
use GraphQL\Language\AST\StringValueNode;
1111
use GraphQL\Type\Definition\CustomScalarType;
1212
use GraphQL\Utils\Utils;
13-
use Safe\DateTimeImmutable;
13+
use DateTimeImmutable;
1414
use SimPod\GraphQLUtils\Exception\InvalidArgument;
1515
use function assert;
1616
use function Safe\preg_match;

0 commit comments

Comments
 (0)