Skip to content

Commit

Permalink
Merge branch '4.1'
Browse files Browse the repository at this point in the history
* 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"
  • Loading branch information
javiereguiluz committed Jul 19, 2018
2 parents c8ba00e + 202c939 commit 5ae6670
Show file tree
Hide file tree
Showing 24 changed files with 84 additions and 69 deletions.
Binary file removed _images/components/console/table.png
Binary file not shown.
Binary file removed _images/components/phpunit_bridge/report.png
Binary file not shown.
2 changes: 1 addition & 1 deletion components/cache/adapters/php_array_cache_adapter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Php Array Cache Adapter
=======================

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

use Symfony\Component\Cache\Adapter\PhpArrayAdapter;
Expand Down
16 changes: 8 additions & 8 deletions components/console/helpers/table.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Table

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

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

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

.. code-block:: text
.. code-block:: terminal
+---------------+--------------------------+--------------------------------+
| ISBN | Title | Author |
Expand Down Expand Up @@ -117,7 +117,7 @@ The table style can be changed to any built-in styles via

This code results in:

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

which outputs:

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

This results in:

.. code-block:: text
.. code-block:: terminal
+---------------+---------------+-----------------+
| ISBN | Title | Author |
Expand All @@ -282,7 +282,7 @@ This results in:

This generates:

.. code-block:: text
.. code-block:: terminal
+-------+-------+--------+
| Main table title |
Expand Down Expand Up @@ -313,7 +313,7 @@ In a similar way you can span multiple rows::

This outputs:

.. code-block:: text
.. code-block:: terminal
+----------------+---------------+---------------------+
| ISBN | Title | Author |
Expand Down
2 changes: 1 addition & 1 deletion components/http_foundation/session_configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Configuring Sessions and Save Handlers
======================================

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

Expand Down
18 changes: 17 additions & 1 deletion components/phpunit_bridge.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,23 @@ to provide more features:
After running your PHPUnit tests, you will get a report similar to this one:

.. image:: /_images/components/phpunit_bridge/report.png
.. code-block:: terminal
$ ./vendor/bin/simple-phpunit
PHPUnit by Sebastian Bergmann.
Configuration read from <your-project>/phpunit.xml.dist
.................
Time: 1.77 seconds, Memory: 5.75Mb
OK (17 tests, 21 assertions)
Remaining deprecation notices (2)
getEntityManager is deprecated since Symfony 2.1. Use getManager instead: 2x
1x in DefaultControllerTest::testPublicUrls from App\Tests\Controller
1x in BlogControllerTest::testIndex from App\Tests\Controller
The summary includes:

Expand Down
4 changes: 2 additions & 2 deletions components/security/firewall.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ certain action or resource of the application::

.. note::

Read the dedicated sections to learn more about :doc:`/components/security/authentication`
Read the dedicated articles to learn more about :doc:`/components/security/authentication`
and :doc:`/components/security/authorization`.

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

Read the next sections to find out more about :doc:`/components/security/authentication`
Read the next articles to find out more about :doc:`/components/security/authentication`
and :doc:`/components/security/authorization`.
2 changes: 1 addition & 1 deletion deployment.rst
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ setup:
Application Lifecycle: Continuous Integration, QA, etc.
-------------------------------------------------------

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

Expand Down
4 changes: 2 additions & 2 deletions form/dynamic_form_modification.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
How to Dynamically Modify Forms Using Form Events
=================================================

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

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

Adding an Event Listener to a Form Class
Expand Down
6 changes: 3 additions & 3 deletions form/form_collections.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
How to Embed a Collection of Forms
==================================

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

.. note::

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

.. caution::

In this entry, you embed only one collection, but you are not limited
In this article, you embed only one collection, but you are not limited
to this. You can also embed nested collection as many levels down as you
like. But if you use Xdebug in your development setup, you may receive
a ``Maximum function nesting level of '100' reached, aborting!`` error.
Expand Down
6 changes: 3 additions & 3 deletions http_cache.rst
Original file line number Diff line number Diff line change
Expand Up @@ -258,9 +258,9 @@ for debugging information about cache hits and misses.

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

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

.. tip::

Expand Down
2 changes: 1 addition & 1 deletion introduction/http_fundamentals.rst
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ resource - the most common HTTP methods are:
Delete the resource from the server (used by APIs).

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

