Skip to content

Commit f7a371f

Browse files
committed
Merge branch '2.7' into 2.8
* 2.7: Document that Doctrine associations don't work across different entity managers Update entity_provider.rst Reword Fixed invalid form validation reference Document that Doctrine associations don't work across different entity managers Don't use OutputInterface::VERBOSITY constants, use PHP methods instead clarify silencing deprecations in tests Reworded the note about dump() not being available in prod
2 parents 727e856 + 2d29c07 commit f7a371f

File tree

6 files changed

+30
-18
lines changed

6 files changed

+30
-18
lines changed

components/phpunit_bridge.rst

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,25 @@ in the **Unsilenced** section of the deprecation report.
9696
Mark Tests as Legacy
9797
--------------------
9898

99-
There are four ways to mark a test as legacy:
99+
There are three ways to mark a test as legacy:
100100

101101
* (**Recommended**) Add the ``@group legacy`` annotation to its class or method;
102102

103103
* Make its class name start with the ``Legacy`` prefix;
104104

105-
* Make its method name start with ``testLegacy*()`` instead of ``test*()``;
105+
* Make its method name start with ``testLegacy*()`` instead of ``test*()``.
106106

107-
* Make its data provider start with ``provideLegacy*()`` or ``getLegacy*()``.
107+
.. note::
108+
109+
If your data provider calls code that would usually trigger a deprecation,
110+
you can prefix its name with ``provideLegacy`` or ``getLegacy`` to silent
111+
these deprecations. If your data provider does not execute deprecated
112+
code, it is not required to choose a special naming just because the
113+
test being fed by the data provider is marked as legacy.
114+
115+
Also be aware that choosing one of the two legacy prefixes will not mark
116+
tests as legacy that make use of this data provider. You still have to
117+
mark them as legacy tests explicitly.
108118

109119
Configuration
110120
-------------

doctrine/multiple_entity_managers.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ entity manager that connects to another database might handle the rest.
1616
usually required. Be sure you actually need multiple entity managers before
1717
adding in this layer of complexity.
1818

19+
.. caution::
20+
21+
Entities cannot define associations across different entity managers. If you
22+
need that, there are `several alternatives <https://stackoverflow.com/a/11494543/2804294>`_
23+
that require some custom setup.
24+
1925
The following configuration code shows how you can configure two entity managers:
2026

2127
.. configuration-block::

form/disabling_validation.rst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,10 @@ these cases you can set the ``validation_groups`` option to ``false``::
2121

2222
Note that when you do that, the form will still run basic integrity checks,
2323
for example whether an uploaded file was too large or whether non-existing
24-
fields were submitted. If you want to suppress validation, you can use the
25-
:ref:`POST_SUBMIT event <form-dynamic-form-modification-suppressing-form-validation>`.
24+
fields were submitted.
25+
26+
The submission of extra form fields can be controlled with the
27+
`allow_extra_fields config option`_ and the maximum upload file size should be
28+
handled via your PHP and web server configuration.
29+
30+
.. _`allow_extra_fields config option`: https://symfony.com/doc/current/reference/forms/types/form.html#allow-extra-fields

form/dynamic_form_modification.rst

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -655,11 +655,3 @@ field according to the current selection in the ``sport`` field:
655655
The major benefit of submitting the whole form to just extract the updated
656656
``position`` field is that no additional server-side code is needed; all the
657657
code from above to generate the submitted form can be reused.
658-
659-
.. _form-dynamic-form-modification-suppressing-form-validation:
660-
661-
Suppressing Form Validation
662-
---------------------------
663-
664-
To suppress form validation, set ``validation_groups`` to ``false`` or an empty
665-
array.

logging/monolog_console.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,18 @@ is passed when a command gets executed.
1616

1717
When a lot of logging has to happen, it's cumbersome to print information
1818
depending on the verbosity settings (``-v``, ``-vv``, ``-vvv``) because the
19-
calls need to be wrapped in conditions. The code quickly gets verbose or dirty.
20-
For example::
19+
calls need to be wrapped in conditions. For example::
2120

2221
use Symfony\Component\Console\Input\InputInterface;
2322
use Symfony\Component\Console\Output\OutputInterface;
2423

2524
protected function execute(InputInterface $input, OutputInterface $output)
2625
{
27-
if ($output->getVerbosity() >= OutputInterface::VERBOSITY_DEBUG) {
26+
if ($output->isDebug()) {
2827
$output->writeln('Some info');
2928
}
3029

31-
if ($output->getVerbosity() >= OutputInterface::VERBOSITY_VERBOSE) {
30+
if ($output->isVerbose()) {
3231
$output->writeln('Some more info');
3332
}
3433
}

security/entity_provider.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ template to customize them further).
415415
not be deserialized correctly from the session on each request.
416416

417417
Congrats! Your database-loading security system is all setup! Next, add a
418-
true :doc:`login form </security/form_login>` instead of HTTP Basic
418+
true :doc:`login form </security/form_login_setup>` instead of HTTP Basic
419419
or keep reading for other topics.
420420

421421
.. _authenticating-someone-with-a-custom-entity-provider:

0 commit comments

Comments
 (0)