Skip to content

Commit 756521e

Browse files
committed
Merge branch '6.4' into 7.0
* 6.4: Add attribute configuration block for reusable locator Reorder imports in code examples [Form] Fix an RST reference Adding asset versioning to comparison table [Contributing] Remove references to symfony/website-skeleton [Form] Updating the generic `FormEvent` to specific event (e.g. `PreSetDataEvent`) [UID] Fix default versions in framework config
2 parents 1f64e6e + dad43e6 commit 756521e

File tree

5 files changed

+40
-23
lines changed

5 files changed

+40
-23
lines changed

components/uid.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,10 @@ configure the behavior of the factory using configuration files::
9090
# config/packages/uid.yaml
9191
framework:
9292
uid:
93-
default_uuid_version: 7
93+
default_uuid_version: 6
9494
name_based_uuid_version: 5
9595
name_based_uuid_namespace: 6ba7b810-9dad-11d1-80b4-00c04fd430c8
96-
time_based_uuid_version: 7
96+
time_based_uuid_version: 6
9797
time_based_uuid_node: 121212121212
9898
9999
.. code-block:: xml
@@ -109,10 +109,10 @@ configure the behavior of the factory using configuration files::
109109
110110
<framework:config>
111111
<framework:uid
112-
default_uuid_version="7"
112+
default_uuid_version="6"
113113
name_based_uuid_version="5"
114114
name_based_uuid_namespace="6ba7b810-9dad-11d1-80b4-00c04fd430c8"
115-
time_based_uuid_version="7"
115+
time_based_uuid_version="6"
116116
time_based_uuid_node="121212121212"
117117
/>
118118
</framework:config>
@@ -131,10 +131,10 @@ configure the behavior of the factory using configuration files::
131131
132132
$container->extension('framework', [
133133
'uid' => [
134-
'default_uuid_version' => 7,
134+
'default_uuid_version' => 6,
135135
'name_based_uuid_version' => 5,
136136
'name_based_uuid_namespace' => '6ba7b810-9dad-11d1-80b4-00c04fd430c8',
137-
'time_based_uuid_version' => 7,
137+
'time_based_uuid_version' => 6,
138138
'time_based_uuid_node' => 121212121212,
139139
],
140140
]);
@@ -156,7 +156,7 @@ on the configuration you defined::
156156

157157
public function generate(): void
158158
{
159-
// This creates a UUID of the version given in the configuration file (v7 by default)
159+
// This creates a UUID of the version given in the configuration file (v6 by default)
160160
$uuid = $this->uuidFactory->create();
161161

162162
$nameBasedUuid = $this->uuidFactory->nameBased(/** ... */);

contributing/community/reviews.rst

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,15 @@ The steps for the review are:
5959
#. **Is the Report Complete?**
6060

6161
Good bug reports contain a link to a project (the "reproduction project")
62-
created with the `Symfony skeleton`_ or the `Symfony website skeleton`_
63-
that reproduces the bug. If it doesn't, the report should at least contain
64-
enough information and code samples to reproduce the bug.
62+
created with the `Symfony skeleton`_ that reproduces the bug. If it
63+
doesn't, the report should at least contain enough information and code
64+
samples to reproduce the bug.
6565

6666
#. **Reproduce the Bug**
6767

6868
Download the reproduction project and test whether the bug can be reproduced
6969
on your system. If the reporter did not provide a reproduction project,
70-
create one based on one `Symfony skeleton`_ (or the `Symfony website skeleton`_).
70+
create one based on one `Symfony skeleton`_.
7171

7272
#. **Update the Issue Status**
7373

@@ -134,9 +134,9 @@ Pick a pull request from the `PRs in need of review`_ and follow these steps:
134134
#. **Reproduce the Problem**
135135

136136
Read the issue that the pull request is supposed to fix. Reproduce the
137-
problem on a new project created with the `Symfony skeleton`_ (or the
138-
`Symfony website skeleton`_) and try to understand why it exists. If the
139-
linked issue already contains such a project, install it and run it on your system.
137+
problem on a new project created with the `Symfony skeleton`_ and try to
138+
understand why it exists. If the linked issue already contains such a
139+
project, install it and run it on your system.
140140

141141
#. **Review the Code**
142142

@@ -212,7 +212,6 @@ Pick a pull request from the `PRs in need of review`_ and follow these steps:
212212
.. _GitHub: https://github.com
213213
.. _Symfony issue tracker: https://github.com/symfony/symfony/issues
214214
.. _`Symfony skeleton`: https://github.com/symfony/skeleton
215-
.. _`Symfony website skeleton`: https://github.com/symfony/website-skeleton
216215
.. _create a GitHub account: https://help.github.com/github/getting-started-with-github/signing-up-for-a-new-github-account
217216
.. _bug reports in need of review: https://github.com/symfony/symfony/issues?utf8=%E2%9C%93&q=is%3Aopen+is%3Aissue+label%3A%22Bug%22+label%3A%22Status%3A+Needs+Review%22+
218217
.. _PRs in need of review: https://github.com/symfony/symfony/pulls?q=is%3Aopen+is%3Apr+label%3A%22Status%3A+Needs+Review%22

form/events.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ A) The ``FormEvents::PRE_SET_DATA`` Event
6262
The ``FormEvents::PRE_SET_DATA`` event is dispatched at the beginning of the
6363
``Form::setData()`` method. It is used to modify the data given during
6464
pre-population with
65-
:method:`FormEvent::setData() <Symfony\\Component\\Form\\FormEvent::setData>`.
6665
The method :method:`Form::setData() <Symfony\\Component\\Form\\Form::setData>`
6766
is locked since the event is dispatched from it and will throw an exception
6867
if called from a listener.
@@ -274,16 +273,16 @@ method of the ``FormFactory``::
274273

