8000 Merge branch '4.4' · symfony/symfony@8e84328 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8e84328

Browse files
Merge branch '4.4'
* 4.4: [TwigBundle] fix FC with DI v5 [FrameworkBundle] fix FC with DI v5 [Config] decouple tests from DI
2 parents 260df48 + 82d5ff0 commit 8e84328

File tree

9 files changed

+68
-6
lines changed

9 files changed

+68
-6
lines changed

src/Symfony/Bundle/FrameworkBundle/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;

src/Symfony/Bundle/FrameworkBundle/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 <fabien@symfony.com>
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+
}

src/Symfony/Bundle/FrameworkBundle/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;

src/Symfony/Bundle/TwigBundle/CacheWarmer/TemplateCacheCacheWarmer.php

Whitespace-only changes.

src/Symfony/Bundle/TwigBundle/CacheWarmer/TemplateCacheWarmer.php

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

1414
use Psr\Container\ContainerInterface;
15-
use Symfony\Component\DependencyInjection\ServiceSubscriberInterface;
15+
use Symfony\Bundle\TwigBundle\DependencyInjection\CompatibilityServiceSubscriberInterface as ServiceSubscriberInterface;
1616
use Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerInterface;
1717
use Twig\Environment;
1818
use Twig\Error\Error;
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 <fabien@symfony.com>
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\TwigBundle\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+
}

src/Symfony/Component/Config/Tests/Resource/ReflectionClassResourceTest.php

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

1414
use PHPUnit\Framework\TestCase;
1515
use Symfony\Component\Config\Resource\ReflectionClassResource;
16-
use Symfony\Component\DependencyInjection\ServiceSubscriberInterface;
1716
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
1817
use Symfony\Component\Messenger\Handler\MessageSubscriberInterface;
18+
use Symfony\Contracts\Service\ServiceSubscriberInterface;
1919

2020
class ReflectionClassResourceTest extends TestCase
2121
{

src/Symfony/Component/Config/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
"symfony/polyfill-ctype": "~1.8"
2222
},
2323
"require-dev": {
24-
"symfony/dependency-injection": "^4.4|^5.0",
2524
"symfony/event-dispatcher": "^4.4|^5.0",
2625
"symfony/finder": "^4.4|^5.0",
2726
"symfony/messenger": "^4.4|^5.0",
27+
"symfony/service-contracts": "^1.1",
2828
"symfony/yaml": "^4.4|^5.0"
2929
},
3030
"conflict": {

0 commit comments

Comments
 (0)
0