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,6 @@
namespace Symfony\Component\DependencyInjection;
use Symfony\Component\DependencyInjection\Exception\BadMethodCallException;
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Exception\OutOfBoundsException;
@@ -27,10 +26,9 @@ class ChildDefinition extends Definition
/**
* @param string $parent The id of Definition instance to decorate
*/
public function __construct($parent)
public function __construct(string $parent)
{
$this->parent = $parent;
$this->setPrivate(false);
}
/**
@@ -46,11 +44,9 @@ class ChildDefinition extends Definition
/**
* Sets the Definition to inherit from.
*
* @param string $parent
*
* @return $this
*/
public function setParent($parent)
public function setParent(string $parent)
{
$this->parent = $parent;
@@ -65,7 +61,7 @@ class ChildDefinition extends Definition
*
* @param int|string $index
*
* @return mixed The argument value
* @return mixed
*
* @throws OutOfBoundsException When the argument does not exist
*/
@@ -97,7 +93,7 @@ class ChildDefinition extends Definition
{
if (\is_int($index)) {
$this->arguments['index_'.$index] = $value;
} elseif (0 === strpos($index, '$')) {
} elseif (str_starts_with($index, '$')) {
$this->arguments[$index] = $value;
} else {
throw new InvalidArgumentException('The argument must be an existing index or the name of a constructor\'s parameter.');
@@ -105,22 +101,4 @@ class ChildDefinition extends Definition
return $this;
}
/**
* @internal
*/
public function setAutoconfigured($autoconfigured)
{
throw new BadMethodCallException('A ChildDefinition cannot be autoconfigured.');
}
/**
* @internal
*/
public function setInstanceofConditionals(array $instanceof)
{
throw new BadMethodCallException('A ChildDefinition cannot have instanceof conditionals set on it.');
}
}
class_alias(ChildDefinition::class, DefinitionDecorator::class);