Skip to content

Commit

Permalink
Fixed getIdentifier() must be of the type string (#7)
Browse files Browse the repository at this point in the history
When `$configuration->getName()` is `null`, which is possible with the default `@ParamConverter` from `FrameworkExtraBundle` an exception will be thrown because `getIdentifier` requires a string as third param. 
Using `?string $name` is not allowed since the bundle should be compatible with php >= 7.1

`private function getIdentifier(Request $request, $options, string $name): string`
  • Loading branch information
jverdeyen authored and roukmoute committed Apr 16, 2019
1 parent 5cbc952 commit 08d249f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ParamConverter/HashidsParamConverter.php
Expand Up @@ -45,7 +45,7 @@ private function setHashid(Request $request, ParamConverter $configuration): voi
$this->getIdentifier(
$request,
array_replace(['hashid' => null], $configuration->getOptions()),
$configuration->getName()
(string) $configuration->getName()
)
);

Expand Down

0 comments on commit 08d249f

Please sign in to comment.