Skip to content

Commit 3dded7d

Browse files
committed
Merge branch '2.8' into 3.3
* 2.8: Document that Doctrine associations don't work across different entity managers Update entity_provider.rst Reword Fixed invalid form validation reference Fixed a wrong 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 fix broken hash value of link Reworded the note about dump() not being available in prod
2 parents 99d82de + f7a371f commit 3dded7d

File tree

7 files changed

+37
-18
lines changed

7 files changed

+37
-18
lines changed

components/phpunit_bridge.rst

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,25 @@ in the **Unsilenced** section of the deprecation report.
113113
Mark Tests as Legacy
114114
--------------------
115115

116-
Add the ``@group legacy`` annotation to a test class or method to mark it
117-
as legacy.
116+
There are three ways to mark a test as legacy:
117+
118+
* (**Recommended**) Add the ``@group legacy`` annotation to its class or method;
119+
120+
* Make its class name start with the ``Legacy`` prefix;
121+
122+
* Make its method name start with ``testLegacy*()`` instead of ``test*()``.
123+
124+
.. note::
125+
126+
If your data provider calls code that would usually trigger a deprecation,
127+
you can prefix its name with ``provideLegacy`` or ``getLegacy`` to silent
128+
these deprecations. If your data provider does not execute deprecated
129+
code, it is not required to choose a special naming just because the
130+
test being fed by the data provider is marked as legacy.
131+
132+
Also be aware that choosing one of the two legacy prefixes will not mark
133+
tests as legacy that make use of this data provider. You still have to
134+
mark them as legacy tests explicitly.
118135

119136
Configuration
120137
-------------

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
@@ -18,5 +18,10 @@ these cases you can set the ``validation_groups`` option to ``false``::
1818

1919
Note that when you do that, the form will still run basic integrity checks,
2020
for example whether an uploaded file was too large or whether non-existing
21-
fields were submitted. If you want to suppress validation, you can use the
22-
:ref:`POST_SUBMIT event <form-dynamic-form-modification-suppressing-form-validation>`.
21+
fields were submitted.
22+
23+
The submission of extra form fields can be controlled with the
24+
`allow_extra_fields config option`_ and the maximum upload file size should be
25+
handled via your PHP and web server configuration.
26+
27+
.. _`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
@@ -613,11 +613,3 @@ field according to the current selection in the ``sport`` field:
613613
The major benefit of submitting the whole form to just extract the updated
614614
``position`` field is that no additional server-side code is needed; all the
615615
code from above to generate the submitted form can be reused.
616-
617-
.. _form-dynamic-form-modification-suppressing-form-validation:
618-
619-
Suppressing Form Validation
620-
---------------------------
621-
622-
To suppress form validation, set ``validation_groups`` to ``false`` or an empty
623-
array.

logging/monolog_console.rst

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

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

1716
use Symfony\Component\Console\Input\InputInterface;
1817
use Symfony\Component\Console\Output\OutputInterface;
1918

2019
protected function execute(InputInterface $input, OutputInterface $output)
2120
{
22-
if ($output->getVerbosity() >= OutputInterface::VERBOSITY_DEBUG) {
21+
if ($output->isDebug()) {
2322
$output->writeln('Some info');
2423
}
2524

26-
if ($output->getVerbosity() >= OutputInterface::VERBOSITY_VERBOSE) {
25+
if ($output->isVerbose()) {
2726
$output->writeln('Some more info');
2827
}
2928
}

security/entity_provider.rst

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

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

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

service_container/compiler_passes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ How to Work with Compiler Passes in Bundles
88
Compiler passes give you an opportunity to manipulate other service
99
definitions that have been registered with the service container. You
1010
can read about how to create them in the components section
11-
":ref:`components-di-compiler-pass`".
11+
":ref:`components-di-separate-compiler-passes`".
1212

1313
When using :ref:`separate compiler passes <components-di-separate-compiler-passes>`,
1414
you need to register them in the ``build()`` method of the bundle class (this

0 commit comments

Comments
 (0)