Skip to content

Commit f194b1b

Browse files
Merge branch '7.2' into 7.3
* 7.2: Revert "bug symfony#58937 [FrameworkBundle] Don't auto-register form/csrf when the corresponding components are not installed (nicolas-grekas)" Fix merge fix: ignore missing directory in isVendor() [OptionsResolver] Allow Union/Intersection Types in Resolved Closures Issue symfony#58821: [DependencyInjection] Support interfaces in ContainerBuilder::getReflectionClass(). Dynamically fix compatibility with doctrine/data-fixtures v2 [HttpKernel] Ensure HttpCache::getTraceKey() does not throw exception don't call EntityManager::initializeObject() with scalar values [FrameworkBundle] Don't auto-register form/csrf when the corresponding components are not installed make RelayProxyTrait compatible with relay extension 0.9.0 [Validator] review italian translations Update PR template
2 parents bec056a + 1fe94ae commit f194b1b

File tree

26 files changed

+401
-91
lines changed

26 files changed

+401
-91
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
| Q | A
22
| ------------- | ---
3-
| Branch? | 7.2 for features / 5.4, 6.4, and 7.1 for bug fixes <!-- see below -->
3+
| Branch? | 7.3 for features / 5.4, 6.4, 7.1, and 7.2 for bug fixes <!-- see below -->
44
| Bug fix? | yes/no
55
| New feature? | yes/no <!-- please update src/**/CHANGELOG.md files -->
66
| Deprecations? | yes/no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Run these steps to update this file:
2-
sed -i 's/ *"\*\*\/Tests\/",\?//' composer.json
2+
sed -i 's/ *"\*\*\/Tests\/",//' composer.json
33
composer u -o
44
SYMFONY_PATCH_TYPE_DECLARATIONS='force=2&php=8.1' php .github/patch-types.php
55
head=$(sed '/^diff /Q' .github/expected-missing-return-types.diff)

src/Symfony/Bridge/Doctrine/Tests/Security/RememberMe/DoctrineTokenProviderPostgresTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public static function setUpBeforeClass(): void
2121
}
2222
}
2323

24-
protected function bootstrapProvider()
24+
protected function bootstrapProvider(): DoctrineTokenProvider
2525
{
2626
$config = class_exists(ORMSetup::class) ? ORMSetup::createConfiguration(true) : new Configuration();
2727
if (class_exists(DefaultSchemaManagerFactory::class)) {

src/Symfony/Bridge/Doctrine/Tests/Security/RememberMe/DoctrineTokenProviderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public function testVerifyOutdatedTokenAfterParallelRequestFailsAfter60Seconds()
117117
$this->assertFalse($provider->verifyToken($token, $oldValue));
118118
}
119119

120-
private function bootstrapProvider(): DoctrineTokenProvider
120+
protected function bootstrapProvider(): DoctrineTokenProvider
121121
{
122122
$config = ORMSetup::createConfiguration(true);
123123
$config->setSchemaManagerFactory(new DefaultSchemaManagerFactory());

src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntityValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public function validate(mixed $value, Constraint $constraint): void
105105

106106
$criteria[$fieldName] = $fieldValue;
107107

108-
if (null !== $criteria[$fieldName] && $class->hasAssociation($fieldName)) {
108+
if (\is_object($criteria[$fieldName]) && $class->hasAssociation($fieldName)) {
109109
/* Ensure the Proxy is initialized before using reflection to
110110
* read its identifiers. This is necessary because the wrapped
111111
* getter methods in the Proxy are being bypassed.

src/Symfony/Bridge/Doctrine/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"symfony/validator": "^6.4|^7.0",
4545
"symfony/var-dumper": "^6.4|^7.0",
4646
"doctrine/collections": "^1.8|^2.0",
47-
"doctrine/data-fixtures": "^1.1",
47+
"doctrine/data-fixtures": "^1.1|^2",
4848
"doctrine/dbal": "^3.6|^4",
4949
"doctrine/orm": "^2.15|^3",
5050
"psr/log": "^1|^2|^3"

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ private function addCsrfSection(ArrayNodeDefinition $rootNode): void
211211
->addDefaultsIfNotSet()
212212
->fixXmlConfig('stateless_token_id')
213213
->children()
214-
// defaults to framework.csrf_protection.stateless_token_ids || framework.session.enabled && !class_exists(FullStack::class) && interface_exists(CsrfTokenManagerInterface::class)
214+
// defaults to (framework.csrf_protection.stateless_token_ids || framework.session.enabled) && !class_exists(FullStack::class) && interface_exists(CsrfTokenManagerInterface::class)
215215
->scalarNode('enabled')->defaultNull()->end()
216216
->arrayNode('stateless_token_ids')
217217
->scalarPrototype()->end()

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,9 +466,9 @@ public function load(array $configs, ContainerBuilder $container): void
466466
$container->removeDefinition('test.session.listener');
467467
}
468468

469-
// csrf depends on session being registered
469+
// csrf depends on session or stateless token ids being registered
470470
if (null === $config['csrf_protection']['enabled']) {
471-
$this->writeConfigEnabled('csrf_protection', $config['csrf_protection']['stateless_token_ids'] || $this->readConfigEnabled('session', $container, $config['session']) && !class_exists(FullStack::class) && ContainerBuilder::willBeAvailable('symfony/security-csrf', CsrfTokenManagerInterface::class, ['symfony/framework-bundle']), $config['csrf_protection']);
471+
$this->writeConfigEnabled('csrf_protection', ($config['csrf_protection']['stateless_token_ids'] || $this->readConfigEnabled('session', $container, $config['session'])) && !class_exists(FullStack::class) && ContainerBuilder::willBeAvailable('symfony/security-csrf', CsrfTokenManagerInterface::class, ['symfony/framework-bundle']), $config['csrf_protection']);
472472
}
473473
$this->registerSecurityCsrfConfiguration($config['csrf_protection'], $container, $loader);
474474

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/form_csrf_disabled.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<framework:annotations enabled="false"/>
1313
<framework:php-errors log="true" />
1414
<framework:csrf-protection enabled="false"/>
15-
<framework:form enabled="true">
15+
<framework:form>
1616
<framework:csrf-protection enabled="true"/>
1717
</framework:form>
1818
</framework:config>

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/form_no_csrf.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<framework:config http-method-override="false" handle-all-throwables="true">
1010
<framework:annotations enabled="false" />
1111
<framework:php-errors log="true" />
12-
<framework:form enabled="true">
12+
<framework:form>
1313
<framework:csrf-protection enabled="false" />
1414
</framework:form>
1515
</framework:config>

0 commit comments

Comments
 (0)