mirror of
https://github.com/linuxserver/Heimdall.git
synced 2025-12-02 21:19:58 +09:00
Update to laravel 7
This commit is contained in:
@@ -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');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user