migration symfony 5 4 (#300)

* symfony 5.4 (diff dev)

* symfony 5.4 (working)

* symfony 5.4 (update autoload)

* symfony 5.4 (remove swiftmailer mailer implementation)

* symfony 5.4 (php doc and split Global accessor class)


### Impacted packages:

composer require php:">=7.2.5 <8.0.0" symfony/console:5.4.* symfony/dotenv:5.4.* symfony/framework-bundle:5.4.* symfony/twig-bundle:5.4.* symfony/yaml:5.4.* --update-with-dependencies

composer require symfony/stopwatch:5.4.* symfony/web-profiler-bundle:5.4.* --dev --update-with-dependencies
This commit is contained in:
bdalsass
2022-06-16 09:13:24 +02:00
committed by GitHub
parent abb13b70b9
commit 79da71ecf8
2178 changed files with 87439 additions and 59451 deletions

View File

@@ -11,7 +11,7 @@
namespace Symfony\Component\Config\Loader;
use Symfony\Component\Config\Exception\FileLoaderLoadException;
use Symfony\Component\Config\Exception\LoaderLoadException;
/**
* Loader is the abstract class used by all built-in loaders.
@@ -21,6 +21,12 @@ use Symfony\Component\Config\Exception\FileLoaderLoadException;
abstract class Loader implements LoaderInterface
{
protected $resolver;
protected $env;
public function __construct(string $env = null)
{
$this->env = $env;
}
/**
* {@inheritdoc}
@@ -46,7 +52,7 @@ abstract class Loader implements LoaderInterface
*
* @return mixed
*/
public function import($resource, $type = null)
public function import($resource, string $type = null)
{
return $this->resolve($resource, $type)->load($resource, $type);
}
@@ -57,11 +63,11 @@ abstract class Loader implements LoaderInterface
* @param mixed $resource A resource
* @param string|null $type The resource type or null if unknown
*
* @return $this|LoaderInterface
* @return LoaderInterface
*
* @throws FileLoaderLoadException If no loader is found
* @throws LoaderLoadException If no loader is found
*/
public function resolve($resource, $type = null)
public function resolve($resource, string $type = null)
{
if ($this->supports($resource, $type)) {
return $this;
@@ -70,7 +76,7 @@ abstract class Loader implements LoaderInterface
$loader = null === $this->resolver ? false : $this->resolver->resolve($resource, $type);
if (false === $loader) {
throw new FileLoaderLoadException($resource, null, null, null, $type);
throw new LoaderLoadException($resource, null, 0, null, $type);
}
return $loader;