Skip to content

Commit ed81d7f

Browse files
Merge branch '6.4' into 7.0
* 6.4: [Messenger] Fix requiring symfony/deprecation-contracts [AssetMapper] Warn of missing or incompat dependencies Added missing Uzbek translations. [Messenger] [Sqs] Add `AddFifoStamp` middleware DX: nullable_type_declaration [HtmlSanitizer] Add support for sanitizing unlimited length of HTML document [Validator] Add missing Finnish translations [FrameworkBundle][Routing][Translation][Workflow] Move some compiler passes from FrameworkBundle to components
2 parents bfad70a + afc557e commit ed81d7f

11 files changed

+49
-6
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ CHANGELOG
6666
* Deprecate the `routing.loader.annotation.directory` service, use the `routing.loader.attribute.directory` service instead
6767
* Deprecate the `routing.loader.annotation.file` service, use the `routing.loader.attribute.file` service instead
6868
* Deprecate `AnnotatedRouteControllerLoader`, use `AttributeRouteControllerLoader` instead
69+
* Deprecate `AddExpressionLanguageProvidersPass`, use `Symfony\Component\Routing\DependencyInjection\AddExpressionLanguageProvidersPass` instead
70+
* Deprecate `DataCollectorTranslatorPass`, use `Symfony\Component\Translation\DependencyInjection\DataCollectorTranslatorPass` instead
71+
* Deprecate `LoggingTranslatorPass`, use `Symfony\Component\Translation\DependencyInjection\LoggingTranslatorPass` instead
72+
* Deprecate `WorkflowGuardListenerPass`, use `Symfony\Component\Workflow\DependencyInjection\WorkflowGuardListenerPass` instead
6973

7074
6.3
7175
---

DependencyInjection/Compiler/AddExpressionLanguageProvidersPass.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,14 @@
1515
use Symfony\Component\DependencyInjection\ContainerBuilder;
1616
use Symfony\Component\DependencyInjection\Reference;
1717

