Skip to content

Commit

Permalink
Merge branch '3.4' into 4.0
Browse files Browse the repository at this point in the history
* 3.4:
  Image to console
  Show console table examples in a console terminal
  Showed the output of the command in the same CLI window
  Replace entry/section by "article"
  Remove occurrences of "performant"
  • Loading branch information
javiereguiluz committed Jul 19, 2018
2 parents 83e88ab + 26493f3 commit 555a5fb
Show file tree
Hide file tree
Showing 22 changed files with 72 additions and 57 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 @@ -205,7 +205,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 @@ -228,7 +228,7 @@ This results in:

This generates:

.. code-block:: text
.. code-block:: terminal
+-------+-------+--------+
| Main table title |
Expand Down Expand Up @@ -259,7 +259,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
2 changes: 1 addition & 1 deletion doctrine/event_listeners_subscribers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ to the tag like so:
.. note::

  Marking an event listener as ``lazy`` has nothing to do with lazy service
definitions which are described :doc:`in their own section </service_container/lazy_services>`
definitions which are described :doc:`in their own article </service_container/lazy_services>`

.. _`The Event System`: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/events.html
.. _`the Doctrine Documentation`: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/events.html#entity-listeners
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
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
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
23 changes: 12 additions & 11 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
2 changes: 1 addition & 1 deletion setup/upgrade_major.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ All you need to do is install the PHPUnit bridge:
Now, you can start fixing the notices:

.. code-block:: text
.. code-block:: terminal
# this command is available after running "composer require --dev symfony/phpunit-bridge"
$ ./bin/phpunit
Expand Down
24 changes: 12 additions & 12 deletions translation/debug.rst
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ To inspect all messages in the ``fr`` locale for the application, run:
+----------+------------------+----------------------+-------------------------------+
Legend:
x Missing message
o Unused message
= Same as the fallback message
x Missing message
o Unused message
= Same as the fallback message
It shows you a table with the result when translating the message in the ``fr``
locale and the result when the fallback locale ``en`` would be used. On top
Expand All @@ -136,9 +136,9 @@ output:
+----------+------------------+----------------------+-------------------------------+
Legend:
x Missing message
o Unused message
= Same as the fallback message
x Missing message
o Unused message
= Same as the fallback message
The state is empty which means the message is translated in the ``fr`` locale
and used in one or more templates.
Expand All @@ -157,9 +157,9 @@ for the ``fr`` locale and run the command, you will get:
+----------+------------------+----------------------+-------------------------------+
Legend:
x Missing message
o Unused message
= Same as the fallback message
x Missing message
o Unused message
= Same as the fallback message
The state indicates the message is missing because it is not translated in
the ``fr`` locale but it is still used in the template. Moreover, the message
Expand All @@ -181,9 +181,9 @@ translation file in the ``fr`` locale and run the command, you will get:
+----------+------------------+----------------------+-------------------------------+
Legend:
x Missing message
o Unused message
= Same as the fallback message
x Missing message
o Unused message
= Same as the fallback message
You can see that the translations of the message are identical in the ``fr``
and ``en`` locales which means this message was probably copied from French
Expand Down

0 comments on commit 555a5fb

Please sign in to comment.