8000 Merge branch '7.2' into 7.3 · symfony/symfony@c11519a · GitHub
[go: up one dir, main page]

Skip to content

Commit c11519a

Browse files
Merge branch '7.2' into 7.3
* 7.2: [Validator] Review Croatian translation [Validator] Review "twig template" translation Update Mailer Azure bridge API docs link Provide missing translations thanks to Gemini [DependencyInjection] Make `DefinitionErrorExceptionPass` consider `IGNORE_ON_UNINITIALIZED_REFERENCE` and `RUNTIME_EXCEPTION_ON_INVALID_REFERENCE` the same [FrameworkBundle] Fix declaring fiel-attr tags in xml config files [WebLink] Hint that prerender is deprecated [DependencyInjection] Fix missing binding for ServiceCollectionInterface when declaring a service subscriber
2 parents 94f4d7a + 1084655 commit c11519a

File tree

66 files changed

+134
-75
lines changed

Some content is hidden

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

66 files changed

+134
-75
lines changed

src/Symfony/Bridge/Twig/Extension/WebLinkExtension.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function getFunctions(): array
4444
/**
4545
* Adds a "Link" HTTP header.
4646
*
47-
* @param string $rel The relation type (e.g. "preload", "prefetch", "prerender" or "dns-prefetch")
47+
* @param string $rel The relation type (e.g. "preload", "prefetch", or "dns-prefetch")
4848
* @param array $attributes The attributes of this link (e.g. "['as' => true]", "['pr' => 0.5]")
4949
*
5050
* @return string The relation URI
@@ -115,7 +115,11 @@ public function prefetch(string $uri, array $attributes = []): string
115115
}
116116

117117
/**
118-
* Indicates to the client that it should prerender this resource .
118+
* Indicates to the client that it should prerender this resource.
119+
*
120+
* This feature is deprecated and superseded by the Speculation Rules API.
121+
*
122+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/rel/prerender
119123
*
120124
* @param array $attributes The attributes of this link (e.g. "['as' => true]", "['pr' => 0.5]")
121125
*

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@ private function addFormSection(ArrayNodeDefinition $rootNode, callable $enableI
257257
->arrayNode('field_attr')
258258
->performNoDeepMerging()
259259
->normalizeKeys(false)
260+
->useAttributeAsKey('name')
260261
->scalarPrototype()->end()
261262
->defaultValue(['data-controller' => 'csrf-protection'])
262263
->end()

src/Symfony/Bundle/FrameworkBundle/Resources/config/schema/symfony-1.0.xsd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
<xsd:attribute name="field-name" type="xsd:string" />
8181
</xsd:complexType>
8282

83-
<xsd:complexType name="field_attr">
83+
<xsd:complexType name="field_attr" mixed="true">
8484
<xsd:attribute name="name" type="xsd:string" use="required"/>
8585
</xsd:complexType>
8686

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php
2+
3+
$container->loadFromExtension('framework', [
4+
'annotations' => false,
5+
'http_method_override' => false,
6+
'handle_all_throwables' => true,
7+
'php_errors' => ['log' => true],
8+
'csrf_protection' => [
9+
'enabled' => true,
10+
],
11+
'form' => [
12+
'csrf_protection' => [
13+
'field-attr' => [
14+
'data-foo' => 'bar',
15+
'data-bar' => 'baz',
16+
],
17+
],
18+
],
19+
'session' => [
20+
'storage_factory_id' => 'session.storage.factory.native',
21+
],
22+
]);
Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,13 @@
99
<framework:config http-method-override="false" handle-all-throwables="true">
1010
<framework:annotations enabled="false" />
1111
<framework:php-errors log="true" />
12-
<framework:csrf-protection field-name="_custom" />
12+
<framework:csrf-protection enabled="true" />
13+
<framework:form>
14+
<framework:csrf-protection>
15+
<framework:field-attr name="data-foo">bar</framework:field-attr>
16+
<framework:field-attr name="data-bar">baz</framework:field-attr>
17+
</framework:csrf-protection>
18+
</framework:form>
1319
<framework:session storage-factory-id="session.storage.factory.native" />
1420
</framework:config>
1521
</container>

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

Lines changed: 0 additions & 15 deletions
This file was deleted.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
framework:
2+
anno 10000 tations: false
3+
http_method_override: false
4+
handle_all_throwables: true
5+
php_errors:
6+
log: true
7+
csrf_protection:
8+
enabled: true
9+
form:
10+
csrf_protection:
11+
enabled: true
12+
field_attr:
13+
data-foo: bar
14+
data-bar: baz
15+
session:
16+
storage_factory_id: session.storage.factory.native

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1491,6 +1491,17 @@ public function testFormsCanBeEnabledWithoutCsrfProtection()
14911491
$this->assertFalse($container->getParameter('form.type_extension.csrf.enabled'));
14921492
}
14931493

1494+
public function testFormCsrfFieldAttr()
1495+
{
1496+
$container = $this->createContainerFromFile('form_csrf_field_attr');
1497+
1498+
$expected = [
1499+
'data-foo' => 'bar',
1500+
'data-bar' => 'baz',
1501+
];
1502+
$this->assertSame($expected, $container->getParameter('form.type_extension.csrf.field_attr'));
1503+
}
1504+
14941505
public function testStopwatchEnabledWithDebugModeEnabled()
14951506
{
14961507
$container = $this->createContainerFromFile('default_config', [

src/Symfony/Component/DependencyInjection/Compiler/DefinitionErrorExceptionPass.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,10 @@ protected function processValue(mixed $value, bool $isRoot = false): mixed
6262
}
6363

6464
if ($value instanceof Reference && $this->currentId !== $targetId = (string) $value) {
65-
if (ContainerInterface::RUNTIME_EXCEPTION_ON_INVALID_REFERENCE === $value->getInvalidBehavior()) {
65+
if (
66+
ContainerInterface::RUNTIME_EXCEPTION_ON_INVALID_REFERENCE === $value->getInvalidBehavior()
67+
|| ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE === $value->getInvalidBehavior()
68+
) {
6669
$this->sourceReferences[$targetId][$this->currentId] ??= true;
6770
} else {
6871
$this->sourceReferences[$targetId][$this->currentId] = false;

src/Symfony/Component/DependencyInjection/Compiler/RegisterServiceSubscribersPass.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
use Symfony\Component\DependencyInjection\Reference;
2121
use Symfony\Component\DependencyInjection\TypedReference;
2222
use Symfony\Contracts\Service\Attribute\SubscribedService;
23+
use Symfony\Contracts\Service\ServiceCollectionInterface;
2324
use Symfony\Contracts\Service\ServiceProviderInterface;
2425
use Symfony\Contracts\Service\ServiceSubscriberInterface;
2526

@@ -134,6 +135,7 @@ protected function processValue(mixed $value, bool $isRoot = false): mixed
134135
$value->setBindings([
135136
PsrContainerInterface::class => new BoundArgument($locatorRef, false),
136137
ServiceProviderInterface::class => new BoundArgument($locatorRef, false),
138+
ServiceCollectionInterface::class => new BoundArgument($locatorRef, false),
137139
] + $value->getBindings());
138140

139141
return parent::processValue($value);

src/Symfony/Component/DependencyInjection/Tests/Compiler/DefinitionErrorExceptionPassTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ public function testSkipNestedErrors()
6464
$container->register('foo', 'stdClass')
6565
->addArgument(new Reference('bar', ContainerBuilder::RUNTIME_EXCEPTION_ON_INVALID_REFERENCE));
6666

67+
$container->register('baz', 'stdClass')
68+
->addArgument(new Reference('bar', ContainerBuilder::IGNORE_ON_UNINITIALIZED_REFERENCE));
69+
6770
$pass = new DefinitionErrorExceptionPass();
6871
$pass->process($container);
6972

src/Symfony/Component/Mailer/Bridge/Azure/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ where:
2121
Resources
2222
---------
2323

24-
* [Microsoft Azure (ACS) Email API Docs](https://learn.microsoft.com/en-us/rest/api/communication/dataplane/email/send)
24+
* [Microsoft Azure (ACS) Email API Docs](https://learn.microsoft.com/en-us/rest/api/communication/email/email/send)
2525
* [Contributing](https://symfony.com/doc/current/contributing/index.html)
2626
* [Report issues](https://github.com/symfony/symfony/issues) and
2727
[send Pull Requests](https://github.com/symfony/symfony/pulls)
28-
in the [main Symfony repository](https://github.com/symfony/symfony)
28+
in the [main Symfony repository](https://github.com/symfony/symfony)

src/Symfony/Component/Validator/Resources/translations/validators.af.xlf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@
472472
</trans-unit>
473473
<trans-unit id="121">
474474
<source>This value is not a valid Twig template.</source>
475-
<target state="needs-translation">This value is not a valid Twig template.</target>
475+
<target state="needs-review-translation">Hierdie waarde is nie 'n geldige Twig-sjabloon nie.</target>
476476
</trans-unit>
477477
</body>
478478
</file>

src/Symfony/Component/Validator/Resources/translations/validators.ar.xlf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@
472472
</trans-unit>
473473
<trans-unit id="121">
474474
<source>This value is not a valid Twig template.</source>
475-
<target state="needs-translation">This va B41A lue is not a valid Twig template.</target>
475+
<target state="needs-review-translation">هذه القيمة ليست نموذج Twig صالح.</target>
476476
</trans-unit>
477477
</body>
478478
</file>

src/Symfony/Component/Validator/Resources/translations/validators.az.xlf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@
472472
</trans-unit>
473473
<trans-unit id="121">
474474
<source>This value is not a valid Twig template.</source>
475-
<target state="needs-translation">This value is not a valid Twig template.</target>
475+
<target state="needs-review-translation">Bu dəyər etibarlı Twig şablonu deyil.</target>
476476
</trans-unit>
477477
</body>
478478
</file>

src/Symfony/Component/Validator/Resources/translations/validators.be.xlf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@
472472
</trans-unit>
473473
<trans-unit id="121">
474474
<source>This value is not a valid Twig template.</source>
475-
<target state="needs-translation">This value is not a valid Twig template.</target>
475+
<target state="needs-review-translation">Гэта значэнне не з'яўляецца сапраўдным шаблонам Twig.</target>
476476
</trans-unit>
477477
</body>
478478
</file>

src/Symfony/Component/Validator/Resources/translations/validators.bg.xlf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@
472472
</trans-unit>
473473
<trans-unit id="121">
474474
<source>This value is not a valid Twig template.</source>
475-
<target state="needs-translation">This value is not a valid Twig template.</target>
475+
<target state="needs-review-translation">Тази стойност не е валиден Twig шаблон.</target>
476476
</trans-unit>
477477
</body>
478478
</file>

src/Symfony/Component/Validator/Resources/translations/validators.bs.xlf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@
472472
</trans-unit>
473473
<trans-unit id="121">
474474
<source>This value is not a valid Twig template.</source>
475-
<target state="needs-translation">This value is not a valid Twig template.</target>
475+
<target state="needs-review-translation">Ova vrijednost nije važeći Twig šablon.</target>
476476
</trans-unit>
477477
</body>
478478
</file>

src/Symfony/Component/Validator/Resources/translations/validators.ca.xlf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@
472472
</trans-unit>
473473
<trans-unit id="121">
474474
<source>This value is not a valid Twig template.</source>
475-
<target state="needs-translation">This value is not a valid Twig template.</target>
475+
<target state="needs-review-translation">Aquest valor no és una plantilla Twig vàlida.</target>
476476
</trans-unit>
477477
</body>
478478
</file>

src/Symfony/Component/Validator/Resources/translations/validators.cs.xlf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@
472472
</trans-unit>
473473
<trans-unit id="121">
474474
<source>This value is not a valid Twig template.</source>
475-
<target state="needs-translation">This value is not a valid Twig template.</target>
475+
<target state="needs-review-translation">Tato hodnota není platná šablona Twig.</target>
476476
</trans-unit>
477477
</body>
478478
</file>

src/Symfony/Component/Validator/Resources/translations/validators.cy.xlf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@
472472
</trans-unit>
473473
<trans-unit id="121">
474474
<source>This value is not a valid Twig template.</source>
475-
<target state="needs-translation">This value is not a valid Twig template.</target>
475+
<target state="needs-review-translation">Nid yw'r gwerth hwn yn dempled Twig dilys.</target>
476476
</trans-unit>
477477
</body>
478478
</file>

src/Symfony/Component/Validator/Resources/translations/validators.da.xlf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@
472472
</trans-unit>
473473
<trans-unit id="121">
474474
<source>This value is not a valid Twig template.</source>
475-
<target state="needs-translation">This value is not a valid Twig template.</target>
475+
<target state="needs-review-translation">Denne værdi er ikke en gyldig Twig-skabelon.</target>
476476
</trans-unit>
477477
</body>
478478
</file>

src/Symfony/Component/Validator/Resources/translations/validators.el.xlf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@
472472
</trans-unit>
473473
<trans-unit id="121">
474474
<source>This value is not a valid Twig template.</source>
475-
<target state="needs-translation">This value is not a valid Twig template.</target>
475+
<target state="needs-review-translation">Αυτή η τιμή δεν είναι έγκυρο πρότυπο Twig.</target>
476476
</trans-unit>
477477
</body>
478478
</file>

src/Symfony/Component/Validator/Resources/translations/validators.es.xlf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@
472472
</trans-unit>
473473
<trans-unit id="121">
474474
<source>This value is not a valid Twig template.</source>
475-
<target state="needs-translation">This value is not a valid Twig template.</target>
475+
<target state="needs-review-translation">Este valor no es una plantilla Twig válida.</target>
476476
</trans-unit>
477477
</body>
478478
</file>

src/Symfony/Component/Validator/Resources/translations/validators.et.xlf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@
472472
</trans-unit>
473473
<trans-unit id="121">
474474
<source>This value is not a valid Twig template.</source>
475-
<target state="needs-translation">This value is not a valid Twig template.</target>
475+
<target state="needs-review-translation">See väärtus ei ole kehtiv Twig'i mall.</target>
476476
</trans-unit>
477477
</body>
478478
</file>

src/Symfony/Component/Validator/Resources/translations/validators.eu.xlf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@
472472
</trans-unit>
473473
<trans-unit id="121">
474474
<source>This value is not a valid Twig template.</source>
475-
<target state="needs-translation">This value is not a valid Twig template.</target>
475+
<target state="needs-review-translation">Balio hau ez da Twig txantiloi baliozko bat.</target>
476476
</trans-unit>
477477
</body>
478478
</file>

src/Symfony/Component/Validator/Resources/translations/validators.fa.xlf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@
472472
</trans-unit>
473473
<trans-unit id="121">
474474
<source>This value is not a valid Twig template.</source>
475-
<target state="needs-translation">This value is not a valid Twig template.</target>
475+
<target state="needs-review-translation">این مقدار یک قالب معتبر Twig نیست.</target>
476476
</trans-unit>
477477
</body>
478478
</file>

src/Symfony/Component/Validator/Resources/translations/validators.fi.xlf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@
472472
</trans-unit>
473473
<trans-unit id="121">
474474
<source>This value is not a valid Twig template.</source>
475-
<target state="needs-translation">This value is not a valid Twig template.</target>
475+
<target state="needs-review-translation">Tämä arvo ei ole kelvollinen Twig-malli.</target>
476476
</trans-unit>
477477
</body>
478478
</file>

src/Symfony/Component/Validator/Resources/translations/validators.fr.xlf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@
472472
</trans-unit>
473473
<trans-unit id="121">
474474
<source>This value is not a valid Twig template.</source>
475-
<target state="needs-translation">This value is not a valid Twig template.</target>
475+
<target>Cette valeur n'est pas un modèle Twig valide.</target>
476476
</trans-unit>
477477
</body>
478478
</file>

src/Symfony/Component/Validator/Resources/translations/validators.gl.xlf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@
472472
</trans-unit>
473473
<trans-unit id="121">
474474
<source>This value is not a valid Twig template.</source>
475-
<target state="needs-translation">This value is not a valid Twig template.</target>
475+
<target state="needs-review-translation">Este valor non é un modelo Twig válido.</target>
476476
</trans-unit>
477477
</body>
478478
</file>

src/Symfony/Component/Validator/Resources/translations/validators.he.xlf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@
472472
</trans-unit>
473473
<trans-unit id="121">
474474
<source>This value is not a valid Twig template.</source>
475-
<target state="needs-translation">This value is not a valid Twig template.</target>
475+
<target state="needs-review-translation">ערך זה אינו תבנית Twig חוקית.</target>
476476
</trans-unit>
477477
</body>
478478
</file>

src/Symfony/Component/Validator/Resources/translations/validators.hr.xlf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@
472472
</trans-unit>
473473
<trans-unit id="121">
474474
<source>This value is not a valid Twig template.</source>
475-
<target state="needs-translation">This value is not a valid Twig template.</target>
475+
<target>Ova vrijednost nije valjani Twig predložak.</target>
476476
</trans-unit>
477477
</body>
478478
</file>

src/Symfony/Component/Validator/Resources/translations/validators.hu.xlf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@
472472
</trans-unit>
473473
<trans-unit id="121">
474474
<source>This value is not a valid Twig template.</source>
475-
<target state="needs-translation">This value is not a valid Twig template.</target>
475+
<target state="needs-review-translation">Ez az érték nem érvényes Twig sablon.</target>
476476
</trans-unit>
477477
</body>
478478
</file>

src/Symfony/Component/Validator/Resources/translations/validators.hy.xlf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@
472472
</trans-unit>
473473
<trans-unit id="121">
474474
<source>This value is not a valid Twig template.</source>
475-
<target state="needs-translation">This value is not a valid Twig template.</target>
475+
<target state="needs-review-translation">Այս արժեքը վավեր Twig ձևանմուշ չէ:</target>
476476
</trans-unit>
477477
</body>
478478
</file>

src/Symfony/Component/Validator/Resources/translations/validators.id.xlf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@
472472
</trans-unit>
473473
<trans-unit id="121">
474474
<source>This value is not a valid Twig template.</source>
475-
<target state="needs-translation">This value is not a valid Twig template.</target>
475+
<target state="needs-review-translation">Nilai ini bukan templat Twig yang valid.</target>
476476
</trans-unit>
477477
</body>
478478
</file>

src/Symfony/Component/Validator/Resources/translations/validators.it.xlf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@
472472
</trans-unit>
473473
<trans-unit id="121">
474474
<source>This value is not a valid Twig template.</source>
475-
<target state="needs-translation">This value is not a valid Twig template.</target>
475+
<target state="needs-review-translation">Questo valore non è un template Twig valido.</target>
476476
</trans-unit>
477477
</body>
478478
</file>

0 commit comments

Comments
 (0)
0