275274
// ...
276275

276+
use Symfony\Component\Form\Event\PreSubmitEvent;
277277
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
278278
use Symfony\Component\Form\Extension\Core\Type\EmailType;
279279
use Symfony\Component\Form\Extension\Core\Type\TextType;
280-
use Symfony\Component\Form\FormEvent;
281280
use Symfony\Component\Form\FormEvents;
282281

283282
$form = $formFactory->createBuilder()
284283
->add('username', TextType::class)
285284
->add('showEmail', CheckboxType::class)
286-
->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event): void {
285+
->addEventListener(FormEvents::PRE_SUBMIT, function (PreSubmitEvent $event): void {
287286
$user = $event->getData();
288287
$form = $event->getForm();
289288

@@ -311,9 +310,9 @@ callback for better readability::
311310
// src/Form/SubscriptionType.php
312311
namespace App\Form;
313312

313+
use Symfony\Component\Form\Event\PreSetDataEvent;
314314
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
315315
use Symfony\Component\Form\Extension\Core\Type\TextType;
316-
use Symfony\Component\Form\FormEvent;
317316
use Symfony\Component\Form\FormEvents;
318317

319318
// ...
@@ -331,7 +330,7 @@ callback for better readability::
331330
;
332331
}
333332

334-
public function onPreSetData(FormEvent $event): void
333+
public function onPreSetData(PreSetDataEvent $event): void
335334
{
336335
// ...
337336
}
@@ -352,8 +351,9 @@ Consider the following example of a form event subscriber::
352351
namespace App\Form\EventListener;
353352

354353
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
354+
use Symfony\Component\Form\Event\PreSetDataEvent;
355+
use Symfony\Component\Form\Event\PreSubmitEvent;
355356
use Symfony\Component\Form\Extension\Core\Type\EmailType;
356-
use Symfony\Component\Form\FormEvent;
357357
use Symfony\Component\Form\FormEvents;
358358

359359
class AddEmailFieldListener implements EventSubscriberInterface
@@ -366,7 +366,7 @@ Consider the following example of a form event subscriber::
366366
];
367367
}
368368

369-
public function onPreSetData(FormEvent $event): void
369+
public function onPreSetData(PreSetDataEvent $event): void
370370
{
371371
$user = $event->getData();
372372
$form = $event->getForm();
@@ -378,7 +378,7 @@ Consider the following example of a form event subscriber::
378378
}
379379
}
380380

381-
public function onPreSubmit(FormEvent $event): void
381+
public function onPreSubmit(PreSubmitEvent $event): void
382382
{
383383
$user = $event->getData();
384384
$form = $event->getForm();

frontend.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ Supports `Stimulus/UX`_ yes yes
2626
Supports Sass/Tailwind :ref:`yes <asset-mapper-tailwind>` yes
2727
Supports React, Vue, Svelte? yes :ref:`[1] <ux-note-1>` yes
2828
Supports TypeScript :ref:`yes <asset-mapper-ts>` yes
29+
Versioned assets always optional
2930
================================ ================================== ==========
3031

3132
.. _ux-note-1:

service_container/service_subscribers_locators.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -554,6 +554,23 @@ Now you can inject the service locator in any other services:
554554

555555
.. configuration-block::
556556

557+
.. code-block:: php-attributes
558+
559+
// src/CommandBus.php
560+
namespace App;
561+
562+
use Psr\Container\ContainerInterface;
563+
use Symfony\Component\DependencyInjection\Attribute\Autowire;
564+
565+
class CommandBus
566+
{
567+
public function __construct(
568+
#[Autowire(service: 'app.command_handler_locator')]
569+
private ContainerInterface $locator,
570+
) {
571+
}
572+
}
573+
557574
.. code-block:: yaml
558575
559576
# config/services.yaml

0 commit comments

Comments
 (0)