Skip to content

Commit

Permalink
Merge branch '3.0'
Browse files Browse the repository at this point in the history
* 3.0: (38 commits)
  Fixed wrong code examples for Isbn constraint
  Calling the parent implementation is mandatory.
  unused use instructions
  Fix typo in SwitchUserListener file name
  Reworded the example about $deep param
  Changed folder name to lowercase (best practises)
  [#6365] Removing extra :
  Add a note about enabling DebugBundle to use VarDumper inside Symfony
  Update introduction.rst
  Added minor clarification
  Changed folder name to lowercase (best practises)
  Fixed typo in path
  [#6360] Minor changes
  [#6349][#6351][#6352]
  Update "bootstrap.php.cache" to "autoload.php"
  Editing the Doctrine section to improve readability.
  Minor corrections
  Fixed typo
  Fix escaping of backtick inside double back-quotes
  Made list of types more consistent
  ...
  • Loading branch information
xabbuh committed Mar 26, 2016
2 parents 10ea5e9 + d2b6569 commit 8deb817
Show file tree
Hide file tree
Showing 19 changed files with 454 additions and 424 deletions.
462 changes: 241 additions & 221 deletions book/controller.rst

Large diffs are not rendered by default.

278 changes: 162 additions & 116 deletions book/doctrine.rst

Large diffs are not rendered by default.

6 changes: 1 addition & 5 deletions book/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -204,11 +204,7 @@ your `Apache`_ or `Nginx`_ web server as explained in
:doc:`/cookbook/configuration/web_server_configuration`.

When you are finished working on your Symfony application, you can stop the
server with the ``server:stop`` command:

.. code-block:: bash
$ php bin/console server:stop
server by pressing `Ctrl+C` from terminal.

Checking Symfony Application Configuration and Setup
----------------------------------------------------
Expand Down
8 changes: 4 additions & 4 deletions book/templating.rst
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ Template Naming and Locations
By default, templates can live in two different locations:

``app/Resources/views/``
The applications ``views`` directory can contain application-wide base templates
The application's ``views`` directory can contain application-wide base templates
(i.e. your application's layouts and templates of the application bundle) as
well as templates that override third party bundle templates
(see :ref:`overriding-bundle-templates`).
Expand Down Expand Up @@ -616,7 +616,7 @@ articles::
}
}

The ``recentList`` template is perfectly straightforward:
The ``recent_list`` template is perfectly straightforward:

.. configuration-block::

Expand Down Expand Up @@ -975,7 +975,7 @@ route:
In this case, you need to specify both the route name (``article_show``) and
a value for the ``{slug}`` parameter. Using this route, revisit the
``recentList`` template from the previous section and link to the articles
``recent_list`` template from the previous section and link to the articles
correctly:

.. configuration-block::
Expand Down Expand Up @@ -1053,7 +1053,7 @@ being used and generating the correct paths accordingly.

Additionally, if you use the ``asset`` function, Symfony can automatically
append a query string to your asset, in order to guarantee that updated static
assets won't be cached when deployed. For example, ``/images/logo.png`` might
assets won't be loaded from cache after being deployed. For example, ``/images/logo.png`` might
look like ``/images/logo.png?v2``. For more information, see the :ref:`reference-framework-assets-version`
configuration option.

Expand Down
2 changes: 1 addition & 1 deletion book/translation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -927,5 +927,5 @@ steps:
.. _`i18n`: https://en.wikipedia.org/wiki/Internationalization_and_localization
.. _`ISO 3166-1 alpha-2`: https://en.wikipedia.org/wiki/ISO_3166-1#Current_codes
.. _`ISO 639-1`: https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
.. _`Translatable Extension`: https://github.com/l3pp4rd/DoctrineExtensions
.. _`Translatable Extension`: http://atlantic18.github.io/DoctrineExtensions/doc/translatable.html
.. _`Translatable Behavior`: https://github.com/KnpLabs/DoctrineBehaviors
18 changes: 11 additions & 7 deletions components/http_foundation/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -147,25 +147,28 @@ exist::
// the query string is '?foo=bar'

$request->query->get('foo');
// returns bar
// returns 'bar'

$request->query->get('bar');
// returns null

$request->query->get('bar', 'bar');
// returns 'bar'
$request->query->get('bar', 'baz');
// returns 'baz'

When PHP imports the request query, it handles request parameters like
``foo[bar]=bar`` in a special way as it creates an array. So you can get the
``foo`` parameter and you will get back an array with a ``bar`` element::

// the query string is '?foo[bar]=bar'
// the query string is '?foo[bar]=baz'

$request->query->get('foo');
// returns array('bar' => 'bar')
// returns array('bar' => 'baz')

$request->query->get('foo[bar]');
// returns null
// returns null

$request->query->get('foo')['bar'];
// returns 'baz'

.. _component-foundation-attributes:

Expand Down Expand Up @@ -500,7 +503,8 @@ if it should::

BinaryFileResponse::trustXSendfileTypeHeader();

You can still set the ``Content-Type`` of the sent file, or change its ``Content-Disposition``::
With the ``BinaryFileResponse``, you can still set the ``Content-Type`` of the sent file,
or change its ``Content-Disposition``::

$response->headers->set('Content-Type', 'text/plain');
$response->setContentDisposition(
Expand Down
5 changes: 5 additions & 0 deletions components/var_dumper/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ You can install the component in 2 different ways:
* :doc:`Install it via Composer </components/using_components>` (``symfony/var-dumper`` on `Packagist`_);
* Use the official Git repository (https://github.com/symfony/var-dumper).

.. note::

If using it inside a Symfony application, make sure that the
DebugBundle is enabled in your ``app/AppKernel.php`` file.

.. _components-var-dumper-dump:

The dump() Function
Expand Down
2 changes: 1 addition & 1 deletion components/yaml/yaml_format.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ can use double quotes, for these characters it is more convenient to use single
quotes, which avoids having to escape any backslash ``\``:

* ``:``, ``{``, ``}``, ``[``, ``]``, ``,``, ``&``, ``*``, ``#``, ``?``, ``|``,
``-``, ``<``, ``>``, ``=``, ``!``, ``%``, ``@``, ``\```
``-``, ``<``, ``>``, ``=``, ``!``, ``%``, ``@``, `````

The double-quoted style provides a way to express arbitrary strings, by
using ``\`` to escape characters and sequences. For instance, it is very useful
Expand Down
1 change: 0 additions & 1 deletion contributing/code/bc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,6 @@ Change return type No
Add private method Yes
Remove private method Yes
Change name Yes
Reduce visibility Yes
Add argument without a default value Yes
Add argument with a default value Yes
Remove argument Yes
Expand Down
47 changes: 4 additions & 43 deletions contributing/code/patches.rst
Original file line number Diff line number Diff line change
Expand Up @@ -272,49 +272,10 @@ pull request message, like in:
[Yaml] fixed something
[Form] [Validator] [FrameworkBundle] added something
The pull request description must include the following checklist at the top
to ensure that contributions may be reviewed without needless feedback
loops and that your contributions can be included into Symfony as quickly as
possible:

.. code-block:: text
| Q | A
| ------------- | ---
| Bug fix? | [yes|no]
| New feature? | [yes|no]
| BC breaks? | [yes|no]
| Deprecations? | [yes|no]
| Tests pass? | [yes|no]
| Fixed tickets | [comma separated list of tickets fixed by the PR]
| License | MIT
| Doc PR | [The reference to the documentation PR if any]
An example submission could now look as follows:

.. code-block:: text
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #12, #43
| License | MIT
| Doc PR | symfony/symfony-docs#123
The whole table must be included (do **not** remove lines that you think are
not relevant). For simple typos, minor changes in the PHPDocs, or changes in
translation files, use the shorter version of the check-list:

.. code-block:: text
| Q | A
| ------------- | ---
| Fixed tickets | [comma separated list of tickets fixed by the PR]
| License | MIT
The default pull request description contains a table which you must fill in
with the appropriate answers. This ensures that contributions may be reviewed
without needless feedback loops and that your contributions can be included into
Symfony as quickly as possible.

Some answers to the questions trigger some more requirements:

Expand Down
27 changes: 13 additions & 14 deletions contributing/community/releases.rst
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,19 @@ Below is the schedule for the first few versions that use this release model:
* **Blue** represents the Stabilization phase
* **Green** represents the Maintenance period

This results in very predictable dates and maintenance periods:
.. tip::

If you want to learn more about the timeline of any given Symfony version,
use the online `timeline calculator`_.

.. tip::

Whenever an important event related to Symfony versions happens (a version
reaches end of maintenance or a new patch version is released for
instance), you can automatically receive an email notification if you
subscribed on the `roadmap notification`_ page.

.. _version-history:

======= ============== ======= ======================== ===========
Version Feature Freeze Release End of Maintenance End of Life
Expand Down Expand Up @@ -123,19 +135,6 @@ Version Feature Freeze Release End of Maintenance End of Life
.. [2] Symfony 2.8 is the last version of the Symfony 2.x branch.
.. [3] Symfony 3.0 is the first version to use the new release process based on five minor releases.
.. tip::

If you want to learn more about the timeline of any given Symfony version,
use the online `timeline calculator`_. You can also get all data as a JSON
string via a URL like `https://symfony.com/roadmap.json?version=2.x`.

.. tip::

Whenever an important event related to Symfony versions happens (a version
reaches end of maintenance or a new patch version is released for
instance), you can automatically receive an email notification if you
subscribed on the `roadmap notification`_ page.

Backwards Compatibility
-----------------------

Expand Down
2 changes: 1 addition & 1 deletion cookbook/assetic/php.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Organizing your Web Asset Files
-------------------------------

This example will include a setup using the Bootstrap CSS framework, jQuery, FontAwesome
and some regular CSS and and JavaScript application files (called ``main.css`` and
and some regular CSS and JavaScript application files (called ``main.css`` and
``main.js``). The recommended directory structure for this set-up looks like this:

.. code-block:: text
Expand Down
2 changes: 0 additions & 2 deletions cookbook/event_dispatcher/event_listener.rst
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,7 @@ listen to the same ``kernel.exception`` event::
namespace AppBundle\EventSubscriber;

use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent;
use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface;

class ExceptionSubscriber implements EventSubscriberInterface
{
Expand Down
4 changes: 2 additions & 2 deletions cookbook/form/create_custom_field_type.rst
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ link for details), create a ``gender_widget`` block to handle this:

.. code-block:: html+twig

{# app/Resources/views/Form/fields.html.twig #}
{# app/Resources/views/form/fields.html.twig #}
{% block gender_widget %}
{% spaceless %}
{% if expanded %}
Expand All @@ -130,7 +130,7 @@ link for details), create a ``gender_widget`` block to handle this:

.. code-block:: html+php

<!-- app/Resources/views/Form/gender_widget.html.php -->
<!-- app/Resources/views/form/gender_widget.html.php -->
<?php if ($expanded) : ?>
<ul <?php $view['form']->block($form, 'widget_container_attributes') ?>>
<?php foreach ($form as $child) : ?>
Expand Down
2 changes: 1 addition & 1 deletion cookbook/form/create_form_type_extension.rst
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ Generic Form Type Extensions

You can modify several form types at once by specifying their common parent
(:doc:`/reference/forms/types`). For example, several form types natively
available in Symfony inherit from the ``TextType`` form type (such as ``email``,
available in Symfony inherit from the ``TextType`` form type (such as ``EmailType``,
``SearchType``, ``UrlType``, etc.). A form type extension applying to ``TextType``
(i.e. whose ``getExtendedType`` method returns ``TextType::class``) would apply
to all of these form types.
Expand Down
2 changes: 2 additions & 0 deletions cookbook/form/unit_testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ make sure the ``FormRegistry`` uses the created instance::
{
// mock any dependencies
$this->entityManager = $this->getMock('Doctrine\Common\Persistence\ObjectManager');

parent::setUp();
}

protected function getExtensions()
Expand Down
2 changes: 1 addition & 1 deletion cookbook/security/impersonating_user.rst
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ how to change the sticky locale:

.. code-block:: php
// src/AppBundle/EventListener/SwitchUserListener.pnp
// src/AppBundle/EventListener/SwitchUserListener.php
namespace AppBundle\EventListener;
use Symfony\Component\Security\Http\Event\SwitchUserEvent;
Expand Down
2 changes: 1 addition & 1 deletion reference/constraints/Image.rst
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ that it is between a certain size, add the following:
.. code-block:: yaml
# src/AppBundle/Resources/config/validation.yml
AppBundle\Entity\Author
AppBundle\Entity\Author:
properties:
headshot:
- Image:
Expand Down
6 changes: 3 additions & 3 deletions reference/constraints/Isbn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ on an object that will contain an ISBN.
{
/**
* @Assert\Isbn(
* type = isbn10,
* message: This value is not valid.
* type = "isbn10",
* message = "This value is not valid."
* )
*/
protected $isbn;
Expand Down Expand Up @@ -89,7 +89,7 @@ on an object that will contain an ISBN.
public static function loadValidatorMetadata(ClassMetadata $metadata)
{
$metadata->addPropertyConstraint('isbn', new Assert\Isbn(array(
'type' => isbn10,
'type' => 'isbn10',
'message' => 'This value is not valid.'
)));
}
Expand Down

0 comments on commit 8deb817

Please sign in to comment.