Fix usage of FOS QueryParam::getKey() that is protected since 1.8

This commit is contained in:
Baptiste Lafontaine 2016-11-30 16:06:20 +01:00
parent 2b86a2346d
commit fd6d9ac7a7

View File

@ -40,7 +40,7 @@ final class FosRestDescriber implements RouteDescriberInterface
foreach ($this->getOperations($api, $route) as $operation) {
foreach ($annotations as $annotation) {
$in = $annotation instanceof QueryParam ? 'query' : 'formData';
$parameter = $operation->getParameters()->get($annotation->getKey(), $in);
$parameter = $operation->getParameters()->get($annotation->getName(), $in);
$parameter->setAllowEmptyValue($annotation->nullable && $annotation->allowBlank);
$parameter->setType($annotation->map ? 'array' : 'string');