composer update

This commit is contained in:
2019-12-01 06:37:45 +00:00
parent fa199eef05
commit 3115ab75a5
3650 changed files with 72361 additions and 147137 deletions

View File

@@ -22,19 +22,28 @@ use Symfony\Component\HttpKernel\KernelInterface;
class FileLocator extends BaseFileLocator
{
private $kernel;
private $path;
/**
* @param KernelInterface $kernel A KernelInterface instance
* @param string|null $path The path the global resource directory
* @param array $paths An array of paths where to look for resources
* @deprecated since Symfony 4.4
*/
public function __construct(KernelInterface $kernel, string $path = null, array $paths = [])
private $path;
public function __construct(KernelInterface $kernel/*, string $path = null, array $paths = [], bool $triggerDeprecation = true*/)
{
$this->kernel = $kernel;
if (null !== $path) {
$this->path = $path;
$paths[] = $path;
if (2 <= \func_num_args()) {
$this->path = func_get_arg(1);
$paths = 3 <= \func_num_args() ? func_get_arg(2) : [];
if (null !== $this->path) {
$paths[] = $this->path;
}
if (4 !== \func_num_args() || func_get_arg(3)) {
@trigger_error(sprintf('Passing more than one argument to %s is deprecated since Symfony 4.4 and will be removed in 5.0.', __METHOD__), E_USER_DEPRECATED);
}
} else {
$paths = [];
}
parent::__construct($paths);
@@ -46,9 +55,32 @@ class FileLocator extends BaseFileLocator
public function locate($file, $currentPath = null, $first = true)
{
if (isset($file[0]) && '@' === $file[0]) {
return $this->kernel->locateResource($file, $this->path, $first);
return $this->kernel->locateResource($file, $this->path, $first, false);
}
return parent::locate($file, $currentPath, $first);
$locations = parent::locate($file, $currentPath, $first);
if (isset($file[0]) && !(
'/' === $file[0] || '\\' === $file[0]
|| (\strlen($file) > 3 && ctype_alpha($file[0]) && ':' === $file[1] && ('\\' === $file[2] || '/' === $file[2]))
|| null !== parse_url($file, PHP_URL_SCHEME)
)) {
// no need to trigger deprecations when the loaded file is given as absolute path
foreach ($this->paths as $deprecatedPath) {
if (\is_array($locations)) {
foreach ($locations as $location) {
if (0 === strpos($location, $deprecatedPath) && (null === $currentPath || false === strpos($location, $currentPath))) {
@trigger_error(sprintf('Loading the file "%s" from the global resource directory "%s" is deprecated since Symfony 4.4 and will be removed in 5.0.', $file, $deprecatedPath), E_USER_DEPRECATED);
}
}
} else {
if (0 === strpos($locations, $deprecatedPath) && (null === $currentPath || false === strpos($locations, $currentPath))) {
@trigger_error(sprintf('Loading the file "%s" from the global resource directory "%s" is deprecated since Symfony 4.4 and will be removed in 5.0.', $file, $deprecatedPath), E_USER_DEPRECATED);
}
}
}
}
return $locations;
}
}