Skip to content

Commit 5ae6670

Browse files
committed
Merge branch '4.1'
* 4.1: Image to console Transport not mandatory Show console table examples in a console terminal Merged the output of another command with its command line Showed the output of the command in the same CLI window Fixed some wrong examples about service config Replace entry/section by "article" Remove occurrences of "performant"
2 parents c8ba00e + 202c939 commit 5ae6670

24 files changed

+84
-69
lines changed

_images/components/console/table.png

-65.9 KB
Binary file not shown.
-46.6 KB
Binary file not shown.

components/cache/adapters/php_array_cache_adapter.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Php Array Cache Adapter
66
=======================
77

8-
This adapter is a highly performant way to cache static data (e.g. application configuration)
8+
This adapter is a high performance cache for static data (e.g. application configuration)
99
that is optimized and preloaded into OPcache memory storage::
1010

1111
use Symfony\Component\Cache\Adapter\PhpArrayAdapter;

components/console/helpers/table.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Table
66

77
When building a console application it may be useful to display tabular data:
88

9-
.. code-block:: text
9+
.. code-block:: terminal
1010
1111
+---------------+--------------------------+------------------+
1212
| ISBN | Title | Author |
@@ -54,7 +54,7 @@ You can add a table separator anywhere in the output by passing an instance of
5454
array('80-902734-1-6', 'And Then There Were None', 'Agatha Christie'),
5555
));
5656

57-
.. code-block:: text
57+
.. code-block:: terminal
5858
5959
+---------------+--------------------------+------------------+
6060
| ISBN | Title | Author |
@@ -78,7 +78,7 @@ In this example, the first column width will be ``10``, the last column width
7878
will be ``30`` and the second column width will be calculated automatically
7979
because of the ``0`` value. The output of this command will be:
8080

81-
.. code-block:: text
81+
.. code-block:: terminal
8282
8383
+---------------+--------------------------+--------------------------------+
8484
| ISBN | Title | Author |
@@ -117,7 +117,7 @@ The table style can be changed to any built-in styles via
117117

118118
This code results in:
119119

120-
.. code-block:: text
120+
.. code-block:: terminal
121121
122122
ISBN Title Author
123123
99921-58-10-7 Divine Comedy Dante Alighieri
@@ -132,7 +132,7 @@ You can also set the style to ``borderless``::
132132

133133
which outputs:
134134

