10000 Merge branch '2.7' into 2.8 · symfony/symfony-docs@3a41ea8 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3a41ea8

Browse files
committed
Merge branch '2.7' into 2.8
* 2.7: Update resources.rst Improved a help note about authentication providers [#8280] add missing trailing comma Improved the explanation about the doctrine caching services [Routing] Add URI scheme enforcement annotation example
2 parents c93f8c9 + 9008929 commit 3a41ea8

File tree

4 files changed

+37
-12
lines changed

4 files changed

+37
-12
lines changed

components/validator/resources.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -179,14 +179,14 @@ Using a Custom MetadataFactory
179179
------------------------------
180180

181181
All the loaders and the cache are passed to an instance of
182-
:class:`Symfony\\Component\\Validator\\Mapping\\ClassMetadataFactory`. This
183-
class is responsible for creating a ``ClassMetadata`` instance from all the
182+
:class:`Symfony\\Component\\Validator\\Mapping\\Factory\\LazyLoadingMetadataFactory`.
183+
This class is responsible for creating a ``ClassMetadata`` instance from all the
184184
configured resources.
185185

186186
You can also use a custom metadata factory implementation by creating a class
187187
which implements
188-
:class:`Symfony\\Component\\Validator\\MetadataFactoryInterface`. You can set
189-
this custom implementation using
188+
:class:`Symfony\\Component\\Validator\\Mapping\\Factory\\MetadataFactoryInterface`.
189+
You can set this custom implementation using
190190
:method:`Symfony\\Component\\Validator\\ValidatorBuilder::setMetadataFactory`::
191191

192192
use Acme\Validation\CustomMetadataFactory;

reference/configuration/doctrine.rst

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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
~~~~~~~~~~~~~~~~~~~~~

routing/scheme.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,25 @@ the URI scheme via schemes:
1010

1111
.. configuration-block::
1212

13+
.. code-block:: php-annotations
14+
15+
// src/AppBundle/Controller/MainController.php
16+
namespace AppBundle\Controller;
17+
18+
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
19+
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
20+
21+
class MainController extends Controller
22+
{
23+
/**
24+
* @Route("/secure", name="secure", schemes={"https"})
25+
*/
26+
public function secureAction()
27+
{
28+
// ...
29+
}
30+
}
31+
1332
.. code-block:: yaml
1433
1534
# app/config/routing.yml

security/api_key_authentication.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,11 @@ method, if any.
130130

131131
.. caution::
132132

133-
In case you return ``null`` from your ``createToken()`` method, be sure to enable
134-
``anonymous`` in you firewall. This way you'll be able to get an ``AnonymousToken``.
133+
In case you return ``null`` from your ``createToken()`` method, Symfony
134+
passes this request to the next authentication provider. If you haven't
135+
configured any other provider, enable the ``anonymous`` option in your
136+
firewall. This way Symfony executes the anonymous authentication provider
137+
and you'll get an ``AnonymousToken``.
135138

136139
2. supportsToken
137140
~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)
0