diff --git a/phpstan.neon b/phpstan.neon index 8e6c2eea..de5e12b7 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -15,4 +15,7 @@ parameters: # false positives - '~Call to an undefined method Symfony\\Component\\Security\\Core\\Authentication\\Token\\TokenInterface\:\:getRoles\(\)\.~' - '~Call to method getSource\(\) on an unknown class Symfony\\Component\\Security\\Core\\Role\\SwitchUserRole\.~' - - '~Class Symfony\\Component\\Security\\Core\\Role\\SwitchUserRole not found\.~' \ No newline at end of file + - '~Class Symfony\\Component\\Security\\Core\\Role\\SwitchUserRole not found\.~' + # required for Symfony 4.4 compatibility + - '~Method DH\\AuditorBundle\\Routing\\RoutingAnnotationLoader\:\:load\(\) has parameter \$type with no typehint specified.~' + - '~Method DH\\AuditorBundle\\Routing\\RoutingAnnotationLoader\:\:supports\(\) has parameter \$type with no typehint specified.~' \ No newline at end of file diff --git a/src/Routing/RoutingAnnotationLoader.php b/src/Routing/RoutingAnnotationLoader.php index 4ec29afb..7ef55849 100644 --- a/src/Routing/RoutingAnnotationLoader.php +++ b/src/Routing/RoutingAnnotationLoader.php @@ -31,7 +31,7 @@ public function __construct(AnnotatedRouteControllerLoader $annotatedRouteContro $this->configuration = $configuration; } - public function load($resource, ?string $type = null): RouteCollection + public function load($resource, $type = null): RouteCollection { if (true === $this->isLoaded) { throw new RuntimeException('Do not add the "audit" loader twice'); @@ -47,7 +47,7 @@ public function load($resource, ?string $type = null): RouteCollection return $routeCollection; } - public function supports($resource, ?string $type = null): bool + public function supports($resource, $type = null): bool { return 'auditor' === $type; }