diff --git a/phpstan.neon b/phpstan.neon index c64ea7fbbfb50d1b633e39e35daf25bc9a7cf832..d83d38258f22b1e9875d49e2193eb936ee690088 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -21,6 +21,7 @@ parameters: treatPhpDocTypesAsCertain: false checkGenericClassInNonGenericObjectType: false checkMissingIterableValueType: false + reportUnmatchedIgnoredErrors: false ignoreErrors: - '#Access to an undefined property Imi\\Util\\LazyArrayObject::\$[^.]+.#' @@ -37,4 +38,12 @@ parameters: - message: '#Method \S+ has no return typehint specified.#' paths: - - tests/unit/**Test.php \ No newline at end of file + - tests/unit/**Test.php + - + message: '#class .+ not found#' + paths: + - src/Components/jwt/* + - + message: '#Lcobucci\\JWT\\UnencryptedToken#' + paths: + - src/Components/jwt/* diff --git a/src/Components/jwt/src/Aop/JWTValidationAop.php b/src/Components/jwt/src/Aop/JWTValidationAop.php index 43edd3cdfaf7e2405cda2d3fb6e1b90029880acc..ae7fdb948d6024ba392ab0b335b9ef502f4c6635 100644 --- a/src/Components/jwt/src/Aop/JWTValidationAop.php +++ b/src/Components/jwt/src/Aop/JWTValidationAop.php @@ -141,7 +141,7 @@ class JWTValidationAop $constraints[] = new RelatedTo($subject); } $constraints[] = new LooseValidAt(new FrozenClock(new \DateTimeImmutable())); - if ($constraints && !$configuration->validator()->validate($token, ...$constraints)) + if (!$configuration->validator()->validate($token, ...$constraints)) { throw new InvalidTokenException(); }