mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-23 01:02:16 +02:00
Updating Symfony lib and dependencies:
Package operations: 2 installs, 23 updates, 0 removals - Updating psr/log (1.1.0 => 1.1.2) - Updating symfony/debug (v3.4.30 => v3.4.35) - Updating symfony/console (v3.4.30 => v3.4.35) - Updating symfony/dotenv (v3.4.30 => v3.4.35) - Updating symfony/routing (v3.4.30 => v3.4.35) - Updating symfony/finder (v3.4.30 => v3.4.35) - Updating symfony/filesystem (v3.4.30 => v3.4.35) - Installing symfony/polyfill-util (v1.12.0) - Installing symfony/polyfill-php56 (v1.12.0) - Updating symfony/http-foundation (v3.4.30 => v3.4.35) - Updating symfony/event-dispatcher (v3.4.30 => v3.4.35) - Updating symfony/http-kernel (v3.4.30 => v3.4.35) - Updating symfony/config (v3.4.30 => v3.4.35) - Updating symfony/dependency-injection (v3.4.30 => v3.4.35) - Updating symfony/class-loader (v3.4.30 => v3.4.35) - Updating symfony/cache (v3.4.30 => v3.4.35) - Updating symfony/framework-bundle (v3.4.30 => v3.4.35) - Updating twig/twig (v1.42.2 => v1.42.4) - Updating symfony/twig-bridge (v3.4.30 => v3.4.35) - Updating symfony/twig-bundle (v3.4.30 => v3.4.35) - Updating symfony/yaml (v3.4.30 => v3.4.35) - Updating symfony/stopwatch (v3.4.30 => v3.4.35) - Updating symfony/var-dumper (v3.4.30 => v3.4.35) - Updating symfony/web-profiler-bundle (v3.4.30 => v3.4.35) - Updating symfony/css-selector (v3.4.30 => v3.4.35)
This commit is contained in:
@@ -15,6 +15,7 @@ use Doctrine\Common\Annotations\Reader;
|
||||
use Symfony\Component\Config\Loader\LoaderInterface;
|
||||
use Symfony\Component\Config\Loader\LoaderResolverInterface;
|
||||
use Symfony\Component\Config\Resource\FileResource;
|
||||
use Symfony\Component\Routing\Annotation\Route as RouteAnnotation;
|
||||
use Symfony\Component\Routing\Route;
|
||||
use Symfony\Component\Routing\RouteCollection;
|
||||
|
||||
@@ -32,7 +33,6 @@ use Symfony\Component\Routing\RouteCollection;
|
||||
* recognizes several parameters: requirements, options, defaults, schemes,
|
||||
* methods, host, and name. The name parameter is mandatory.
|
||||
* Here is an example of how you should be able to use it:
|
||||
*
|
||||
* /**
|
||||
* * @Route("/Blog")
|
||||
* * /
|
||||
@@ -44,7 +44,6 @@ use Symfony\Component\Routing\RouteCollection;
|
||||
* public function index()
|
||||
* {
|
||||
* }
|
||||
*
|
||||
* /**
|
||||
* * @Route("/{id}", name="blog_post", requirements = {"id" = "\d+"})
|
||||
* * /
|
||||
@@ -131,6 +130,10 @@ abstract class AnnotationClassLoader implements LoaderInterface
|
||||
return $collection;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param RouteAnnotation $annot or an object that exposes a similar interface
|
||||
* @param array $globals
|
||||
*/
|
||||
protected function addRoute(RouteCollection $collection, $annot, $globals, \ReflectionClass $class, \ReflectionMethod $method)
|
||||
{
|
||||
$name = $annot->getName();
|
||||
@@ -192,9 +195,6 @@ abstract class AnnotationClassLoader implements LoaderInterface
|
||||
/**
|
||||
* Gets the default route name for a class method.
|
||||
*
|
||||
* @param \ReflectionClass $class
|
||||
* @param \ReflectionMethod $method
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function getDefaultRouteName(\ReflectionClass $class, \ReflectionMethod $method)
|
||||
|
||||
@@ -46,7 +46,7 @@ class AnnotationFileLoader extends FileLoader
|
||||
* @param string $file A PHP file path
|
||||
* @param string|null $type The resource type
|
||||
*
|
||||
* @return RouteCollection A RouteCollection instance
|
||||
* @return RouteCollection|null A RouteCollection instance
|
||||
*
|
||||
* @throws \InvalidArgumentException When the file does not exist or its routes cannot be parsed
|
||||
*/
|
||||
@@ -58,7 +58,7 @@ class AnnotationFileLoader extends FileLoader
|
||||
if ($class = $this->findClass($path)) {
|
||||
$refl = new \ReflectionClass($class);
|
||||
if ($refl->isAbstract()) {
|
||||
return;
|
||||
return null;
|
||||
}
|
||||
|
||||
$collection->addResource(new FileResource($path));
|
||||
|
||||
@@ -39,7 +39,8 @@ class RoutingConfigurator
|
||||
final public function import($resource, $type = null, $ignoreErrors = false)
|
||||
{
|
||||
$this->loader->setCurrentDir(\dirname($this->path));
|
||||
$imported = $this->loader->import($resource, $type, $ignoreErrors, $this->file);
|
||||
$imported = $this->loader->import($resource, $type, $ignoreErrors, $this->file) ?: [];
|
||||
|
||||
if (!\is_array($imported)) {
|
||||
return new ImportConfigurator($this->collection, $imported);
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ class PhpFileLoader extends FileLoader
|
||||
|
||||
// the closure forbids access to the private scope in the included file
|
||||
$loader = $this;
|
||||
$load = \Closure::bind(function ($file) use ($loader) {
|
||||
$load = \Closure::bind(static function ($file) use ($loader) {
|
||||
return include $file;
|
||||
}, null, ProtectedPhpFileLoader::class);
|
||||
|
||||
|
||||
@@ -146,7 +146,8 @@ class XmlFileLoader extends FileLoader
|
||||
|
||||
$this->setCurrentDir(\dirname($path));
|
||||
|
||||
$imported = $this->import($resource, ('' !== $type ? $type : null), false, $file);
|
||||
/** @var RouteCollection[] $imported */
|
||||
$imported = $this->import($resource, ('' !== $type ? $type : null), false, $file) ?: [];
|
||||
|
||||
if (!\is_array($imported)) {
|
||||
$imported = [$imported];
|
||||
@@ -261,7 +262,7 @@ class XmlFileLoader extends FileLoader
|
||||
private function parseDefaultsConfig(\DOMElement $element, $path)
|
||||
{
|
||||
if ($this->isElementValueNull($element)) {
|
||||
return;
|
||||
return null;
|
||||
}
|
||||
|
||||
// Check for existing element nodes in the default element. There can
|
||||
@@ -298,7 +299,7 @@ class XmlFileLoader extends FileLoader
|
||||
private function parseDefaultNode(\DOMElement $node, $path)
|
||||
{
|
||||
if ($this->isElementValueNull($node)) {
|
||||
return;
|
||||
return null;
|
||||
}
|
||||
|
||||
switch ($node->localName) {
|
||||
|
||||
@@ -158,7 +158,7 @@ class YamlFileLoader extends FileLoader
|
||||
|
||||
$this->setCurrentDir(\dirname($path));
|
||||
|
||||
$imported = $this->import($config['resource'], $type, false, $file);
|
||||
$imported = $this->import($config['resource'], $type, false, $file) ?: [];
|
||||
|
||||
if (!\is_array($imported)) {
|
||||
$imported = [$imported];
|
||||
|
||||
Reference in New Issue
Block a user