Update core 8.3.0
This commit is contained in:
parent
da7a7918f8
commit
cd7a898e66
6144 changed files with 132297 additions and 87747 deletions
web/vendor/symfony/routing
|
@ -139,7 +139,7 @@ abstract class AnnotationClassLoader implements LoaderInterface
|
|||
|
||||
$defaults = array_replace($globals['defaults'], $annot->getDefaults());
|
||||
foreach ($method->getParameters() as $param) {
|
||||
if (!isset($defaults[$param->getName()]) && $param->isDefaultValueAvailable()) {
|
||||
if (false !== strpos($globals['path'].$annot->getPath(), sprintf('{%s}', $param->getName())) && !isset($defaults[$param->getName()]) && $param->isDefaultValueAvailable()) {
|
||||
$defaults[$param->getName()] = $param->getDefaultValue();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,7 +38,15 @@ class AnnotationDirectoryLoader extends AnnotationFileLoader
|
|||
|
||||
$collection = new RouteCollection();
|
||||
$collection->addResource(new DirectoryResource($dir, '/\.php$/'));
|
||||
$files = iterator_to_array(new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($dir), \RecursiveIteratorIterator::LEAVES_ONLY));
|
||||
$files = iterator_to_array(new \RecursiveIteratorIterator(
|
||||
new RecursiveCallbackFilterIterator(
|
||||
new \RecursiveDirectoryIterator($dir),
|
||||
function (\SplFileInfo $current) {
|
||||
return '.' !== substr($current->getBasename(), 0, 1);
|
||||
}
|
||||
),
|
||||
\RecursiveIteratorIterator::LEAVES_ONLY
|
||||
));
|
||||
usort($files, function (\SplFileInfo $a, \SplFileInfo $b) {
|
||||
return (string) $a > (string) $b ? 1 : -1;
|
||||
});
|
||||
|
@ -79,3 +87,34 @@ class AnnotationDirectoryLoader extends AnnotationFileLoader
|
|||
return is_dir($path) && (!$type || 'annotation' === $type);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal To be removed as RecursiveCallbackFilterIterator is available since PHP 5.4
|
||||
*/
|
||||
class RecursiveCallbackFilterIterator extends \FilterIterator implements \RecursiveIterator
|
||||
{
|
||||
private $iterator;
|
||||
private $callback;
|
||||
|
||||
public function __construct(\RecursiveIterator $iterator, $callback)
|
||||
{
|
||||
$this->iterator = $iterator;
|
||||
$this->callback = $callback;
|
||||
parent::__construct($iterator);
|
||||
}
|
||||
|
||||
public function accept()
|
||||
{
|
||||
return call_user_func($this->callback, $this->current(), $this->key(), $this->iterator);
|
||||
}
|
||||
|
||||
public function hasChildren()
|
||||
{
|
||||
return $this->iterator->hasChildren();
|
||||
}
|
||||
|
||||
public function getChildren()
|
||||
{
|
||||
return new static($this->iterator->getChildren(), $this->callback);
|
||||
}
|
||||
}
|
||||
|
|
2
web/vendor/symfony/routing/composer.json
vendored
2
web/vendor/symfony/routing/composer.json
vendored
|
@ -21,7 +21,7 @@
|
|||
"require-dev": {
|
||||
"symfony/config": "~2.7|~3.0.0",
|
||||
"symfony/http-foundation": "~2.3|~3.0.0",
|
||||
"symfony/yaml": "~2.0,>=2.0.5|~3.0.0",
|
||||
"symfony/yaml": "^2.0.5|~3.0.0",
|
||||
"symfony/expression-language": "~2.4|~3.0.0",
|
||||
"doctrine/annotations": "~1.0",
|
||||
"doctrine/common": "~2.2",
|
||||
|
|
Reference in a new issue