8000 Merge branch '2.4' into 2.5 · symfony/symfony-docs@b8481d8 · GitHub
[go: up one dir, main page]

Skip to content

Commit b8481d8

Browse files
committed
Merge branch '2.4' into 2.5
* 2.4: Updated styling of my edit Update inherit_data_option.rst Fixed typo on tag service Fixed typo in filesystem component Fixed typo in the yml validation usage of a non-default entity manager in an entity user provider Added the missing title for a reference Fixed (again) a minor typo: Toolbet --> Toolbelt Reworded bundle requirement Minor rewording and fixed one reference Fixed a wrong documentation reference (thanks @wouterj) Added a note about permissions in the Quick Tour fix parent form types
2 parents 61434a8 + 8ead0b7 commit b8481d8

File tree

9 files changed

+95
-13
lines changed
  • security
  • quick_tour
  • reference
  • 9 files changed

    +95
    -13
    lines changed

    book/forms.rst

    Lines changed: 5 additions & 4 deletions
    Original file line numberDiff line numberDiff line change
    @@ -1125,11 +1125,12 @@ easy to use in your application.
    11251125
    <container xmlns="http://symfony.com/schema/dic/services"
    11261126
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    11271127
    xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd>
    1128-
    1129-
    <service id="acme_demo.form.type.task"
    1128+
    <services>
    1129+
    <service id="acme_demo.form.type.task"
    11301130
    class="Acme\TaskBundle\Form\Type\TaskType">
    1131-
    <tag name="form.type" alias="task" />
    1132-
    </service>
    1131+
    <tag name="form.type" alias="task" />
    1132+
    </service>
    1133+
    </services>
    11331134
    </container>
    11341135
    11351136
    .. code-block:: php

    components/filesystem.rst

    Lines changed: 1 addition & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -211,7 +211,7 @@ the relative path of a directory given another one::
    211211
    '/var/lib/symfony/src/Symfony/',
    212212
    '/var/lib/symfony/src/Symfony/Component'
    213213
    );
    214-
    // returns 'videos'
    214+
    // returns 'videos/'
    215215
    $fs->makePathRelative('/tmp/videos', '/tmp')
    216216

    217217
    mirror

    cookbook/deployment/heroku.rst

    Lines changed: 3 additions & 3 deletions
    Original file line numberDiff line numberDiff line change
    @@ -12,7 +12,7 @@ Setting up
    1212
    ----------
    1313

    1414
    To setup a new Heroku website, first `signup with Heroku`_ or sign in
    15-
    with your credentials. Then download and install the `Heroku Toolbet`_ on your
    15+
    with your credentials. Then download and install the `Heroku Toolbelt`_ on your
    1616
    local computer.
    1717

    1818
    You can also check out the `getting Started with PHP on Heroku`_ guide to gain
    @@ -188,8 +188,8 @@ You should be seeing your Symfony2 application in your browser.
    188188

    189189
    .. _`the original article`: https://devcenter.heroku.com/articles/getting-started-with-symfony2
    190190
    .. _`signup with Heroku`: https://signup.heroku.com/signup/dc
    191-
    .. _`Heroku Toolbet`: https://devcenter.heroku.com/articles/getting-started-with-php#local-workstation-setup
    192-
    .. _`getting Started with PHP on Heroku`: .. _`Heroku Toolbet`: https://devcenter.heroku.com/articles/getting-started-with-php
    191+
    .. _`Heroku Toolbelt`: https://devcenter.heroku.com/articles/getting-started-with-php#local-workstation-setup
    192+
    .. _`getting Started with PHP on Heroku`: https://devcenter.heroku.com/articles/getting-started-with-php
    193193
    .. _`ephemeral file system`: https://devcenter.heroku.com/articles/dynos#ephemeral-filesystem
    194194
    .. _`Logplex`: https://devcenter.heroku.com/articles/logplex
    195195
    .. _`verified that the RSA key fingerprint is correct`: https://devcenter.heroku.com/articles/git-repository-ssh-fingerprints

    cookbook/form/inherit_data_option.rst

    Lines changed: 4 additions & 0 deletions
    Original file line numberDiff line numberDiff line change
    @@ -154,3 +154,7 @@ Finally, make this work by adding the location form to your two original forms::
    154154
    155155
    That's it! You have extracted duplicated field definitions to a separate
    156156
    location form that you can reuse wherever you need it.
    157+
    158+
    .. caution::
    159+
    160+
    Forms with the ``inherit_data`` option set cannot have ``*_SET_DATA`` event listeners.

    cookbook/security/entity_provider.rst

    Lines changed: 71 additions & 2 deletions
    Original file line numberDiff line numberDiff line change
    @@ -25,8 +25,14 @@ Finally, the tutorial will demonstrate how to create a custom
    2525
    :class:`Symfony\\Bridge\\Doctrine\\Security\\User\\EntityUserProvider` object to
    2626
    retrieve users from a database with custom conditions.
    2727

    28-
    This tutorial assumes there is a bootstrapped and loaded
    29-
    ``Acme\UserBundle`` bundle in the application kernel.
    28+
    .. sidebar:: Code along with the Example
    29+
    30+
    If you want to follow along with the example in this chapter, create
    31+
    an AcmeUserBundle via:
    32+
    33+
    .. code-block:: bash
    34+
    35+
    $ php app/console generate:bundle --namespace=Acme/UserBundle
    3036
    3137
    The Data Model
    3238
    --------------
    @@ -358,6 +364,69 @@ entity user provider to load User entity objects from the database by using
    358364
    the ``username`` unique field. In other words, this tells Symfony how to
    359365
    fetch the user from the database before checking the password validity.
    360366

    367+
    .. note::
    368+
    369+
    By default, the entity provider uses the default entity manager to fetch
    370+
    user information from the database. If you,
    371+
    :doc:`use multiple entity managers </cookbook/doctrine/multiple_entity_managers>`,
    372+
    you can specify which manager to use with the ``manager_name`` option:
    373+
    374+
    .. configuration-block::
    375+
    376+
    .. code-block:: yaml
    377+
    378+
    # app/config/config.yml
    379+
    security:
    380+
    # ...
    381+
    382+
    providers:
    383+
    administrators:
    384+
    entity:
    385+
    class: AcmeUserBundle:User
    386+
    property: username
    387+
    manager_name: customer
    388+
    389+
    # ...
    390+
    391+
    .. code-block:: xml
    392+
    393+
    <!-- app/config/config.xml -->
    394+
    <?xml version="1.0" encoding="UTF-8"?>
    395+
    <srv:container xmlns="http://symfony.com/schema/dic/security"
    396+
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    397+
    xmlns:srv="http://symfony.com/schema/dic/services"
    398+
    xsi:schemaLocation="http://symfony.com/schema/dic/services
    399+
    http://symfony.com/schema/dic/services/services-1.0.xsd">
    400+
    <config>
    401+
    <!-- ... -->
    402+
    403+
    <provider name="administrators">
    404+
    <entity class="AcmeUserBundle:User"
    405+
    property="username"
    406+
    manager-name="customer" />
    407+
    </provider>
    408+
    409+
    <!-- ... -->
    410+
    </config>
    411+
    </srv:container>
    412+
    413+
    .. code-block:: php
    414+
    415+
    // app/config/config.php
    416+
    $container->loadFromExtension('security', array(
    417+
    // ...
    418+
    'providers' => array(
    419+
    'administrator' => array(
    420+
    'entity' => array(
    421+
    'class' => 'AcmeUserBundle:User',
    422+
    'property' => 'username',
    423+
    'manager_name' => 'customer',
    424+
    ),
    425+
    ),
    426+
    ),
    427+
    // ...
    428+
    ));
    429+
    361430
    Forbid inactive Users
    362431
    ---------------------
    363432

    quick_tour/the_big_picture.rst

    Lines changed: 8 additions & 0 deletions
    Original file line numberDiff line numberDiff line change
    @@ -105,6 +105,14 @@ main concepts. Go to the following URL to be greeted by Symfony2 (replace
    105105
    .. image:: /images/quick_tour/hello_fabien.png
    106106
    :align: center
    107107

    108+
    .. note::
    109+
    110+
    Instead of the greeting page, you may see a blank page or an error page.
    111+
    This is caused by a directory permission misconfiguration. There are several
    112+
    possible solutions depending on your operating system. All of them are
    113+
    explained in the :ref:`Setting up Permissions <book-installation-permissions>`
    114+
    section of the official book.
    115+
    108116
    What's going on here? Have a look at each part of the URL:
    109117

    110118
    * ``app_dev.php``: This is a :term:`front controller`. It is the unique entry

    reference/constraints/Valid.rst

    Lines changed: 1 addition & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -194,7 +194,7 @@ property.
    194194
    .. code-block:: yaml
    195195
    196196
    # src/Acme/HelloBundle/Resources/config/validation.yml
    197-
    Acme\HelloBundle\Author:
    197+
    Acme\HelloBundle\Entity\Author:
    198198
    properties:
    199199
    address:
    200200
    - Valid: ~

    reference/forms/types/email.rst

    Lines changed: 1 addition & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -23,7 +23,7 @@ The ``email`` field is a text field that is rendered using the HTML5
    2323
    | | - `error_mapping`_ |
    2424
    | | - `mapped`_ |
    2525
    +-------------+---------------------------------------------------------------------+
    26-
    | Parent type | :doc:`form </reference/forms/types/form>` |
    26+
    | Parent type | :doc:`text </reference/forms/types/text>` |
    2727
    +-------------+---------------------------------------------------------------------+
    2828
    | Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\EmailType` |
    2929
    +-------------+---------------------------------------------------------------------+

    reference/forms/types/textarea.rst

    Lines changed: 1 addition & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -22,7 +22,7 @@ Renders a ``textarea`` HTML element.
    2222
    | | - `error_mapping`_ |
    2323
    | | - `mapped`_ |
    2424
    +-------------+------------------------------------------------------------------------+
    25-
    | Parent type | :doc:`form </reference/forms/types/form>` |
    25+
    | Parent type | :doc:`text </reference/forms/types/text>` |
    2626
    +-------------+------------------------------------------------------------------------+
    2727
    | Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\TextareaType` |
    2828
    +-------------+------------------------------------------------------------------------+

    0 commit comments

    Comments
     (0)
    0