Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4cb9839

Browse filesBrowse files
committed
Merge branch '4.0' into 4.1
* 4.0: Fixed some wrong links to external API classes/methods Improve functional test workflow example Added documentation about authentication for multiple firewalls under the same firewall context Fix missing use of IssueSelectorType Fixed URLs to APIs outside of the Symfony project
2 parents 8c63a98 + 8f2f013 commit 4cb9839
Copy full SHA for 4cb9839

File tree

Expand file treeCollapse file tree

6 files changed

+21
-20
lines changed
Filter options
Expand file treeCollapse file tree

6 files changed

+21
-20
lines changed

‎components/cache/cache_items.rst

Copy file name to clipboardExpand all lines: components/cache/cache_items.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ argument is the key of the item::
3333
// $cache pool object was created before
3434
$productsCount = $cache->getItem('stats.products_count');
3535

36-
Then, use the :method:`Psr\\Cache\\CacheItemInterface::set` method to set
36+
Then, use the ``Psr\\Cache\\CacheItemInterface::set`` method to set
3737
the data stored in the cache item::
3838

3939
// storing a simple integer

‎components/cache/cache_pools.rst

Copy file name to clipboardExpand all lines: components/cache/cache_pools.rst
+7-7Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Saving Cache Items
6969
------------------
7070

7171
The most common method to save cache items is
72-
:method:`Psr\\Cache\\CacheItemPoolInterface::save`, which stores the
72+
``Psr\\Cache\\CacheItemPoolInterface::save``, which stores the
7373
item in the cache immediately (it returns ``true`` if the item was saved or
7474
``false`` if some error occurred)::
7575

