Update to laravel 7

This commit is contained in:
KodeStar
2022-03-10 11:54:29 +00:00
parent 61a5a1a8b0
commit f9a19fce91
7170 changed files with 274189 additions and 283773 deletions

View File

@@ -27,6 +27,10 @@ class ResettableServicePass implements CompilerPassInterface
public function __construct(string $tagName = 'kernel.reset')
{
if (0 < \func_num_args()) {
trigger_deprecation('symfony/http-kernel', '5.3', 'Configuring "%s" is deprecated.', __CLASS__);
}
$this->tagName = $tagName;
}
@@ -43,16 +47,25 @@ class ResettableServicePass implements CompilerPassInterface
foreach ($container->findTaggedServiceIds($this->tagName, true) as $id => $tags) {
$services[$id] = new Reference($id, ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE);
$attributes = $tags[0];
if (!isset($attributes['method'])) {
throw new RuntimeException(sprintf('Tag %s requires the "method" attribute to be set.', $this->tagName));
foreach ($tags as $attributes) {
if (!isset($attributes['method'])) {
throw new RuntimeException(sprintf('Tag "%s" requires the "method" attribute to be set.', $this->tagName));
}
if (!isset($methods[$id])) {
$methods[$id] = [];
}
if ('ignore' === ($attributes['on_invalid'] ?? null)) {
$attributes['method'] = '?'.$attributes['method'];
}
$methods[$id][] = $attributes['method'];
}
$methods[$id] = $attributes['method'];
}
if (empty($services)) {
if (!$services) {
$container->removeAlias('services_resetter');
$container->removeDefinition('services_resetter');