.. code-block:: text
Expand Down
8 changes: 5 additions & 3 deletions messenger.rst
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,11 @@ Once you've created your handler, you need to register it:
Transports
----------

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

.. note::

Expand Down
2 changes: 0 additions & 2 deletions quick_tour/flex_recipes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,6 @@ me? List your routes by running:
$ php bin/console debug:router
.. code-block:: text
------------------------------ -------- -------------------------------------
Name Method Path
------------------------------ -------- -------------------------------------
Expand Down
2 changes: 0 additions & 2 deletions routing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -569,8 +569,6 @@ As your app grows, you'll eventually have a *lot* of routes! To see them all, ru
$ php bin/console debug:router
.. code-block:: text
------------------------------ -------- -------------------------------------
Name Method Path
------------------------------ -------- -------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions security/api_key_authentication.rst
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ to store authentication in the session, keep reading!
Storing Authentication in the Session
-------------------------------------

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

This entry has assumed that you want to look for the ``apikey`` authentication
This article has assumed that you want to look for the ``apikey`` authentication
on *every* request. But in some situations (like an OAuth flow), you only
really need to look for authentication information once the user has reached
a certain URL (e.g. the redirect URL in OAuth).
Expand Down
2 changes: 1 addition & 1 deletion security/custom_authentication_provider.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ How to Create a custom Authentication Provider

.. tip::

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

Expand Down
2 changes: 1 addition & 1 deletion security/custom_password_authenticator.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ How to Create a Custom Form Password Authenticator
flexible way to accomplish custom authentication tasks like this.

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

The Password Authenticator
Expand Down
4 changes: 2 additions & 2 deletions security/custom_provider.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ the configured user provider to return a user object for a given username.
Symfony then checks whether the password of this user is correct and generates
a security token so the user stays authenticated during the current session.
Out of the box, Symfony has four user providers: ``memory``, ``entity``,
``ldap`` and ``chain``. In this entry you'll see how you can create your
``ldap`` and ``chain``. In this article you'll see how you can create your
own user provider, which could be useful if your users are accessed via a
custom database, a file, or - as shown in this example - a web service.

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

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

Expand Down
2 changes: 1 addition & 1 deletion security/entity_provider.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Before you begin, run this command to add support for the Symfony security:
$ composer require symfony/security-bundle
For this entry, suppose that you already have a ``User`` entity
For this article, suppose that you already have a ``User`` entity
with the following fields: ``id``, ``username``, ``password``,
``email`` and ``isActive``::

Expand Down
33 changes: 17 additions & 16 deletions service_container.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,19 @@ What other services are available? Find out by running:

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

.. code-block:: yaml
# app/config/services.yml
# config/services.yaml
services:
App\Domain\:
resource: '../../src/Domain/*'
resource: '../src/Domain/*'
# ...
In order to have multiple definitions, add the ``namespace`` option and use any
unique string as the key of each service config:

.. code-block:: yaml
# app/config/services.yml
# config/services.yaml
services:
command_handlers:
namespace: App\Domain\
resource: '../../src/Domain/*/CommandHandler'
resource: '../src/Domain/*/CommandHandler'
tags: [command_handler]
event_subscribers:
namespace: App\Domain\
resource: '../../src/Domain/*/EventSubscriber'
resource: '../src/Domain/*/EventSubscriber'
tags: [event_subscriber]
.. _services-explicitly-configure-wire-services:
Expand Down
6 changes: 3 additions & 3 deletions service_container/service_subscribers_locators.rst
Original file line number Diff line number Diff line change
Expand Up @@ -202,15 +202,15 @@ service type to a service.

.. code-block:: yaml
// app/config/services.yml
// config/services.yaml
services:
App\CommandBus:
tags:
- { name: 'container.service_subscriber', key: 'logger', id: 'monolog.logger.event' }
.. code-block:: xml
<!-- app/config/services.xml -->
<!-- config/services.xml -->
<?xml version="1.0" encoding="UTF-8" ?>
<container xmlns="http://symfony.com/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Expand All @@ -227,7 +227,7 @@ service type to a service.
.. code-block:: php
// app/config/services.php
// config/services.php
use App\CommandBus;
// ...
Expand Down
Loading

0 comments on commit 5ae6670

Please sign in to comment.