Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 122109f

Browse filesBrowse files
Merge branch '6.4' into 7.0
* 6.4: [HttpClient][Mailer] Revert "Let curl handle transfer encoding", use HTTP/1.1 for Mailgun Reviewed Catalan missing translations [AssetMapper] Upgrade importmap polyfill Fix typo: synchronous -> synchronously [Serializer] Check if exception message in test is correct Ibexa is sponsoring Symfony 5.4, thanks to them! \o/ [VarDumper] Fix `FFICaster` test to be platform-adaptable [String] Add `alias` case to `EnglishInflector` [FrameworkBundle] Throw runtime exception when trying to use asset-mapper while http-client is disabled [SecurityBundle] Remove unused memory users’ `name` attribute from the XSD [VarExporter] generate __doUnserialize() method in ProxyHelper::generateLazyProxy() Double check if pcntl function exists Add additional headers in Scaleway bridge [VarDumper] Fix FFI caster test [DependencyInjection] Add test coverage for `AutowireCallable::buildDefinition()`
2 parents f44feb2 + c1d1cb0 commit 122109f
Copy full SHA for 122109f

File tree

Expand file treeCollapse file tree

2 files changed

+11
-7
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+11
-7
lines changed

‎DependencyInjection/FrameworkExtension.php

Copy file name to clipboardExpand all lines: DependencyInjection/FrameworkExtension.php
+6-4Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ public function load(array $configs, ContainerBuilder $container): void
339339
throw new LogicException('AssetMapper support cannot be enabled as the AssetMapper component is not installed. Try running "composer require symfony/asset-mapper".');
340340
}
341341

342-
$this->registerAssetMapperConfiguration($config['asset_mapper'], $container, $loader, $this->readConfigEnabled('assets', $container, $config['assets']));
342+
$this->registerAssetMapperConfiguration($config['asset_mapper'], $container, $loader, $this->readConfigEnabled('assets', $container, $config['assets']), $this->readConfigEnabled('http_client', $container, $config['http_client']));
343343
} else {
344344
$container->removeDefinition('cache.asset_mapper');
345345
}
@@ -1304,12 +1304,14 @@ private function registerAssetsConfiguration(array $config, ContainerBuilder $co
13041304
}
13051305
}
13061306

1307-
private function registerAssetMapperConfiguration(array $config, ContainerBuilder $container, PhpFileLoader $loader, bool $assetEnabled): void
1307+
private function registerAssetMapperConfiguration(array $config, ContainerBuilder $container, PhpFileLoader $loader, bool $assetEnabled, bool $httpClientEnabled): void
13081308
{
13091309
$loader->load('asset_mapper.php');
13101310

1311-
if (!$assetEnabled) {
1312-
$container->removeDefinition('asset_mapper.asset_package');
1311+
if (!$httpClientEnabled) {
1312+
$container->register('asset_mapper.http_client', HttpClientInterface::class)
1313+
->addTag('container.error')
1314+
->addError('You cannot use the AssetMapper integration since the HttpClient component is not enabled. Try enabling the "framework.http_client" config option.');
13131315
}
13141316

13151317
$paths = $config['paths'];

‎Resources/config/asset_mapper.php

Copy file name to clipboardExpand all lines: Resources/config/asset_mapper.php
+5-3Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@
5454
])
5555
->alias(AssetMapperInterface::class, 'asset_mapper')
5656

57+
->alias('asset_mapper.http_client', 'http_client')
58+
5759
->set('asset_mapper.mapped_asset_factory', MappedAssetFactory::class)
5860
->args([
5961
service('asset_mapper.public_assets_path_resolver'),
@@ -197,7 +199,7 @@
197199
])
198200

199201
->set('asset_mapper.importmap.resolver', JsDelivrEsmResolver::class)
200-
->args([service('http_client')])
202+
->args([service('asset_mapper.http_client')])
201203

202204
->set('asset_mapper.importmap.renderer', ImportMapRenderer::class)
203205
->args([
@@ -212,12 +214,12 @@
212214
->set('asset_mapper.importmap.auditor', ImportMapAuditor::class)
213215
->args([
214216
service('asset_mapper.importmap.config_reader'),
215-
service('http_client'),
217+
service('asset_mapper.http_client'),
216218
])
217219
->set('asset_mapper.importmap.update_checker', ImportMapUpdateChecker::class)
218220
->args([
219221
service('asset_mapper.importmap.config_reader'),
220-
service('http_client'),
222+
service('asset_mapper.http_client'),
221223
])
222224

223225
->set('asset_mapper.importmap.command.require', ImportMapRequireCommand::class)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.