Skip to content

Commit c40ec38

Browse files
committed
Merge branch '6.4' into 7.0
* 6.4: Compare paths after realpath() has been applied to both fix AssetMapper usage without assets enabled Bump Symfony version to 6.4.10 Update VERSION for 6.4.9 Update CHANGELOG for 6.4.9
2 parents ad1225c + 4a48cfe commit c40ec38

File tree

7 files changed

+48
-1
lines changed

7 files changed

+48
-1
lines changed

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1308,6 +1308,10 @@ private function registerAssetMapperConfiguration(array $config, ContainerBuilde
13081308
{
13091309
$loader->load('asset_mapper.php');
13101310

1311+
if (!$assetEnabled) {
1312+
$container->removeDefinition('asset_mapper.asset_package');
1313+
}
1314+
13111315
if (!$httpClientEnabled) {
13121316
$container->register('asset_mapper.http_client', HttpClientInterface::class)
13131317
->addTag('container.error')
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
3+
$container->loadFromExtension('framework', [
4+
'annotations' => false,
5+
'asset_mapper' => null,
6+
'assets' => false,
7+
'handle_all_throwables' => true,
8+
'http_method_override' => false,
9+
'php_errors' => ['log' => true],
10+
]);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" ?>
2+
<container xmlns="http://symfony.com/schema/dic/services"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xmlns:framework="http://symfony.com/schema/dic/symfony"
5+
xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd
6+
http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd">
7+
8+
<framework:config http-method-override="false" handle-all-throwables="true">
9+
<framework:annotations enabled="false" />
10+
<framework:asset-mapper enabled="true" />
11+
<framework:assets enabled="false" />
12+
<framework:php-errors log="true" />
13+
</framework:config>
14+
</container>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
framework:
2+
annotations: false
3+
asset_mapper: ~
4+
assets: false
5+
handle_all_throwables: true
6+
http_method_override: false
7+
php_errors:
8+
log: true

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTestCase.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2318,6 +2318,16 @@ public function testWebhookWithoutSerializer()
23182318
);
23192319
}
23202320

2321+
public function testAssetMapperWithoutAssets()
2322+
{
2323+
$container = $this->createContainerFromFile('asset_mapper_without_assets');
2324+
2325+
$this->assertTrue($container->has('asset_mapper'));
2326+
$this->assertFalse($container->has('asset_mapper.asset_package'));
2327+
$this->assertFalse($container->has('assets.packages'));
2328+
$this->assertFalse($container->has('assets._default_package'));
2329+
}
2330+
23212331
protected function createContainer(array $data = [])
23222332
{
23232333
return new ContainerBuilder(new EnvPlaceholderParameterBag(array_merge([

src/Symfony/Component/HttpKernel/Kernel.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -521,6 +521,7 @@ protected function initializeContainer(): void
521521
touch($oldContainerDir.'.legacy');
522522
}
523523

524+
$buildDir = $this->container->getParameter('kernel.build_dir');
524525
$cacheDir = $this->container->getParameter('kernel.cache_dir');
525526
$preload = $this instanceof WarmableInterface ? (array) $this->warmUp($cacheDir, $buildDir) : [];
526527

src/Symfony/Component/HttpKernel/Tests/KernelTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ public function testWarmup()
452452
$kernel->boot();
453453

454454
$this->assertTrue($kernel->warmedUp);
455-
$this->assertSame($kernel->getBuildDir(), $kernel->warmedUpBuildDir);
455+
$this->assertSame(realpath($kernel->getBuildDir()), $kernel->warmedUpBuildDir);
456456
}
457457

458458
public function testServicesResetter()

0 commit comments

Comments
 (0)