Skip to content

Commit

Permalink
Fixed a BC break with Symfony 4.3/4.4
Browse files Browse the repository at this point in the history
  • Loading branch information
DamienHarper committed Dec 8, 2020
1 parent 78c7e4d commit e2aa0f3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -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\.~'
- '~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.~'
4 changes: 2 additions & 2 deletions src/Routing/RoutingAnnotationLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand All @@ -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;
}
Expand Down

0 comments on commit e2aa0f3

Please sign in to comment.