Skip to content

Commit f72237d

Browse files
committed
Merge branch '2.8' into 3.3
* 2.8: (21 commits) Update resources.rst Update events.rst Improved a help note about authentication providers [#8280] add missing trailing comma [#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 Improved the explanation about the doctrine caching services ...
2 parents c08f2a2 + 3a41ea8 commit f72237d

File tree

17 files changed

+68
-31
lines changed

17 files changed

+68
-31
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
@@ -405,7 +405,7 @@ class extending :class:`Symfony\\Component\\Serializer\\Normalizer\\AbstractNorm
405405
including :class:`Symfony\\Component\\Serializer\\Normalizer\\GetSetMethodNormalizer`
406406
and :class:`Symfony\\Component\\Serializer\\Normalizer\\PropertyNormalizer`::
407407

408-
use Symfony\Component\Serializer\Encoder\JsonEncoder
408+
use Symfony\Component\Serializer\Encoder\JsonEncoder;
409409
use Symfony\Component\Serializer\Normalizer\ObjectNormalizer;
410410
use Symfony\Component\Serializer\Serializer;
411411

components/validator/resources.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,14 +173,14 @@ Using a Custom MetadataFactory
173173
------------------------------
174174

175175
All the loaders and the cache are passed to an instance of
176-
:class:`Symfony\\Component\\Validator\\Mapping\\ClassMetadataFactory`. This
177-
class is responsible for creating a ``ClassMetadata`` instance from all the
176+
:class:`Symfony\\Component\\Validator\\Mapping\\Factory\\LazyLoadingMetadataFactory`.
177+
This class is responsible for creating a ``ClassMetadata`` instance from all the
178178
configured resources.
179179

180180
You can also use a custom metadata factory implementation by creating a class
181181
which implements
182-
:class:`Symfony\\Component\\Validator\\MetadataFactoryInterface`. You can set
183-
this custom implementation using
182+
:class:`Symfony\\Component\\Validator\\Mapping\\Factory\\MetadataFactoryInterface`.
183+
You can set this custom implementation using
184184
:method:`Symfony\\Component\\Validator\\ValidatorBuilder::setMetadataFactory`::
185185

186186
use Acme\Validation\CustomMetadataFactory;

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
@@ -75,6 +75,9 @@ that can help you visualize and find the information.
7575
``debug:config``
7676
Shows all configured bundles, their class and their alias.
7777

78+
``debug:event-dispatcher``
79+
Displays information about all the registered listeners in the event dispatcher.
80+
7881
``debug:router``
7982
Displays information about all configured routes in the application as a
8083
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
@@ -165,7 +165,7 @@ interface and have an event method for each event it subscribes to::
165165

166166
public function index(LifecycleEventArgs $args)
167167
{
168-
$entity = $args->getEntity();
168+
$entity = $args->getObject();
169169

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

form/events.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ View data ``null``
8484

8585
.. sidebar:: ``FormEvents::PRE_SET_DATA`` in the Form component
8686

87-
The ``collection`` form type relies on the
88-
``Symfony\Component\Form\Extension\Core\EventListener\ResizeFormListener``
87+
The ``Symfony\Component\Form\Extension\Core\Type\CollectionType`` form type relies
88+
on the ``Symfony\Component\Form\Extension\Core\EventListener\ResizeFormListener``
8989
subscriber, listening to the ``FormEvents::PRE_SET_DATA`` event in order
9090
to reorder the form's fields depending on the data from the pre-populated
9191
object, by removing and adding all form rows.

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
@@ -639,6 +639,7 @@ the choice is ultimately up to you.
639639
good idea to explicitly specify the ``data_class`` option by adding the
640640
following to your form type class::
641641

642+
// src/AppBundle/Form/TaskType.php
642643
use AppBundle\Entity\Task;
643644
use Symfony\Component\OptionsResolver\OptionsResolver;
644645

reference/configuration/doctrine.rst

Lines changed: 10 additions & 7 deletions
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)
@@ -299,9 +299,10 @@ certain classes, but those are for very advanced use-cases only.
299299
Caching Drivers
300300
~~~~~~~~~~~~~~~
301301

302-
For the caching drivers you can specify the values ``array``, ``apc``, ``apcu``,
303-
``memcache``, ``memcached``, ``redis``, ``wincache``, ``zenddata``, ``xcache``
304-
or ``service``.
302+
The built-in types of caching drivers are: ``array``, ``apc``, ``apcu``,
303+
``memcache``, ``memcached``, ``redis``, ``wincache``, ``zenddata`` and ``xcache``.
304+
There is a special type called ``service`` which lets you define the ID of your
305+
own caching service.
305306

306307
The following example shows an overview of the caching configurations:
307308

@@ -310,15 +311,17 @@ The following example shows an overview of the caching configurations:
310311
doctrine:
311312
orm:
312313
auto_mapping: true
314+
# each caching driver type defines its own config options
313315
metadata_cache_driver: apc
314-
query_cache_driver:
315-
type: service
316-
id: my_doctrine_common_cache_service
317316
result_cache_driver:
318317
type: memcache
319318
host: localhost
320319
port: 11211
321320
instance_class: Memcache
321+
# the 'service' type requires to define the 'id' option too
322+
query_cache_driver:
323+
type: service
324+
id: my_doctrine_common_cache_service
322325
323326
Mapping Configuration
324327
~~~~~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)