8000 Merge branch '4.2' · symfony/symfony-docs@25362d9 · GitHub
[go: up one dir, main page]

Skip to content

Commit 25362d9

Browse files
committed
Merge branch '4.2'
* 4.2: Update data_transformers.rst Fixed the \"learn more\" section of Testing article update remaining file references Update 3.3-di-changes.rst Change gender to eye-color
2 parents 5bb148e + 928a7e5 commit 25362d9

File tree

4 files changed

+12
-13
lines changed

4 files changed

+12
-13
lines changed

form/data_transformers.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,7 @@ First, create the custom field type class::
344344
use App\Form\DataTransformer\IssueToNumberTransformer;
345345
use Doctrine\Common\Persistence\ObjectManager;
346346
use Symfony\Component\Form\AbstractType;
347+
use Symfony\Component\Form\Extension\Core\Type\TextType;
347348
use Symfony\Component\Form\FormBuilderInterface;
348349
use Symfony\Component\OptionsResolver\OptionsResolver;
349350

service_container/3.3-di-changes.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -591,11 +591,11 @@ no longer exist. The simplest way to fix this is to find all your old service id
591591
and update them to the new class id: ``app.github_notifier`` to ``App\Service\GitHubNotifier``.
592592

593593
In large projects, there's a better way: create legacy aliases that map the old id
594-
to the new id. Create a new ``legacy_aliases.yml`` file:
594+
to the new id. Create a new ``legacy_aliases.yaml`` file:
595595

596596
.. code-block:: yaml
597597
598-
# app/config/legacy_aliases.yml
598+
# config/legacy_aliases.yaml
599599
services:
600600
_defaults:
601601
public: true
@@ -611,7 +611,7 @@ Then import this at the top of ``services.yaml``:
611611
612612
# config/services.yaml
613613
+ imports:
614-
+ - { resource: legacy_aliases.yml }
614+
+ - { resource: legacy_aliases.yaml }
615615
616616
# ...
617617
@@ -635,7 +635,7 @@ Now you're ready to default all services to be private:
635635
+ public: false
636636
637637
Thanks to this, any services created in this file cannot be fetched directly from
638-
the container. But, since the old service id's are aliases in a separate file (``legacy_aliases.yml``),
638+
the container. But, since the old service id's are aliases in a separate file (``legacy_aliases.yaml``),
639639
these *are* still public. This makes sure the app keeps working.
640640

641641
If you did *not* change the id of some of your services (because there are multiple
@@ -723,7 +723,7 @@ Step 5) Cleanup!
723723

724724
To make sure your application didn't break, you did some extra work. Now it's time
725725
to clean things up! First, update your application to *not* use the old service id's (the
726-
ones in ``legacy_aliases.yml``). This means updating any service arguments (e.g.
726+
ones in ``legacy_aliases.yaml``). This means updating any service arguments (e.g.
727727
``@app.github_notifier`` to ``@App\Service\GitHubNotifier``) and updating your
728728
code to not fetch this service directly from the container. For example:
729729

@@ -739,7 +739,7 @@ code to not fetch this service directly from the container. For example:
739739
// ...
740740
}
741741
742-
As soon as you do this, you can delete ``legacy_aliases.yml`` and remove its import.
742+
As soon as you do this, you can delete ``legacy_aliases.yaml`` and remove its import.
743743
You should do the same thing for any services that you made public, like
744744
``app.api_client_github`` and ``app.api_client_sl_connect``. Once you're not fetching
745745
these directly from the container, you can remove the ``public: true`` flag:

testing.rst

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,11 +1037,9 @@ Learn more
10371037
:glob:
10381038

10391039
testing/*
1040-
1041-
* :ref:`Testing a console command <console-testing-commands>`
1042-
* :doc:`The chapter about tests in the Symfony Framework Best Practices </best_practices/tests>`
1043-
* :doc:`/components/dom_crawler`
1044-
* :doc:`/components/css_selector`
1040+
/best_practices/tests
1041+
/components/dom_crawler
1042+
/components/css_selector
10451043

10461044
.. _`PHPUnit`: https://phpunit.de/
10471045
.. _`documentation`: https://phpunit.readthedocs.io/

validation/raw_values.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Validation of arrays is possible using the ``Collection`` constraint::
5858
],
5959
'email' => 'test@email.tld',
6060
'simple' => 'hello',
61-
'gender' => 3,
61+
'eye_color' => 3,
6262
'file' => 628C null,
6363
'password' => 'test',
6464
'tags' => [
@@ -79,7 +79,7 @@ Validation of arrays is possible using the ``Collection`` constraint::
7979
]),
8080
'email' => new Assert\Email(),
8181
'simple' => new Assert\Length(['min' => 102]),
82-
'gender' => new Assert\Choice([3, 4]),
82+
'eye_color' => new Assert\Choice([3, 4]),
8383
'file' => new Assert\File(),
8484
'password' => new Assert\Length(['min' => 60]),
8585
'tags' => new Assert\Optional([

0 commit comments

Comments
 (0)
0