Skip to content

Commit b607b61

Browse files
Merge branch '7.4' into 8.0
* 7.4: [FrameworkBundle] Fix test on read-only directory on Windows [Config] Deprecate config builder generators
2 parents 8af022f + 5f8ea6a commit b607b61

File tree

5 files changed

+12
-5
lines changed

5 files changed

+12
-5
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ CHANGELOG
3737
* Add support for union types with `Symfony\Component\EventDispatcher\Attribute\AsEventListener`
3838
* Add `framework.allowed_http_method_override` option
3939
* Initialize `router.request_context`'s `_locale` parameter to `%kernel.default_locale%`
40+
* Deprecate `ConfigBuilderCacheWarmer`, return PHP arrays from your config instead
4041

4142
7.3
4243
---

CacheWarmer/ConfigBuilderCacheWarmer.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
* Generate all config builders.
3030
*
3131
* @author Tobias Nyholm <tobias.nyholm@gmail.com>
32+
*
33+
* @deprecated since Symfony 7.4
3234
*/
3335
final class ConfigBuilderCacheWarmer implements CacheWarmerInterface
3436
{

Resources/config/services.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
use Psr\Clock\ClockInterface as PsrClockInterface;
1515
use Psr\EventDispatcher\EventDispatcherInterface as PsrEventDispatcherInterface;
16-
use Symfony\Bundle\FrameworkBundle\CacheWarmer\ConfigBuilderCacheWarmer;
1716
use Symfony\Bundle\FrameworkBundle\HttpCache\HttpCache;
1817
use Symfony\Component\Clock\Clock;
1918
use Symfony\Component\Clock\ClockInterface;
@@ -234,9 +233,6 @@ class_exists(WorkflowEvents::class) ? WorkflowEvents::ALIASES : []
234233
->args([
235234
service('container.getenv'),
236235
])
237-
->set('config_builder.warmer', ConfigBuilderCacheWarmer::class)
238-
->args([service(KernelInterface::class), service('logger')->nullOnInvalid()])
239-
->tag('kernel.cache_warmer')
240236

241237
->set('clock', Clock::class)
242238
->alias(ClockInterface::class, 'clock')

Tests/CacheWarmer/ConfigBuilderCacheWarmerTest.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
namespace Symfony\Bundle\FrameworkBundle\Tests\CacheWarmer;
1313

14+
use PHPUnit\Framework\Attributes\Group;
15+
use PHPUnit\Framework\Attributes\IgnoreDeprecations;
1416
use Symfony\Bundle\FrameworkBundle\CacheWarmer\ConfigBuilderCacheWarmer;
1517
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
1618
use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
@@ -31,7 +33,9 @@
3133
use Symfony\Component\HttpKernel\Kernel;
3234
use Symfony\Component\HttpKernel\KernelInterface;
3335

34-
class ConfigBuilderCacheWarmerTest extends TestCase
36+
#[IgnoreDeprecations]
37+
#[Group('legacy')]
38+
final class ConfigBuilderCacheWarmerTest extends TestCase
3539
{
3640
private string $varDir;
3741

Tests/DependencyInjection/Compiler/PhpConfigReferenceDumpPassTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ public function testProcessWithConfigDir()
6161

6262
public function testProcessIgnoresFileWriteErrors()
6363
{
64+
if ('\\' === \DIRECTORY_SEPARATOR) {
65+
self::markTestSkipped('Cannot reliably make directory read-only on Windows.');
66+
}
67+
6468
// Create a read-only directory to simulate write errors
6569
$readOnlyDir = $this->tempDir.'/readonly';
6670
mkdir($readOnlyDir, 0o444, true);

0 commit comments

Comments
 (0)