135-
.. code-block:: text
135+
.. code-block:: terminal
136136
137137
=============== ========================== ==================
138138
ISBN Title Author
@@ -259,7 +259,7 @@ To make a table cell that spans multiple columns you can use a :class:`Symfony\\
259259

260260
This results in:
261261

262-
.. code-block:: text
262+
.. code-block:: terminal
263263
264264
+---------------+---------------+-----------------+
265265
| ISBN | Title | Author |
@@ -282,7 +282,7 @@ This results in:
282282

283283
This generates:
284284

285-
.. code-block:: text
285+
.. code-block:: terminal
286286
287287
+-------+-------+--------+
288288
| Main table title |
@@ -313,7 +313,7 @@ In a similar way you can span multiple rows::
313313

314314
This outputs:
315315

316-
.. code-block:: text
316+
.. code-block:: terminal
317317
318318
+----------------+---------------+---------------------+
319319
| ISBN | Title | Author |

components/http_foundation/session_configuration.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Configuring Sessions and Save Handlers
66
======================================
77

8-
This section deals with how to configure session management and fine tune it
8+
This article deals with how to configure session management and fine tune it
99
to your specific needs. This documentation covers save handlers, which
1010
store and retrieve session data, and configuring session behavior.
1111

components/phpunit_bridge.rst

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,23 @@ to provide more features:
7979
8080
After running your PHPUnit tests, you will get a report similar to this one:
8181

82-
.. image:: /_images/components/phpunit_bridge/report.png
82+
.. code-block:: terminal
83+
84+
$ ./vendor/bin/simple-phpunit
85+
PHPUnit by Sebastian Bergmann.
86+
87+
Configuration read from <your-project>/phpunit.xml.dist
88+
.................
89+
90+
Time: 1.77 seconds, Memory: 5.75Mb
91+
92+
OK (17 tests, 21 assertions)
93+
94+
Remaining deprecation notices (2)
95+
96+
getEntityManager is deprecated since Symfony 2.1. Use getManager instead: 2x
97+
1x in DefaultControllerTest::testPublicUrls from App\Tests\Controller
98+
1x in BlogControllerTest::testIndex from App\Tests\Controller
8399
84100
The summary includes:
85101

components/security/firewall.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ certain action or resource of the application::
3636

3737
.. note::
3838

39-
Read the dedicated sections to learn more about :doc:`/components/security/authentication`
39+
Read the dedicated articles to learn more about :doc:`/components/security/authentication`
4040
and :doc:`/components/security/authorization`.
4141

4242
.. _firewall:
@@ -160,5 +160,5 @@ context works:
160160
#. Once a user is authenticated, you'll use :doc:`/components/security/authorization`
161161
to deny access to certain resources.
162162

163-
Read the next sections to find out more about :doc:`/components/security/authentication`
163+
Read the next articles to find out more about :doc:`/components/security/authentication`
164164
and :doc:`/components/security/authorization`.

deployment.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ setup:
195195
Application Lifecycle: Continuous Integration, QA, etc.
196196
-------------------------------------------------------
197197

198-
While this entry covers the technical details of deploying, the full lifecycle
198+
While this article covers the technical details of deploying, the full lifecycle
199199
of taking code from development up to production may have more steps:
200200
deploying to staging, QA (Quality Assurance), running tests, etc.
201201

form/dynamic_form_modification.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
How to Dynamically Modify Forms Using Form Events
55
=================================================
66

7-
Often times, a form can't be created statically. In this entry, you'll learn
7+
Often times, a form can't be created statically. In this article, you'll learn
88
how to customize your form based on three common use-cases:
99

1010
1) :ref:`form-events-underlying-data`
@@ -74,7 +74,7 @@ Suppose now, that you don't want the user to be able to change the ``name`` valu
7474
once the object has been created. To do this, you can rely on Symfony's
7575
:doc:`EventDispatcher component </components/event_dispatcher>`
7676
system to analyze the data on the object and modify the form based on the
77-
Product object's data. In this entry, you'll learn how to add this level of
77+
Product object's data. In this article, you'll learn how to add this level of
7878
flexibility to your forms.
7979

8080
Adding an Event Listener to a Form Class

form/form_collections.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
How to Embed a Collection of Forms
55
==================================
66

7-
In this entry, you'll learn how to create a form that embeds a collection
7+
In this article, you'll learn how to create a form that embeds a collection
88
of many other forms. This could be useful, for example, if you had a ``Task``
99
class and you wanted to edit/create/remove many ``Tag`` objects related to
1010
that Task, right inside the same form.
1111

1212
.. note::
1313

14-
In this entry, it's loosely assumed that you're using Doctrine as your
14+
In this article, it's loosely assumed that you're using Doctrine as your
1515
database store. But if you're not using Doctrine (e.g. Propel or just
1616
a database connection), it's all very similar. There are only a few parts
1717
of this tutorial that really care about "persistence".
@@ -224,7 +224,7 @@ great, your user can't actually add any new tags yet.
224224

225225
.. caution::
226226

227-
In this entry, you embed only one collection, but you are not limited
227+
In this article, you embed only one collection, but you are not limited
228228
to this. You can also embed nested collection as many levels down as you
229229
like. But if you use Xdebug in your development setup, you may receive
230230
a ``Maximum function nesting level of '100' reached, aborting!`` error.

http_cache.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,9 +258,9 @@ for debugging information about cache hits and misses.
258258

259259
The URI of the request is used as the cache key (unless you :doc:`vary </http_cache/cache_vary>`).
260260

261-
This is *super* performant and simple to use. But, cache *invalidation* is not supported.
262-
If your content change, you'll need to wait until your cache expires for the page
263-
to update.
261+
This provides great performance and is simple to use. But, cache *invalidation*
262+
is not supported. If your content change, you'll need to wait until your cache
263+
expires for the page to update.
264264

265265
.. tip::
266266

introduction/http_fundamentals.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ resource - the most common HTTP methods are:
7878
Delete the resource from the server (used by APIs).
7979

8080
With this in mind, you can imagine what an HTTP request might look like to
81-
delete a specific blog entry, for example:
81+
delete a specific blog post, for example:
8282

8383
.. code-block:: text
8484

messenger.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,11 @@ Once you've created your handler, you need to register it:
100100
Transports
101101
----------
102102

103-
The communication with queuing systems or third parties is delegated to
104-
libraries for now. The built-in AMQP transport allows you to communicate with
105-
most of the AMQP brokers such as RabbitMQ.
103+
By default, messages are processed as soon as they are dispatched. If you prefer
104+
to process messages asynchronously, you must configure a transport. These
105+
transports communicate with your application via queuing systems or third parties.
106+
The built-in AMQP transport allows you to communicate with most of the AMQP
107+
brokers such as RabbitMQ.
106108

107109
.. note::
108110

quick_tour/flex_recipes.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,6 @@ me? List your routes by running:
227227
228228
$ php bin/console debug:router
229229
230-
.. code-block:: text
231-
232230
------------------------------ -------- -------------------------------------
233231
Name Method Path
234232
------------------------------ -------- -------------------------------------

routing.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -569,8 +569,6 @@ As your app grows, you'll eventually have a *lot* of routes! To see them all, ru
569569
570570
$ php bin/console debug:router
571571
572-
.. code-block:: text
573-
574572
------------------------------ -------- -------------------------------------
575573
Name Method Path
576574
------------------------------ -------- -------------------------------------

security/api_key_authentication.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ to store authentication in the session, keep reading!
410410
Storing Authentication in the Session
411411
-------------------------------------
412412

413-
So far, this entry has described a situation where some sort of authentication
413+
So far, this article has described a situation where some sort of authentication
414414
token is sent on every request. But in some situations (like an OAuth flow),
415415
the token may be sent on only *one* request. In this case, you will want to
416416
authenticate the user and store that authentication in the session so that
@@ -569,7 +569,7 @@ of the user to make sure it's not out-of-date. But regardless of your requiremen
569569
Only Authenticating for Certain URLs
570570
------------------------------------
571571

572-
This entry has assumed that you want to look for the ``apikey`` authentication
572+
This article has assumed that you want to look for the ``apikey`` authentication
573573
on *every* request. But in some situations (like an OAuth flow), you only
574574
really need to look for authentication information once the user has reached
575575
a certain URL (e.g. the redirect URL in OAuth).

security/custom_authentication_provider.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ How to Create a custom Authentication Provider
66

77
.. tip::
88

9-
Creating a custom authentication system is hard, and this entry will walk
9+
Creating a custom authentication system is hard, and this article will walk
1010
you through that process. But depending on your needs, you may be able
1111
to solve your problem in a simpler manner, or via a community bundle:
1212

security/custom_password_authenticator.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ How to Create a Custom Form Password Authenticator
1010
flexible way to accomplish custom authentication tasks like this.
1111

1212
Imagine you want to allow access to your website only between 2pm and 4pm
13-
UTC. In this entry, you'll learn how to do this for a login form (i.e. where
13+
UTC. In this article, you'll learn how to do this for a login form (i.e. where
1414
your user submits their username and password).
1515

1616
The Password Authenticator

security/custom_provider.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ the configured user provider to return a user object for a given username.
1010
Symfony then checks whether the password of this user is correct and generates
1111
a security token so the user stays authenticated during the current session.
1212
Out of the box, Symfony has four user providers: ``memory``, ``entity``,
13-
``ldap`` and ``chain``. In this entry you'll see how you can create your
13+
``ldap`` and ``chain``. In this article you'll see how you can create your
1414
own user provider, which could be useful if your users are accessed via a
1515
custom database, a file, or - as shown in this example - a web service.
1616

@@ -294,7 +294,7 @@ is compared to the hashed password returned by your ``getPassword()`` method.
294294

295295
If your external users have their passwords salted via a different method,
296296
then you'll need to do a bit more work so that Symfony properly encodes
297-
the password. That is beyond the scope of this entry, but would include
297+
the password. That is beyond the scope of this article, but would include
298298
sub-classing ``MessageDigestPasswordEncoder`` and overriding the
299299
``mergePasswordAndSalt()`` method.
300300

security/entity_provider.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Before you begin, run this command to add support for the Symfony security:
3333
3434
$ composer require symfony/security-bundle
3535
36-
For this entry, suppose that you already have a ``User`` entity
36+
For this article, suppose that you already have a ``User`` entity
3737
with the following fields: ``id``, ``username``, ``password``,
3838
``email`` and ``isActive``::
3939

service_container.rst

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,19 @@ What other services are available? Find out by running:
4242

4343
.. code-block:: terminal
4444
45-
$ php bin/console debug:autowiring
45+
$ php bin/console debug:autowiring
4646
47-
=============================================================== =====================================
48-
Class/Interface Type Alias Service ID
49-
=============================================================== =====================================
50-
``Psr\Cache\CacheItemPoolInterface`` alias for "cache.app.recorder"
51-
``Psr\Log\LoggerInterface`` alias for "monolog.logger"
52-
``Symfony\Component\EventDispatcher\EventDispatcherInterface`` alias for "debug.event_dispatcher"
53-
``Symfony\Component\HttpFoundation\RequestStack`` alias for "request_stack"
54-
``Symfony\Component\HttpFoundation\Session\SessionInterface`` alias for "session"
55-
``Symfony\Component\Routing\RouterInterface`` alias for "router.default"
56-
=============================================================== =====================================
47+
# this is just a *small* sample of the output...
48+
=============================================================== =====================================
49+
Class/Interface Type Alias Service ID
50+
=============================================================== =====================================
51+
``Psr\Cache\CacheItemPoolInterface`` alias for "cache.app.recorder"
52+
``Psr\Log\LoggerInterface`` alias for "monolog.logger"
53+
``Symfony\Component\EventDispatcher\EventDispatcherInterface`` alias for "debug.event_dispatcher"
54+
``Symfony\Component\HttpFoundation\RequestStack`` alias for "request_stack"
55+
``Symfony\Component\HttpFoundation\Session\SessionInterface`` alias for "session"
56+
``Symfony\Component\Routing\RouterInterface`` alias for "router.default"
57+
=============================================================== =====================================
5758
5859
When you use these type-hints in your controller methods or inside your
5960
:ref:`own services <service-container-creating-service>`, Symfony will automatically
@@ -918,27 +919,27 @@ for classes under the same namespace:
918919

919920
.. code-block:: yaml
920921
921-
# app/config/services.yml
922+
# config/services.yaml
922923
services:
923924
App\Domain\:
924-
resource: '../../src/Domain/*'
925+
resource: '../src/Domain/*'
925926
# ...
926927
927928
In order to have multiple definitions, add the ``namespace`` option and use any
928929
unique string as the key of each service config:
929930

930931
.. code-block:: yaml
931932
932-
# app/config/services.yml
933+
# config/services.yaml
933934
services:
934935
command_handlers:
935936
namespace: App\Domain\
936-
resource: '../../src/Domain/*/CommandHandler'
937+
resource: '../src/Domain/*/CommandHandler'
937938
tags: [command_handler]
938939
939940
event_subscribers:
940941
namespace: App\Domain\
941-
resource: '../../src/Domain/*/EventSubscriber'
942+
resource: '../src/Domain/*/EventSubscriber'
942943
tags: [event_subscriber]
943944
944945
.. _services-explicitly-configure-wire-services:

service_container/service_subscribers_locators.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,15 +202,15 @@ service type to a service.
202202

203203
.. code-block:: yaml
204204
205-
// app/config/services.yml
205+
// config/services.yaml
206206
services:
207207
App\CommandBus:
208208
tags:
209209
- { name: 'container.service_subscriber', key: 'logger', id: 'monolog.logger.event' }
210210
211211
.. code-block:: xml
212212
213-
<!-- app/config/services.xml -->
213+
<!-- config/services.xml -->
214214
<?xml version="1.0" encoding="UTF-8" ?>
215215
<container xmlns="http://symfony.com/schema/dic/services"
216216
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -227,7 +227,7 @@ service type to a service.
227227
228228
.. code-block:: php
229229
230-
// app/config/services.php
230+
// config/services.php
231231
use App\CommandBus;
232232
233233
// ...

0 commit comments

Comments
 (0)