Skip to content

Commit 6924412

Browse files
committed
Merge branch '2.7' into 2.8
* 2.7: [#8282] fix regex delimiters Add missing comment validateValue() is deprecated in 3.0 prefer getObject as getEntity is deprecated Update serializer.rst [#8308] fix commands order Update NotIdenticalTo.rst Correct psr/log package name Update debugging.rst Update group_service_resolver.rst Update remember_me.rst Update expression_language.rst [VarDumper] s/dump.dump_destination/debug.dump_destination/ fix schema_filter example fix form collection label not correct
2 parents 712fd4c + eeeb6b1 commit 6924412

File tree

13 files changed

+28
-16
lines changed

13 files changed

+28
-16
lines changed

components/console/logger.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ The Console component comes with a standalone logger complying with the
99
be sent to the :class:`Symfony\\Component\\Console\\Output\\OutputInterface`
1010
instance passed as a parameter to the constructor.
1111

12-
The logger does not have any external dependency except ``php-fig/log``.
12+
The logger does not have any external dependency except ``psr/log``.
1313
This is useful for console applications and commands needing a lightweight
1414
PSR-3 compliant logger::
1515

components/serializer.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ class extending :class:`Symfony\\Component\\Serializer\\Normalizer\\AbstractNorm
397397
including :class:`Symfony\\Component\\Serializer\\Normalizer\\GetSetMethodNormalizer`
398398
and :class:`Symfony\\Component\\Serializer\\Normalizer\\PropertyNormalizer`::
399399

400-
use Symfony\Component\Serializer\Encoder\JsonEncoder
400+
use Symfony\Component\Serializer\Encoder\JsonEncoder;
401401
use Symfony\Component\Serializer\Normalizer\ObjectNormalizer;
402402
use Symfony\Component\Serializer\Serializer;
403403

components/var_dumper.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ Choosing between both is mostly a matter of personal taste, still:
101101
be suited to your use case (e.g. you shouldn't use it in an HTML
102102
attribute or a ``<script>`` tag).
103103

104-
This behavior can be changed by configuring the ``dump.dump_destination``
104+
This behavior can be changed by configuring the ``debug.dump_destination``
105105
option. Read more about this and other options in
106106
:doc:`the DebugBundle configuration reference </reference/configuration/debug>`.
107107

debug/debugging.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ that can help you visualize and find the information.
7676
``debug:config``
7777
Shows all configured bundles, their class and their alias.
7878

79+
``debug:event-dispatcher``
80+
Displays information about all the registered listeners in the event dispatcher.
81+
7982
``debug:router``
8083
Displays information about all configured routes in the application as a
8184
table with the name, method, scheme, host and path for each route.

doctrine/event_listeners_subscribers.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ interface and have an event method for each event it subscribes to::
194194

195195
public function index(LifecycleEventArgs $args)
196196
{
197-
$entity = $args->getEntity();
197+
$entity = $args->getObject();
198198

199199
// perhaps you only want to act on some "Product" entity
200200
if ($entity instanceof Product) {

form/form_collections.rst

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,8 @@ Notice that you embed a collection of ``TagType`` forms using the
130130
$builder->add('description');
131131

132132
$builder->add('tags', CollectionType::class, array(
133-
'entry_type' => TagType::class
133+
'entry_type' => TagType::class,
134+
'entry_options' => array('label' => false),
134135
));
135136
}
136137

@@ -285,8 +286,9 @@ add the ``allow_add`` option to your collection field::
285286
$builder->add('description');
286287

287288
$builder->add('tags', CollectionType::class, array(
288-
'entry_type' => TagType::class,
289-
'allow_add' => true,
289+
'entry_type' => TagType::class,
290+
'entry_options' => array('label' => false),
291+
'allow_add' => true,
290292
));
291293
}
292294

@@ -392,9 +394,15 @@ one example:
392394
// get the new index
393395
var index = $collectionHolder.data('index');
394396
397+
var newForm = prototype;
398+
// You need this only if you didn't set 'label' => false in your tags field in TaskType
399+
// Replace '__name__label__' in the prototype's HTML to
400+
// instead be a number based on how many items we have
401+
// newForm = newForm.replace(/__name__label__/g, index);
402+
395403
// Replace '__name__' in the prototype's HTML to
396404
// instead be a number based on how many items we have
397-
var newForm = prototype.replace(/__name__/g, index);
405+
newForm = newForm.replace(/__name__/g, index);
398406
399407
// increase the index with one for the next item
400408
$collectionHolder.data('index', index + 1);

forms.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -658,6 +658,7 @@ the choice is ultimately up to you.
658658
good idea to explicitly specify the ``data_class`` option by adding the
659659
following to your form type class::
660660

661+
// src/AppBundle/Form/TaskType.php
661662
use AppBundle\Entity\Task;
662663
use Symfony\Component\OptionsResolver\OptionsResolver;
663664

reference/configuration/doctrine.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Full Default Configuration
2424
commented: true
2525
# If defined, all the tables whose names match this regular expression are ignored
2626
# by the schema tool (in this example, any table name starting with `wp_`)
27-
#schema_filter: "/^wp_/"
27+
#schema_filter: '/^(?!wp_)/'
2828
2929
connections:
3030
# A collection of different named connections (e.g. default, conn2, etc)

reference/constraints/NotIdenticalTo.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,6 @@ message
121121

122122
**type**: ``string`` **default**: ``This value should not be identical to {{ compared_value_type }} {{ compared_value }}.``
123123

124-
This is the message that will be shown if the value is not equal.
124+
This is the message that will be shown if the value is identical.
125125

126126
.. include:: /reference/constraints/_payload-option.rst.inc

security/remember_me.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ In the following example, the action is only allowed if the user has the
247247
.. code-block:: php
248248
249249
// ...
250-
use Symfony\Component\Security\Core\Exception\AccessDeniedException
250+
use Symfony\Component\Security\Core\Exception\AccessDeniedException;
251251
252252
// ...
253253
public function editAction()

service_container/expression_language.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ of the new ``mailer_configuration`` service? One way is to use an expression:
2424

2525
.. code-block:: yaml
2626
27-
# app/config/config.yml
27+
# app/config/services.yml
2828
services:
2929
my_mailer:
3030
class: AppBundle\Mailer
3131
arguments: ["@=service('mailer_configuration').getMailerMethod()"]
3232
3333
.. code-block:: xml
3434
35-
<!-- app/config/config.xml -->
35+
<!-- app/config/services.xml -->
3636
<?xml version="1.0" encoding="UTF-8" ?>
3737
<container xmlns="http://symfony.com/schema/dic/services"
3838
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -48,7 +48,7 @@ of the new ``mailer_configuration`` service? One way is to use an expression:
4848
4949
.. code-block:: php
5050
51-
// app/config/config.php
51+
// app/config/services.php
5252
use AppBundle\Mailer;
5353
use Symfony\Component\ExpressionLanguage\Expression;
5454

validation/group_service_resolver.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Then in your form, inject the resolver and set it as the ``validation_groups``.
4747
namespace AppBundle\Form;
4848
4949
use AppBundle\Validator\ValidationGroupResolver;
50-
use Symfony\Component\Form\AbstractType
50+
use Symfony\Component\Form\AbstractType;
5151
use Symfony\Component\OptionsResolver\OptionsResolver;
5252
5353
class MyClassType extends AbstractType

validation/raw_values.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ Validation of arrays is possible using the ``Collection`` constraint::
7272
'password' => new Assert\Length(array('min' => 60)),
7373
));
7474

75-
$violations = $validator->validateValue($input, $constraint);
75+
$violations = $validator->validate($input, $constraint);
7676

7777
The ``validate()`` method returns a :class:`Symfony\\Component\\Validator\\ConstraintViolationList`
7878
object, which acts just like an array of errors. Each error in the collection

0 commit comments

Comments
 (0)