Skip to content

Commit 7741661

Browse files
committed
Deprecate doctrine/annotations integration
1 parent 7147751 commit 7741661

File tree

319 files changed

+500
-69
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

319 files changed

+500
-69
lines changed

.github/expected-missing-return-types.diff

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -867,28 +867,6 @@ index 3f99eff48d..80888c4a71 100644
867867
+ public function __wakeup(): void
868868
{
869869
foreach ($this as $k => $v) {
870-
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Kernel/ConcreteMicroKernel.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Kernel/ConcreteMicroKernel.php
871-
index def880b231..a51078adbb 100644
872-
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Kernel/ConcreteMicroKernel.php
873-
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Kernel/ConcreteMicroKernel.php
874-
@@ -69,5 +69,5 @@ class ConcreteMicroKernel extends Kernel implements EventSubscriberInterface
875-
}
876-
877-
- public function __wakeup()
878-
+ public function __wakeup(): void
879-
{
880-
throw new \BadMethodCallException('Cannot unserialize '.__CLASS__);
881-
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Kernel/flex-style/src/FlexStyleMicroKernel.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Kernel/flex-style/src/FlexStyleMicroKernel.php
882-
index bf529a5804..b15729362b 100644
883-
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Kernel/flex-style/src/FlexStyleMicroKernel.php
884-
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Kernel/flex-style/src/FlexStyleMicroKernel.php
885-
@@ -70,5 +70,5 @@ class FlexStyleMicroKernel extends Kernel
886-
}
887-
888-
- public function __wakeup()
889-
+ public function __wakeup(): void
890-
{
891-
throw new \BadMethodCallException('Cannot unserialize '.__CLASS__);
892870
diff --git a/src/Symfony/Bundle/FrameworkBundle/Translation/Translator.php b/src/Symfony/Bundle/FrameworkBundle/Translation/Translator.php
893871
index dac3b6394f..d319cb0824 100644
894872
--- a/src/Symfony/Bundle/FrameworkBundle/Translation/Translator.php

UPGRADE-6.4.md

Lines changed: 6 additions & 0 deletions

src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md

Lines changed: 5 additions & 0 deletions

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1716,6 +1716,8 @@ private function registerAnnotationsConfiguration(array $config, ContainerBuilde
17161716
throw new LogicException('Annotations cannot be enabled as the Doctrine Annotation library is not installed. Try running "composer require doctrine/annotations".');
17171717
}
17181718

1719+
trigger_deprecation('symfony/framework-bundle', '6.4', 'Enabling the integration of Doctrine annotations is deprecated. Set the "framework.annotations.enabled" config option to false.');
1720+
17191721
$loader->load('annotations.php');
17201722

17211723
if ('none' === $config['cache']) {

src/Symfony/Bundle/FrameworkBundle/Tests/Command/AboutCommand/Fixture/TestAppKernel.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ public function registerContainerConfiguration(LoaderInterface $loader): void
3434
{
3535
$loader->load(static function (ContainerBuilder $container) {
3636
$container->loadFromExtension('framework', [
37+
'annotations' => false,
3738
'http_method_override' => false,
3839
]);
3940
});

src/Symfony/Bundle/FrameworkBundle/Tests/Command/CacheClearCommand/CacheClearCommandTest.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,8 @@
2525

2626
class CacheClearCommandTest extends TestCase
2727
{
28-
/** @var TestAppKernel */
29-
private $kernel;
30-
/** @var Filesystem */
31-
private $fs;
28+
private TestAppKernel $kernel;
29+
private Filesystem $fs;
3230

3331
protected function setUp(): void
3432
{
@@ -112,7 +110,7 @@ public function testCacheIsWarmedWhenCalledTwice()
112110
$application->setCatchExceptions(false);
113111
$application->doRun($input, new NullOutput());
114112

115-
$this->assertTrue(is_file($this->kernel->getCacheDir().'/annotations.php'));
113+
$this->assertTrue(is_file($this->kernel->getCacheDir().'/dummy.txt'));
116114
}
117115

118116
public function testCacheIsWarmedWithOldContainer()

src/Symfony/Bundle/FrameworkBundle/Tests/Command/CacheClearCommand/Fixture/TestAppKernel.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
1616
use Symfony\Component\Config\Loader\LoaderInterface;
1717
use Symfony\Component\DependencyInjection\ContainerBuilder;
18+
use Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerInterface;
1819
use Symfony\Component\HttpKernel\Kernel;
1920

2021
class TestAppKernel extends Kernel
@@ -39,5 +40,22 @@ public function registerContainerConfiguration(LoaderInterface $loader): void
3940
protected function build(ContainerBuilder $container): void
4041
{
4142
$container->register('logger', NullLogger::class);
43+
$container->register(DummyFileCacheWarmer::class)
44+
->addTag('kernel.cache_warmer');
45+
}
46+
}
47+
48+
class DummyFileCacheWarmer implements CacheWarmerInterface
49+
{
50+
public function isOptional(): bool
51+
{
52+
return false;
53+
}
54+
55+
public function warmUp(string $cacheDir): array
56+
{
57+
file_put_contents($cacheDir.'/dummy.txt', 'Hello');
58+
59+
return [];
4260
}
4361
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
framework:
2+
annotations: false
23
http_method_override: false
34
secret: test

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/assets.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22

33
$container->loadFromExtension('framework', [
4+
'annotations' => false,
45
'http_method_override' => false,
56
'assets' => [
67
'version' => 'SomeVersionScheme',

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/assets_disabled.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22

33
$container->loadFromExtension('framework', [
4+
'annotations' => false,
45
'http_method_override' => false,
56
'assets' => [
67
'enabled' => false,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy