mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-09 19:19:29 +03:00
Merge pull request #68 from stof/update_symfony
Fixed the ApiDocExtractor for a change in Symfony 2.1
This commit is contained in:
commit
ee36e599c9
@ -246,7 +246,7 @@ class ApiDocExtractor
|
|||||||
|
|
||||||
// requirements
|
// requirements
|
||||||
$requirements = array();
|
$requirements = array();
|
||||||
foreach ($route->compile()->getRequirements() as $name => $value) {
|
foreach ($route->getRequirements() as $name => $value) {
|
||||||
if ('_method' !== $name) {
|
if ('_method' !== $name) {
|
||||||
$requirements[$name] = array(
|
$requirements[$name] = array(
|
||||||
'requirement' => $value,
|
'requirement' => $value,
|
||||||
@ -289,13 +289,13 @@ class ApiDocExtractor
|
|||||||
|
|
||||||
// method/uri
|
// method/uri
|
||||||
$annotation->setMethod($route->getRequirement('_method') ?: 'ANY');
|
$annotation->setMethod($route->getRequirement('_method') ?: 'ANY');
|
||||||
$annotation->setUri($route->compile()->getPattern());
|
$annotation->setUri($route->getPattern());
|
||||||
|
|
||||||
return $annotation;
|
return $annotation;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Reflector $reflected
|
* @param \Reflector $reflected
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
protected function getDocComment(\Reflector $reflected)
|
protected function getDocComment(\Reflector $reflected)
|
||||||
@ -315,7 +315,7 @@ class ApiDocExtractor
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Reflector $reflected
|
* @param \Reflector $reflected
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
protected function getDocCommentText(\Reflector $reflected)
|
protected function getDocCommentText(\Reflector $reflected)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user