@@ -80,9 +80,9 @@ item in the cache immediately (it returns ``true`` if the item was saved or
8080

8181
Sometimes you may prefer to not save the objects immediately in order to
8282
increase the application performance. In those cases, use the
83-
:method:`Psr\\Cache\\CacheItemPoolInterface::saveDeferred` method to mark cache
83+
``Psr\\Cache\\CacheItemPoolInterface::saveDeferred`` method to mark cache
8484
items as "ready to be persisted" and then call to
85-
:method:`Psr\\Cache\\CacheItemPoolInterface::commit` method when you are ready
85+
``Psr\\Cache\\CacheItemPoolInterface::commit`` method when you are ready
8686
to persist them all::
8787

8888
// ...
@@ -103,22 +103,22 @@ Removing Cache Items
103103
--------------------
104104

105105
Cache Pools include methods to delete a cache item, some of them or all of them.
106-
The most common is :method:`Psr\\Cache\\CacheItemPoolInterface::deleteItem`,
106+
The most common is ``Psr\\Cache\\CacheItemPoolInterface::deleteItem``,
107107
which deletes the cache item identified by the given key (it returns ``true``
108108
when the item is successfully deleted or doesn't exist and ``false`` otherwise)::
109109

110110
// ...
111111
$isDeleted = $cache->deleteItem('user_'.$userId);
112112

113-
Use the :method:`Psr\\Cache\\CacheItemPoolInterface::deleteItems` method to
113+
Use the ``Psr\\Cache\\CacheItemPoolInterface::deleteItems`` method to
114114
delete several cache items simultaneously (it returns ``true`` only if all the
115115
items have been deleted, even when any or some of them don't exist)::
116116

117117
// ...
118118
$areDeleted = $cache->deleteItems(array('category1', 'category2'));
119119

120120
Finally, to remove all the cache items stored in the pool, use the
121-
:method:`Psr\\Cache\\CacheItemPoolInterface::clear` method (which returns ``true``
121+
``Psr\\Cache\\CacheItemPoolInterface::clear`` method (which returns ``true``
122122
when all items are successfully deleted)::
123123

124124
// ...
@@ -162,7 +162,7 @@ Pruning Cache Items
162162
Some cache pools do not include an automated mechanism for pruning expired cache items.
163163
For example, the :ref:`FilesystemAdaper <component-cache-filesystem-adapter>` cache
164164
does not remove expired cache items *until an item is explicitly requested and determined to
165-
be expired*, for example, via a call to :method:`Psr\\Cache\\CacheItemPoolInterface::getItem`.
165+
be expired*, for example, via a call to ``Psr\\Cache\\CacheItemPoolInterface::getItem``.
166166
Under certain workloads, this can cause stale cache entries to persist well past their
167167
expiration, resulting in a sizable consumption of wasted disk or memory space from excess,
168168
expired cache items.

‎components/psr7.rst

Copy file name to clipboardExpand all lines: components/psr7.rst
+8-8Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ that builds objects implementing PSR-7 interfaces from HttpFoundation objects.
3636
It also provide a default implementation using Zend Diactoros internally.
3737

3838
The following code snippet explain how to convert a :class:`Symfony\\Component\\HttpFoundation\\Request`
39-
to a Zend Diactoros :class:`Zend\\Diactoros\\ServerRequest` implementing the
40-
:class:`Psr\\Http\\Message\\ServerRequestInterface` interface::
39+
to a ``Zend\\Diactoros\\ServerRequest`` class implementing the
40+
``Psr\\Http\\Message\\ServerRequestInterface`` interface::
4141

4242
use Symfony\Bridge\PsrHttpMessage\Factory\DiactorosFactory;
4343
use Symfony\Component\HttpFoundation\Request;
@@ -48,9 +48,9 @@ to a Zend Diactoros :class:`Zend\\Diactoros\\ServerRequest` implementing the
4848
$psr7Factory = new DiactorosFactory();
4949
$psrRequest = $psr7Factory->createRequest($symfonyRequest);
5050

51-
And now from a :class:`Symfony\\Component\\HttpFoundation\\Response` to a Zend
52-
Diactoros :class:`Zend\\Diactoros\\Response` implementing the :class:`Psr\\Http\\Message\\ResponseInterface`
53-
interface::
51+
And now from a :class:`Symfony\\Component\\HttpFoundation\\Response` to a
52+
``Zend\\Diactoros\\Response`` class implementing the
53+
``Psr\\Http\\Message\\ResponseInterface`` interface::
5454

5555
use Symfony\Bridge\PsrHttpMessage\Factory\DiactorosFactory;
5656
use Symfony\Component\HttpFoundation\Response;
@@ -68,8 +68,8 @@ On the other hand, the bridge provide a factory interface called
6868
that builds HttpFoundation objects from objects implementing PSR-7 interfaces.
6969

7070
The next snippet explain how to convert an object implementing the
71-
:class:`Psr\\Http\\Message\\ServerRequestInterface`
72-
interface to a :class:`Symfony\\Component\\HttpFoundation\\Request` instance::
71+
``Psr\\Http\\Message\\ServerRequestInterface`` interface to a
72+
:class:`Symfony\\Component\\HttpFoundation\\Request` instance::
7373

7474
use Symfony\Bridge\PsrHttpMessage\Factory\HttpFoundationFactory;
7575

@@ -78,7 +78,7 @@ interface to a :class:`Symfony\\Component\\HttpFoundation\\Request` instance::
7878
$httpFoundationFactory = new HttpFoundationFactory();
7979
$symfonyRequest = $httpFoundationFactory->createRequest($psrRequest);
8080

81-
From an object implementing the :class:`Psr\\Http\\Message\\ResponseInterface`
81+
From an object implementing the ``Psr\\Http\\Message\\ResponseInterface``
8282
to a :class:`Symfony\\Component\\HttpFoundation\\Response` instance::
8383

8484
use Symfony\Bridge\PsrHttpMessage\Factory\HttpFoundationFactory;

‎reference/configuration/framework.rst

Copy file name to clipboardExpand all lines: reference/configuration/framework.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1864,7 +1864,7 @@ The name of the adapter to use. You could also use your own implementation.
18641864

18651865
.. note::
18661866

1867-
Your service MUST implement the :class:`Psr\\Cache\\CacheItemPoolInterface` interface.
1867+
Your service MUST implement the ``Psr\\Cache\\CacheItemPoolInterface`` interface.
18681868

18691869
public
18701870
""""""

‎testing.rst

Copy file name to clipboardExpand all lines: testing.rst
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ application (from the routing to the views). They are no different from unit
120120
tests as far as PHPUnit is concerned, but they have a very specific workflow:
121121

122122
* Make a request;
123-
* Test the response;
124123
* Click on a link or submit a form;
125124
* Test the response;
126125
* Rinse and repeat.

‎testing/http_authentication.rst

Copy file name to clipboardExpand all lines: testing/http_authentication.rst
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,12 @@ needs::
113113
{
114114
$session = $this->client->getContainer()->get('session');
115115

116-
// the firewall context defaults to the firewall name
116+
$firewallName = 'secure_area';
117+
// if you don't define multiple connected firewalls, the context defaults to the firewall name
118+
// See https://symfony.com/doc/current/reference/configuration/security.html#firewall-context
117119
$firewallContext = 'secured_area';
118120

119-
$token = new UsernamePasswordToken('admin', null, $firewallContext, array('ROLE_ADMIN'));
121+
$token = new UsernamePasswordToken('admin', null, $firewallName, array('ROLE_ADMIN'));
120122
$session->set('_security_'.$firewallContext, serialize($token));
121123
$session->save();
122124

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.