Skip to content

Commit 3f5ee04

Browse files
[FrameworkBundle] fix FC with DI v5
1 parent 986a444 commit 3f5ee04

File tree

4 files changed

+34
-3
lines changed

4 files changed

+34
-3
lines changed

CacheWarmer/RouterCacheWarmer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
namespace Symfony\Bundle\FrameworkBundle\CacheWarmer;
1313

1414
use Psr\Container\ContainerInterface;
15-
use Symfony\Component\DependencyInjection\ServiceSubscriberInterface;
15+
use Symfony\Bundle\FrameworkBundle\DependencyInjection\CompatibilityServiceSubscriberInterface as ServiceSubscriberInterface;
1616
use Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerInterface;
1717
use Symfony\Component\HttpKernel\CacheWarmer\WarmableInterface;
1818
use Symfony\Component\Routing\RouterInterface;

CacheWarmer/TranslationsCacheWarmer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
namespace Symfony\Bundle\FrameworkBundle\CacheWarmer;
1313

1414
use Psr\Container\ContainerInterface;
15-
use Symfony\Component\DependencyInjection\ServiceSubscriberInterface;
15+
use Symfony\Bundle\FrameworkBundle\DependencyInjection\CompatibilityServiceSubscriberInterface as ServiceSubscriberInterface;
1616
use Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerInterface;
1717
use Symfony\Component\HttpKernel\CacheWarmer\WarmableInterface;
1818
use Symfony\Contracts\Translation\TranslatorInterface;
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <[email protected]>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
namespace Symfony\Bundle\FrameworkBundle\DependencyInjection;
13+
14+
use Symfony\Component\DependencyInjection\ServiceSubscriberInterface as LegacyServiceSubscriberInterface;
15+
use Symfony\Contracts\Service\ServiceSubscriberInterface;
16+
17+
if (interface_exists(LegacyServiceSubscriberInterface::class)) {
18+
/**
19+
* @internal
20+
*/
21+
interface CompatibilityServiceSubscriberInterface extends LegacyServiceSubscriberInterface
22+
{
23+
}
24+
} else {
25+
/**
26+
* @internal
27+
*/
28+
interface CompatibilityServiceSubscriberInterface extends ServiceSubscriberInterface
29+
{
30+
}
31+
}

Routing/Router.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313

1414
use Psr\Container\ContainerInterface;
1515
use Psr\Log\LoggerInterface;
16+
use Symfony\Bundle\FrameworkBundle\DependencyInjection\CompatibilityServiceSubscriberInterface as ServiceSubscriberInterface;
1617
use Symfony\Component\Config\Loader\LoaderInterface;
1718
use Symfony\Component\DependencyInjection\Config\ContainerParametersResource;
1819
use Symfony\Component\DependencyInjection\ContainerInterface as SymfonyContainerInterface;
1920
use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException;
2021
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
21-
use Symfony\Component\DependencyInjection\ServiceSubscriberInterface;
2222
use Symfony\Component\HttpKernel\CacheWarmer\WarmableInterface;
2323
use Symfony\Component\Routing\RequestContext;
2424
use Symfony\Component\Routing\RouteCollection;

0 commit comments

Comments
 (0)