Skip to content

Commit d9c7865

Browse files
Merge branch '6.4' into 7.0
* 6.4: [AssetMapper] Allow simple, relative paths in importmap.php [PropertyInfo] Make isWriteable() more consistent with isReadable() when checking snake_case properties [AssetMapper] Add support for CSS files in the importmap [Messenger] Add `--all` option to the `messenger:failed:remove` command Fix merge fix #51235 - fix the order of merging of serializationContext and self::CONTEXT_DENORMALIZE [HttpClient] Fix Static Code Analyzer issue with JsonMockResponse [Messenger] Fix exiting `FailedMessagesRetryCommand` [Serializer] Fix reindex normalizedData array in AbstractObjectNormalizer::denormalize() remove an unreachable code branch [Validator] Fix `File::$extensions`’ PHPDoc [Mime] Fix email (de)serialization issues [FrameworkBundle][WebProfilerBundle][Console][Form][HttpKernel][PropertyInfo][Validator] Remove optional before required param Replace usages of SkippedTestSuiteError with markTestSkipped() call Update InteractiveAuthenticatorInterface description wording to match documentation [Serializer] Fix parsing XML root node attributes fix parsing of payload timestamp to DateTimeImmutable Fix routing to multiple fallback transports Fix missing stamps in delayed message handling [DoctrineBridge] Ignore invalid stores in `LockStoreSchemaListener` raised by `StoreFactory`
2 parents 536ca30 + e03975d commit d9c7865

File tree

4 files changed

+28
-11
lines changed

4 files changed

+28
-11
lines changed

DependencyInjection/FrameworkExtension.php

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1321,23 +1321,27 @@ private function registerAssetMapperConfiguration(array $config, ContainerBuilde
13211321
->setArgument(0, $config['missing_import_mode']);
13221322

13231323
$container->getDefinition('asset_mapper.compiler.javascript_import_path_compiler')
1324-
->setArgument(0, $config['missing_import_mode']);
1324+
->setArgument(1, $config['missing_import_mode']);
13251325

13261326
$container
13271327
->getDefinition('asset_mapper.importmap.manager')
1328-
->replaceArgument(2, $config['importmap_path'])
13291328
->replaceArgument(3, $config['vendor_dir'])
13301329
;
13311330

1331+
$container
1332+
->getDefinition('asset_mapper.importmap.config_reader')
1333+
->replaceArgument(0, $config['importmap_path'])
1334+
;
1335+
13321336
$container
13331337
->getDefinition('asset_mapper.importmap.resolver')
13341338
->replaceArgument(0, $config['provider'])
13351339
;
13361340

13371341
$container
13381342
->getDefinition('asset_mapper.importmap.renderer')
1339-
->replaceArgument(2, $config['importmap_polyfill'] ?? ImportMapManager::POLYFILL_URL)
1340-
->replaceArgument(3, $config['importmap_script_attributes'])
1343+
->replaceArgument(3, $config['importmap_polyfill'] ?? ImportMapManager::POLYFILL_URL)
1344+
->replaceArgument(4, $config['importmap_script_attributes'])
13411345
;
13421346

13431347
$container->registerForAutoconfiguration(PackageResolverInterface::class)
@@ -2046,6 +2050,13 @@ private function registerMessengerConfiguration(array $config, ContainerBuilder
20462050
$container->getDefinition('messenger.transport.beanstalkd.factory')->addTag('messenger.transport_factory');
20472051
}
20482052

2053+
if ($config['stop_worker_on_signals'] && $this->hasConsole()) {
2054+
$container->getDefinition('console.command.messenger_consume_messages')
2055+
->replaceArgument(8, $config['stop_worker_on_signals']);
2056+
$container->getDefinition('console.command.messenger_failed_messages_retry')
2057+
->replaceArgument(6, $config['stop_worker_on_signals']);
2058+
}
2059+
20492060
if (null === $config['default_bus'] && 1 === \count($config['buses'])) {
20502061
$config['default_bus'] = key($config['buses']);
20512062
}

Resources/config/asset_mapper.php

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
use Symfony\Component\AssetMapper\AssetMapperRepository;
1919
use Symfony\Component\AssetMapper\Command\AssetMapperCompileCommand;
2020
use Symfony\Component\AssetMapper\Command\DebugAssetMapperCommand;
21-
use Symfony\Component\AssetMapper\Command\ImportMapExportCommand;
2221
use Symfony\Component\AssetMapper\Command\ImportMapInstallCommand;
2322
use Symfony\Component\AssetMapper\Command\ImportMapRemoveCommand;
2423
use Symfony\Component\AssetMapper\Command\ImportMapRequireCommand;
@@ -28,6 +27,7 @@
2827
use Symfony\Component\AssetMapper\Compiler\SourceMappingUrlsCompiler;
2928
use Symfony\Component\AssetMapper\Factory\CachedMappedAssetFactory;
3029
use Symfony\Component\AssetMapper\Factory\MappedAssetFactory;
30+
use Symfony\Component\AssetMapper\ImportMap\ImportMapConfigReader;
3131
use Symfony\Component\AssetMapper\ImportMap\ImportMapManager;
3232
use Symfony\Component\AssetMapper\ImportMap\ImportMapRenderer;
3333
use Symfony\Component\AssetMapper\ImportMap\Resolver\JsDelivrEsmResolver;
@@ -100,6 +100,7 @@
100100
param('kernel.project_dir'),
101101
abstract_arg('public directory name'),
102102
param('kernel.debug'),
103+
service('event_dispatcher')->nullOnInvalid(),
103104
])
104105
->tag('console.command')
105106

