8000 Merge branch '6.0' into 6.1 · symfony/symfony@6382e76 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6382e76

Browse files
committed
Merge branch '6.0' into 6.1
* 6.0: Fix CS Compatibility with doctrine/annotations 2 [Console] Fix a test when pcntl is not available (following #48329) [FrameworkBundle] fix: fix typo about help
2 parents 6142446 + 32cba7c commit 6382e76

File tree

18 files changed

+31
-18
lines changed

18 files changed

+31
-18
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
< EDBE col width="44"/>
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@
120120
"async-aws/sqs": "^1.0",
121121
"async-aws/sns": "^1.0",
122122
"cache/integration-tests": "dev-master",
123-
"doctrine/annotations": "^1.13.1",
123+
"doctrine/annotations": "^1.13.1|^2",
124124
"doctrine/collections": "^1.0|^2.0",
125125
"doctrine/data-fixtures": "^1.1",
126126
"doctrine/dbal": "^2.13.1|^3.0",

src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/DoctrineExtractorTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use Doctrine\DBAL\Types\Type as DBALType;
1616
use Doctrine\ORM\EntityManager;
1717
use Doctrine\ORM\Mapping\Column;
18+
use Doctrine\ORM\ORMSetup;
1819
use Doctrine\ORM\Tools\Setup;
1920
use PHPUnit\Framework\TestCase;
2021
use Symfony\Bridge\Doctrine\PropertyInfo\DoctrineExtractor;
@@ -33,7 +34,9 @@ class DoctrineExtractorTest extends TestCase
3334
{
3435
private function createExtractor()
3536
{
36-
$config = Setup::createAnnotationMetadataConfiguration([__DIR__.\DIRECTORY_SEPARATOR.'Fixtures'], true);
37+
$config = class_exists(ORMSetup::class)
38+
? ORMSetup::createAnnotationMetadataConfiguration([__DIR__.\DIRECTORY_SEPARATOR.'Fixtures'], true)
39+
: Setup::createAnnotationMetadataConfiguration([__DIR__.\DIRECTORY_SEPARATOR.'Fixtures'], true);
3740
$entityManager = EntityManager::create(['driver' => 'pdo_sqlite'], $config);
3841

3942
if (!DBALType::hasType('foo')) {

src/Symfony/Bridge/Doctrine/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"symfony/validator": "^5.4|^6.0",
4343
"symfony/translation": "^5.4|^6.0",
4444
"symfony/var-dumper": "^5.4|^6.0",
45-
"doctrine/annotations": "^1.10.4",
45+
"doctrine/annotations": "^1.10.4|^2",
4646
"doctrine/collections": "^1.0|^2.0",
4747
"doctrine/data-fixtures": "^1.1",
4848
"doctrine/dbal": "^2.13.1|^3.0",

src/Symfony/Bridge/PhpUnit/Legacy/SymfonyTestsListenerTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public function startTestSuite($suite)
138138
if (!class_exists(AnnotationRegistry::class, false) && class_exists(AnnotationRegistry::class)) {
139139
if (method_exists(AnnotationRegistry::class, 'registerUniqueLoader')) {
140140
AnnotationRegistry::registerUniqueLoader('class_exists');
141-
} else {
141+
} elseif (method_exists(AnnotationRegistry::class, 'registerLoader')) {
142142
AnnotationRegistry::registerLoader('class_exists');
143143
}
144144
}

src/Symfony/Bridge/PhpUnit/bootstrap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
if (!class_exists(AnnotationRegistry::class, false) && class_exists(AnnotationRegistry::class)) {
3131
if (method_exists(AnnotationRegistry::class, 'registerUniqueLoader')) {
3232
AnnotationRegistry::registerUniqueLoader('class_exists');
33-
} else {
33+
} elseif (method_exists(AnnotationRegistry::class, 'registerLoader')) {
3434
AnnotationRegistry::registerLoader('class_exists');
3535
}
3636
}

src/Symfony/Bridge/Twig/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"twig/twig": "^2.13|^3.0.4"
2222
},
2323
"require-dev": {
24-
"doctrine/annotations": "^1.12",
24+
"doctrine/annotations": "^1.12|^2",
2525
"egulias/email-validator": "^2.1.10|^3",
2626
"phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0",
2727
"symfony/asset": "^5.4|^6.0",

src/Symfony/Bundle/FrameworkBundle/Command/ConfigDumpReferenceCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
9797

9898
$errorIo->comment([
9999
'Provide the name of a bundle as the first argument of this command to dump its default configuration. (e.g. <comment>config:dump-reference FrameworkBundle</comment>)',
100-
'For dumping a specific option, add its path as the second argument of this command. (e.g. <comment>config:dump-reference FrameworkBundle profiler.matcher</comment> to dump the <comment>framework.profiler.matcher</comment> configuration)',
100+
'For dumping a specific option, add its path as the second argument of this command. (e.g. <comment>config:dump-reference FrameworkBundle http_client.default_options</comment> to dump the <comment>framework.http_client.default_options</comment> configuration)',
101101
]);
102102

103103
return 0;

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1646,8 +1646,12 @@ private function registerAnnotationsConfiguration(array $config, ContainerBuilde
16461646
$loader->load('annotations.php');
16471647

16481648
if (!method_exists(AnnotationRegistry::class, 'registerUniqueLoader')) {
1649-
$container->getDefinition('annotations.dummy_registry')
1650-
->setMethodCalls([['registerLoader', ['class_exists']]]);
1649+
if (method_exists(AnnotationRegistry::class, 'registerLoader')) {
1650+
$container->getDefinition('annotations.dummy_registry')
1651+
->setMethodCalls([['registerLoader', ['class_exists']]]);
1652+
} else {
1653+
$container->removeDefinition('annotations.dummy_registry');
1654+
}
16511655
}
16521656

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

src/Symfony/Bundle/FrameworkBundle/Resources/config/annotations.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
->set('annotations.reader', AnnotationReader::class)
2626
->call('addGlobalIgnoredName', [
2727
'required',
28-
service('annotations.dummy_registry'), // dummy arg to register class_exists as annotation loader only when required
28+
service('annotations.dummy_registry')->ignoreOnInvalid(), // dummy arg to register class_exists as annotation loader only when required
2929
])
3030

3131
->set('annotations.dummy_registry', AnnotationRegistry::class)

src/Symfony/Bundle/FrameworkBundle/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"symfony/routing": "^5.4|^6.0"
3434
},
3535
"require-dev": {
36-
"doctrine/annotations": "^1.13.1",
36+
"doctrine/annotations": "^1.13.1|^2",
3737
"doctrine/persistence": "^1.3|^2|^3",
3838
"symfony/asset": "^5.4|^6.0",
3939
"symfony/browser-kit": "^5.4|^6.0",

src/Symfony/Bundle/SecurityBundle/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"symfony/security-http": "^5.4|^6.0"
3131
},
3232
"require-dev": {
33-
"doctrine/annotations": "^1.10.4",
33+
"doctrine/annotations": "^1.10.4|^2",
3434
"symfony/asset": "^5.4|^6.0",
3535
"symfony/browser-kit": "^5.4|^6.0",
3636
"symfony/console": "^5.4|^6.0",

src/Symfony/Bundle/TwigBundle/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"symfony/yaml": "^5.4|^6.0",
3838
"symfony/framework-bundle": "^5.4|^6.0",
3939
"symfony/web-link": "^5.4|^6.0",
40-
"doctrine/annotations": "^1.10.4"
40+
"doctrine/annotations": "^1.10.4|^2"
4141
},
4242
"conflict": {
4343
"symfony/framework-bundle": "<5.4",

src/Symfony/Component/Console/Tests/ApplicationTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1969,6 +1969,10 @@ public function testSetSignalsToDispatchEvent()
19691969

19701970
public function testSignalableCommandInterfaceWithoutSignals()
19711971
{
1972+
if (!\defined('SIGUSR1')) {
1973+
$this->markTestSkipped('SIGUSR1 not available');
1974+
}
1975+
19721976
$command = new SignableCommand(false);
19731977

19741978
$dispatcher = new EventDispatcher();

src/Symfony/Component/PropertyInfo/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"symfony/dependency-injection": "^5.4|^6.0",
3333
"phpdocumentor/reflection-docblock": "^5.2",
3434
"phpstan/phpdoc-parser": "^1.0",
35-
"doctrine/annotations": "^1.10.4"
35+
"doctrine/annotations": "^1.10.4|^2"
3636
},
3737
"conflict": {
3838
"phpdocumentor/reflection-docblock": "<5.2",

src/Symfony/Component/Routing/Tests/Loader/AnnotationClassLoaderWithAnnotationsTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ protected function configureRoute(Route $route, \ReflectionClass $class, \Reflec
2626
{
2727
}
2828
};
29-
AnnotationRegistry::registerLoader('class_exists');
29+
if (method_exists(AnnotationRegistry::class, 'registerLoader')) {
30+
AnnotationRegistry::registerLoader('class_exists');
31+
}
3032
}
3133

3234
public function testDefaultRouteName()

src/Symfony/Component/Routing/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"symfony/yaml": "^5.4|^6.0",
2525
"symfony/expression-language": "^5.4|^6.0",
2626
"symfony/dependency-injection": "^5.4|^6.0",
27-
"doctrine/annotations": "^1.12",
27+
"doctrine/annotations": "^1.12|^2",
2828
"psr/log": "^1|^2|^3"
2929
},
3030
"conflict": {

src/Symfony/Component/Serializer/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"symfony/polyfill-ctype": "~1.8"
2121
},
2222
"require-dev": {
23-
"doctrine/annotations": "^1.12",
23+
"doctrine/annotations": "^1.12|^2",
2424
"phpdocumentor/reflection-docblock": "^3.2|^4.0|^5.0",
2525
"symfony/cache": "^5.4|^6.0",
2626
"symfony/config": "^5.4|^6.0",

src/Symfony/Component/Validator/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"symfony/property-access": "^5.4|^6.0",
3939
"symfony/property-info": "^5.4|^6.0",
4040
"symfony/translation": "^5.4|^6.0",
41-
"doctrine/annotations": "^1.13",
41+
"doctrine/annotations": "^1.13|^2",
4242
"egulias/email-validator": "^2.1.10|^3"
4343
},
4444
"conflict": {

0 commit comments

Comments
 (0)
0