18+
trigger_deprecation('symfony/framework-bundle', '6.4', 'The "%s" class is deprecated, use "%s" instead.', AddExpressionLanguageProvidersPass::class, \Symfony\Component\Routing\DependencyInjection\AddExpressionLanguageProvidersPass::class);
19+
1820
/**
1921
* Registers the expression language providers.
2022
*
2123
* @author Fabien Potencier <fabien@symfony.com>
24+
*
25+
* @deprecated since Symfony 6.4, use Symfony\Component\Routing\DependencyInjection\AddExpressionLanguageProvidersPass instead.
2226
*/
2327
class AddExpressionLanguageProvidersPass implements CompilerPassInterface
2428
{

DependencyInjection/Compiler/DataCollectorTranslatorPass.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,12 @@
1515
use Symfony\Component\DependencyInjection\ContainerBuilder;
1616
use Symfony\Component\Translation\TranslatorBagInterface;
1717

18+
trigger_deprecation('symfony/framework-bundle', '6.4', 'The "%s" class is deprecated, use "%s" instead.', DataCollectorTranslatorPass::class, \Symfony\Component\Translation\DependencyInjection\DataCollectorTranslatorPass::class);
19+
1820
/**
1921
* @author Christian Flothmann <christian.flothmann@sensiolabs.de>
22+
*
23+
* @deprecated since Symfony 6.4, use Symfony\Component\Translation\DependencyInjection\DataCollectorTranslatorPass instead.
2024
*/
2125
class DataCollectorTranslatorPass implements CompilerPassInterface
2226
{

DependencyInjection/Compiler/LoggingTranslatorPass.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,12 @@
1717
use Symfony\Component\Translation\TranslatorBagInterface;
1818
use Symfony\Contracts\Translation\TranslatorInterface;
1919

20+
trigger_deprecation('symfony/framework-bundle', '6.4', 'The "%s" class is deprecated, use "%s" instead.', LoggingTranslatorPass::class, \Symfony\Component\Translation\DependencyInjection\LoggingTranslatorPass::class);
21+
2022
/**
2123
* @author Abdellatif Ait boudad <a.aitboudad@gmail.com>
24+
*
25+
* @deprecated since Symfony 6.4, use Symfony\Component\Translation\DependencyInjection\LoggingTranslatorPass instead.
2226
*/
2327
class LoggingTranslatorPass implements CompilerPassInterface
2428
{

DependencyInjection/Compiler/WorkflowGuardListenerPass.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,13 @@
1515
use Symfony\Component\DependencyInjection\ContainerBuilder;
1616
use Symfony\Component\DependencyInjection\Exception\LogicException;
1717

18+
trigger_deprecation('symfony/framework-bundle', '6.4', 'The "%s" class is deprecated, use "%s" instead.', WorkflowGuardListenerPass::class, \Symfony\Component\Workflow\DependencyInjection\WorkflowGuardListenerPass::class);
19+
1820
/**
1921
* @author Christian Flothmann <christian.flothmann@sensiolabs.de>
2022
* @author Grégoire Pineau <lyrixx@lyrixx.info>
23+
*
24+
* @deprecated since Symfony 6.4, use Symfony\Component\Workflow\DependencyInjection\WorkflowGuardListenerPass instead.
2125
*/
2226
class WorkflowGuardListenerPass implements CompilerPassInterface
2327
{

FrameworkBundle.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,14 @@
1212
namespace Symfony\Bundle\FrameworkBundle;
1313

1414
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddDebugLogProcessorPass;
15-
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddExpressionLanguageProvidersPass;
1615
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AssetsContextPass;
1716
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\ContainerBuilderDebugDumpPass;
18-
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\DataCollectorTranslatorPass;
1917
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\ErrorLoggerCompilerPass;
20-
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\LoggingTranslatorPass;
2118
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\ProfilerPass;
2219
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\RemoveUnusedSessionMarshallingHandlerPass;
2320
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\TestServiceContainerRealRefPass;
2421
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\TestServiceContainerWeakRefPass;
2522
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\UnusedTagsPass;
26-
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\WorkflowGuardListenerPass;
2723
use Symfony\Component\Cache\Adapter\ApcuAdapter;
2824
use Symfony\Component\Cache\Adapter\ArrayAdapter;
2925
use Symfony\Component\Cache\Adapter\ChainAdapter;
@@ -58,9 +54,12 @@
5854
use Symfony\Component\Messenger\DependencyInjection\MessengerPass;
5955
use Symfony\Component\Mime\DependencyInjection\AddMimeTypeGuesserPass;
6056
use Symfony\Component\PropertyInfo\DependencyInjection\PropertyInfoPass;
57+
use Symfony\Component\Routing\DependencyInjection\AddExpressionLanguageProvidersPass;
6158
use Symfony\Component\Routing\DependencyInjection\RoutingResolverPass;
6259
use Symfony\Component\Scheduler\DependencyInjection\AddScheduleMessengerPass;
6360
use Symfony\Component\Serializer\DependencyInjection\SerializerPass;
61+
use Symfony\Component\Translation\DependencyInjection\DataCollectorTranslatorPass;
62+
use Symfony\Component\Translation\DependencyInjection\LoggingTranslatorPass;
6463
use Symfony\Component\Translation\DependencyInjection\TranslationDumperPass;
6564
use Symfony\Component\Translation\DependencyInjection\TranslationExtractorPass;
6665
use Symfony\Component\Translation\DependencyInjection\TranslatorPass;
@@ -70,6 +69,7 @@
7069
use Symfony\Component\Validator\DependencyInjection\AddValidatorInitializersPass;
7170
use Symfony\Component\VarExporter\Internal\Hydrator;
7271
use Symfony\Component\VarExporter\Internal\Registry;
72+
use Symfony\Component\Workflow\DependencyInjection\WorkflowGuardListenerPass;
7373

7474
// Help opcache.preload discover always-needed symbols
7575
class_exists(ApcuAdapter::class);
@@ -144,7 +144,7 @@ public function build(ContainerBuilder $container): void
144144
$this->addCompilerPassIfExists($container, TranslatorPass::class, PassConfig::TYPE_BEFORE_OPTIMIZATION, -32);
145145
$this->addCompilerPassIfExists($container, TranslatorPathsPass::class, PassConfig::TYPE_AFTER_REMOVING);
146146
$container->addCompilerPass(new LoggingTranslatorPass());
147-
$container->addCompilerPass(new AddExpressionLanguageProvidersPass(false));
147+
$container->addCompilerPass(new AddExpressionLanguageProvidersPass());
148148
$this->addCompilerPassIfExists($container, TranslationExtractorPass::class);
149149
$this->addCompilerPassIfExists($container, TranslationDumperPass::class);
150150
$container->addCompilerPass(new FragmentRendererPass());

Resources/config/asset_mapper.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
use Symfony\Component\AssetMapper\ImportMap\ImportMapManager;
3535
use Symfony\Component\AssetMapper\ImportMap\ImportMapRenderer;
3636
use Symfony\Component\AssetMapper\ImportMap\ImportMapUpdateChecker;
37+
use Symfony\Component\AssetMapper\ImportMap\ImportMapVersionChecker;
3738
use Symfony\Component\AssetMapper\ImportMap\RemotePackageDownloader;
3839
use Symfony\Component\AssetMapper\ImportMap\RemotePackageStorage;
3940
use Symfony\Component\AssetMapper\ImportMap\Resolver\JsDelivrEsmResolver;
@@ -171,6 +172,12 @@
171172
service('asset_mapper.importmap.resolver'),
172173
])
173174

175+
->set('asset_mapper.importmap.version_checker', ImportMapVersionChecker::class)
176+
->args([
177+
service('asset_mapper.importmap.config_reader'),
178+
service('asset_mapper.importmap.remote_package_downloader'),
179+
])
180+
174181
->set('asset_mapper.importmap.resolver', JsDelivrEsmResolver::class)
175182
->args([service('http_client')])
176183

@@ -199,6 +206,7 @@
199206
->args([
200207
service('asset_mapper.importmap.manager'),
201208
param('kernel.project_dir'),
209+
service('asset_mapper.importmap.version_checker'),
202210
])
203211
->tag('console.command')
204212

@@ -207,7 +215,10 @@
207215
->tag('console.command')
208216

209217
->set('asset_mapper.importmap.command.update', ImportMapUpdateCommand::class)
210-
->args([service('asset_mapper.importmap.manager')])
218+
->args([
219+
service('asset_mapper.importmap.manager'),
220+
service('asset_mapper.importmap.version_checker'),
221+
])
211222
->tag('console.command')
212223

213224
->set('asset_mapper.importmap.command.install', ImportMapInstallCommand::class)

Tests/DependencyInjection/Compiler/AddExpressionLanguageProvidersPassTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
use Symfony\Component\DependencyInjection\Definition;
1818
use Symfony\Component\DependencyInjection\Reference;
1919

20+
/**
21+
* @group legacy
22+
*/
2023
class AddExpressionLanguageProvidersPassTest extends TestCase
2124
{
2225
public function testProcessForRouter()

Tests/DependencyInjection/Compiler/DataCollectorTranslatorPassTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
use Symfony\Component\Translation\Translator;
2121
use Symfony\Contracts\Translation\TranslatorInterface;
2222

23+
/**
24+
* @group legacy
25+
*/
2326
class DataCollectorTranslatorPassTest extends TestCase
2427
{
2528
private ContainerBuilder $container;

Tests/DependencyInjection/Compiler/LoggingTranslatorPassTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
use Symfony\Component\DependencyInjection\Reference;
1818
use Symfony\Component\Translation\Translator;
1919

20+
/**
21+
* @group legacy
22+
*/
2023
class LoggingTranslatorPassTest extends TestCase
2124
{
2225
public function testProcess()

0 commit comments

Comments
 (0)