@@ -130,17 +131,23 @@
130131

131132
->set('asset_mapper.compiler.javascript_import_path_compiler', JavaScriptImportPathCompiler::class)
132133
->args([
134+
service('asset_mapper.importmap.manager'),
133135
abstract_arg('missing import mode'),
134136
service('logger'),
135137
])
136138
->tag('asset_mapper.compiler')
137139
->tag('monolog.logger', ['channel' => 'asset_mapper'])
138140

141+
->set('asset_mapper.importmap.config_reader', ImportMapConfigReader::class)
142+
->args([
143+
abstract_arg('importmap.php path'),
144+
])
145+
139146
->set('asset_mapper.importmap.manager', ImportMapManager::class)
140147
->args([
141148
service('asset_mapper'),
142149
service('asset_mapper.public_assets_path_resolver'),
143-
abstract_arg('importmap.php path'),
150+
service('asset_mapper.importmap.config_reader'),
144151
abstract_arg('vendor directory'),
145152
service('asset_mapper.importmap.resolver'),
146153
service('http_client'),
@@ -180,6 +187,7 @@
180187
->set('asset_mapper.importmap.renderer', ImportMapRenderer::class)
181188
->args([
182189
service('asset_mapper.importmap.manager'),
190+
service('assets.packages')->nullOnInvalid(),
183191
param('kernel.charset'),
184192
abstract_arg('polyfill URL'),
185193
abstract_arg('script HTML attributes'),
@@ -201,10 +209,6 @@
201209
->args([service('asset_mapper.importmap.manager')])
202210
->tag('console.command')
203211

204-
->set('asset_mapper.importmap.command.export', ImportMapExportCommand::class)
205-
->args([service('asset_mapper.importmap.manager')])
206-
->tag('console.command')
207-
208212
->set('asset_mapper.importmap.command.install', ImportMapInstallCommand::class)
209213
->args([service('asset_mapper.importmap.manager')])
210214
->tag('console.command')

Resources/config/console.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@
165165
service('messenger.listener.reset_services')->nullOnInvalid(),
166166
[], // Bus names
167167
service('messenger.rate_limiter_locator')->nullOnInvalid(),
168+
null,
168169
])
169170
->tag('console.command')
170171
->tag('monolog.logger', ['channel' => 'messenger'])
@@ -196,6 +197,7 @@
196197
service('event_dispatcher'),
197198
service('logger')->nullOnInvalid(),
198199
service('messenger.transport.native_php_serializer')->nullOnInvalid(),
200+
null,
199201
])
200202
->tag('console.command')
201203
->tag('monolog.logger', ['channel' => 'messenger'])

Tests/DependencyInjection/XmlFrameworkExtensionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function testAssetMapper()
5151
$this->assertSame(['zip' => 'application/zip'], $definition->getArgument(2));
5252

5353
$definition = $container->getDefinition('asset_mapper.importmap.renderer');
54-
$this->assertSame(['data-turbo-track' => 'reload'], $definition->getArgument(3));
54+
$this->assertSame(['data-turbo-track' => 'reload'], $definition->getArgument(4));
5555

5656
$definition = $container->getDefinition('asset_mapper.repository');
5757
$this->assertSame(['assets/' => '', 'assets2/' => 'my_namespace'], $definition->getArgument(0));

0 commit comments

Comments
 (0)