Skip to content
Commits on Apr 28, 2016
  1. @fabpot

    Merge branch '3.0'

    fabpot committed Apr 28, 2016
    * 3.0:
      [Form] Fix tests added in #18180
  2. @fabpot

    minor #18663 [Form] Fix tests added in #18180 (HeahDude)

    fabpot committed Apr 28, 2016
    This PR was submitted for the master branch but it was merged into the 3.0 branch instead (closes #18663).
    
    Discussion
    ----------
    
    [Form] Fix tests added in #18180
    
    | Q             | A
    | ------------- | ---
    | Branch?       | 3.0+
    | Bug fix?      | no
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | ~
    | License       | MIT
    | Doc PR        | ~
    
    Commits
    -------
    
    c45a435 [Form] Fix tests added in #18180
  3. @HeahDude @fabpot

    [Form] Fix tests added in #18180

    HeahDude committed with fabpot Apr 28, 2016
  4. @fabpot

    feature #18656 Updating the error message of an AuthenticationEntryPo…

    fabpot committed Apr 28, 2016
    …intInterface (weaverryan)
    
    This PR was merged into the 3.1-dev branch.
    
    Discussion
    ----------
    
    Updating the error message of an AuthenticationEntryPointInterface
    
    | Q             | A
    | ------------- | ---
    | Branch?       | master
    | Bug fix?      | no
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | n/a
    | License       | MIT
    | Doc PR        | not necessary
    
    During a training, we forgot to fill in the `start()` method for an entry point and got a *horrible* error message. Now, if you mess up `start()`, you get:
    
    ![screen shot 2016-04-27 at 12 49 50 pm](https://cloud.githubusercontent.com/assets/121003/14860378/92578e68-0c76-11e6-9fe5-45141fe2ce43.png)
    
    Thanks!
    
    Commits
    -------
    
    7b6c56c Updating the error message of an AuthenticationEntryPointInterface returns a non-Response object
  5. @fabpot

    feature #18069 [DoctrineBridge] deprecate `MergeDoctrineCollectionLis…

    fabpot committed Apr 28, 2016
    …tener::onBind()` (HeahDude)
    
    This PR was merged into the 3.1-dev branch.
    
    Discussion
    ----------
    
    [DoctrineBridge] deprecate `MergeDoctrineCollectionListener::onBind()`
    
    | Q             | A
    | ------------- | ---
    | Branch        | master
    | Bug fix?      | no
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | yes
    | Tests pass?   | yes
    | Fixed tickets | n/a
    | License       | MIT
    | Doc PR        | -
    
    Commits
    -------
    
    ad08b95 [DoctrineBridge] deprecated `MergeDoctrineCollectionListener::onBind()`
  6. @fabpot

    bug #18659 [Cache] Dont use Redis connection when not required (nicol…

    fabpot committed Apr 28, 2016
    …as-grekas)
    
    This PR was merged into the 3.1-dev branch.
    
    Discussion
    ----------
    
    [Cache] Dont use Redis connection when not required
    
    | Q             | A
    | ------------- | ---
    | Branch?       | 3.1
    | Bug fix?      | yes
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | -
    | License       | MIT
    | Doc PR        | -
    
    Commits
    -------
    
    1165459 [Cache] Dont use Redis connection when not required
  7. @fabpot

    bug #18657 [FrameworkBundle] Fix a typo and add a test to prevent new…

    fabpot committed Apr 28, 2016
    … regressions (Ener-Getick)
    
    This PR was merged into the 3.1-dev branch.
    
    Discussion
    ----------
    
    [FrameworkBundle] Fix a typo and add a test to prevent new regressions
    
    | Q             | A
    | ------------- | ---
    | Branch?       | master
    | Bug fix?      | yes
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets |
    | License       | MIT
    | Doc PR        |
    
    This fixes a typo introduced in #18630 and adds a new functional test to avoid most regressions in service definitions in the future when features are only available in non-debug mode.
    
    cc @nicolas-grekas
    
    Commits
    -------
    
    61872ce Fix a typo and add a check to prevent regressions
  8. @fabpot

    minor #18575 Fixed a redundant check in DefaultValueResolver (iltar)

    fabpot committed Apr 28, 2016
    This PR was merged into the 3.1-dev branch.
    
    Discussion
    ----------
    
    Fixed a redundant check in DefaultValueResolver
    
    | Q             | A
    | ------------- | ---
    | Branch?       | master
    | Bug fix?      | no
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | ~
    | License       | MIT
    | Doc PR        | ~
    
    In #18308 I have introduced a `DefaultValueResolver`. When writing documentation, I was planning on adding the code as an example and I noticed it did a check in the request attributes. A default value value should always be injected, whether the request has it or not. In case the request _does_ have the value, it would've already been added and thus never reach the default resolver.
    
    Thus as this is never called in the default and configured flows and should not change the default value behavior, I'm removing this.
    
    Commits
    -------
    
    e54c1a6 Fixed a redundant check in DefaultValueResolver
  9. @fabpot

    feature #18492 [LDAP] Check whether an entry attribute exists (hiddewie)

    fabpot committed Apr 28, 2016
    This PR was merged into the 3.1-dev branch.
    
    Discussion
    ----------
    
    [LDAP] Check whether an entry attribute exists
    
    | Q             | A
    | ------------- | ---
    | Branch?       | master
    | Bug fix?      | no
    | New feature?  | yes
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets |
    | License       | MIT
    | Doc PR        |
    
    Currently a method exists for getting the value of an attribute. It would make the Entry class more complete to be able to simply test if an attribute exists in the entry.
    
    Commits
    -------
    
    56ef8a0 [LDAP] Check whether an entry attribute exists
  10. @fabpot

    fixed CS

    fabpot committed Apr 28, 2016
  11. @fabpot

    bug #18618 [HttpKernel] tweaked redirection profiling in RequestDataC…

    fabpot committed Apr 28, 2016
    …ollector (HeahDude)
    
    This PR was merged into the 3.1-dev branch.
    
    Discussion
    ----------
    
    [HttpKernel] tweaked redirection profiling in RequestDataCollector
    
    | Q             | A
    | ------------- | ---
    | Branch?       | master
    | Bug fix?      | yes
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | ~
    | License       | MIT
    | Doc PR        | ~
    
    - c8ba3b2 removes duplicated code forgotten in #17589
    
    - a47d2e8 fixes the collecting of redirect data in first sub request instead of redirected master request.
    
    Commits
    -------
    
    df19c14 use a request attribute flag for redirection profile
    b26cb6d [HttpKernel] added RequestDataCollector::onKernelResponse()
    c8ba3b2 [HttpKernel] remove legacy duplicated code
  12. @fabpot

    fixed CS

    fabpot committed Apr 28, 2016
  13. @HeahDude
  14. @fabpot

    bug #18566 [SecurityBundle] fixed DebugAccessDecisionManager config (…

    fabpot committed Apr 28, 2016
    …HeahDude)
    
    This PR was squashed before being merged into the 3.1-dev branch (closes #18566).
    
    Discussion
    ----------
    
    [SecurityBundle] fixed DebugAccessDecisionManager config
    
    | Q             | A
    | ------------- | ---
    | Branch?       | master
    | Bug fix?      | yes
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | #18554
    | License       | MIT
    | Doc PR        | ~
    
    Commits
    -------
    
    53c78fe [SecurityBundle] fixed DebugAccessDecisionManager config
  15. @HeahDude @fabpot
  16. @fabpot

    added a missing @group legacy

    fabpot committed Apr 28, 2016
  17. @fabpot

    fixed typos

    fabpot committed Apr 28, 2016
  18. @fabpot

    feature #18359 [Form] [DoctrineBridge] optimized LazyChoiceList and D…

    fabpot committed Apr 28, 2016
    …octrineChoiceLoader (HeahDude)
    
    This PR was merged into the 3.1-dev branch.
    
    Discussion
    ----------
    
    [Form] [DoctrineBridge] optimized LazyChoiceList and DoctrineChoiceLoader
    
    | Q             | A
    | ------------- | ---
    | Branch?       | master
    | Bug fix?      | no
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | yes
    | Tests pass?   | yes
    | Fixed tickets | ~
    | License       | MIT
    | Doc PR        | ~
    
    Problem
    ======
    Actually we got a circular dependency:
    
    | Object | Return
    |----------|-------------|
    |`DefaultChoiceListFactory::createListFromLoader()` (decorated) | `LazyChoiceList` with loader and resolved `$value`
    | `LazyChoiceList::get*` | `DoctrineChoiceLoader` with resolved `$value`
    `DoctrineChoiceLoader::loadChoiceList()` | (decorated) `DefaultChoiceListFactory` with loaded choices and resolved `$value`
    `DefaultChoiceListFactory::createListFromChoices()` | `ArrayChoiceList` with `resolved `$value`
    
    With this refactoring, the `DoctrineChoiceLoader` is no longer dependant to the factory, the `ChoiceLoaderInterface::loadChoiceList()` must return a `ChoiceListInterface` but should not need a decorated factory while `$value` is already resolved. It should remain lazy IMHO.
    
    Solution
    ======
    
    | Object | Return |
    |----------|-----------|
    | `DefaultChoiceListFactory::createListFromLoader()` | `LazyChoiceList` with loader and resolved `$value`
    | `LazyChoiceList::get*()` | `DoctrineChoiceLoader` with resolved `$value`
    | `DoctrineChoiceLoader::loadChoiceList()` | `ArrayChoiceList` with resolved `$value`.
    
    Since `choiceListFactory` is a private property, this change should be safe regarding BC.
    
    To justify this change, I've made some blackfire profiling.
    You can see my [branch of SE here](https://github.com/HeahDude/symfony-standard/tree/test/optimize-doctrine_choice_loader) and the [all in file test implementation](https://github.com/HeahDude/symfony-standard/blob/test/optimize-doctrine_choice_loader/src/AppBundle/Controller/DefaultController.php).
    
    Basically it loads a form with 3 `EntityType` fields with different classes holding 50 instances each.
    
    (INIT events are profiled with an empty cache)
    
    When | What | Diff (SE => PR)
    --------|-------|------
    INIT (1) | build form (load types) | [see](https://blackfire.io/profiles/compare/061d5d28-15c6-4e01-b8c0-3edc9cb8daf0/graph)
    INIT (2) | build view (load choices) | [see](https://blackfire.io/profiles/compare/04f142a8-d886-405a-be4d-636ba82d8acd/graph)
    CACHED | build form (load types) | [see](https://blackfire.io/profiles/compare/293b27b6-aa58-42ae-bafb-655513201505/graph)
    CACHED | build view (load choices) | [see](https://blackfire.io/profiles/compare/e5b37dfe-cc9e-498f-b98a-7448830ad190/graph)
    SUBMIT | build form (load types) | [see](https://blackfire.io/profiles/compare/7f3baea9-0d27-46b6-8c24-c577742382dc/graph)
    SUBMIT | handle request (load choices) | [see](https://blackfire.io/profiles/compare/8644ebfb-4397-495b-8f3d-1a6e1d7f8476/graph)
    SUBMIT | build view (load values) | [see](https://blackfire.io/profiles/compare/89c3cc7c-ea07-4300-91b3-99004cb58ea1/graph)
    
    (1):
    ![build_form-no_cache](https://cloud.githubusercontent.com/assets/10107633/14136166/b5a85eb8-f661-11e5-8556-3e0dcbfaf404.jpg)
    (2):
    ![build_view-no_cache](https://cloud.githubusercontent.com/assets/10107633/14136240/1162f3ee-f662-11e5-834a-1ed1e519dc83.jpg)
    
    It can seem like 1 and 2 balance each other but it comes clear when comparing values:
    
    | -  | Build form | Build view |
    |-----|---------|--------------|
    | wall time | -88 ms | +9.71 ms
    | blocking I/O | -40 ms | +3.67 ms
    | cpu | -48 ms | +13.4 ms
    | memory | -4.03 MB | +236 kB
    | network | -203 B | +2.21 kB
    
    Commits
    -------
    
    98621f4 [Form] optimized LazyChoiceList
    86b2ff1 [DoctrineBridge] optimized DoctrineChoiceLoader
  19. @fabpot

    Merge branch '3.0'

    fabpot committed Apr 28, 2016
    * 3.0:
      fixed bad merge
  20. @fabpot

    fixed bad merge

    fabpot committed Apr 28, 2016
  21. @fabpot

    feature #18357 [Form] Let `TextType` implement `DataTransformerInterf…

    fabpot committed Apr 28, 2016
    …ace` (HeahDude)
    
    This PR was merged into the 3.1-dev branch.
    
    Discussion
    ----------
    
    [Form] Let `TextType` implement `DataTransformerInterface`
    
    | Q             | A
    | ------------- | ---
    | Branch?       | master
    | Bug fix?      | yes
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | #5906
    | License       | MIT
    | Doc PR        | ~
    
    Commits
    -------
    
    7e97fbb [Form] let `TextType` implements `DataTransformerInterface`
  22. @fabpot

    Merge branch '3.0'

    fabpot committed Apr 28, 2016
    * 3.0:
      [Form] refactor CheckboxListMapper and RadioListMapper
      Revert "[Form] refactor `RadioListMapper::mapDataToForm()`"
  23. @fabpot

    Merge branch '2.8' into 3.0

    fabpot committed Apr 28, 2016
    * 2.8:
      [Form] refactor CheckboxListMapper and RadioListMapper
      Revert "[Form] refactor `RadioListMapper::mapDataToForm()`"
  24. @fabpot

    Merge branch '2.7' into 2.8

    fabpot committed Apr 28, 2016
    * 2.7:
      [Form] refactor CheckboxListMapper and RadioListMapper
      Revert "[Form] refactor `RadioListMapper::mapDataToForm()`"
  25. @fabpot

    bug #18180 [Form] fixed BC break with pre selection of choices with `…

    fabpot committed Apr 28, 2016
    …ChoiceType` and its children (HeahDude)
    
    This PR was merged into the 2.7 branch.
    
    Discussion
    ----------
    
    [Form] fixed BC break with pre selection of choices with `ChoiceType` and its children
    
    | Q             | A
    | ------------- | ---
    | Branch        | 2.7+
    | Bugfix?  | yes
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | #18173, #14712, #17789
    | License       | MIT
    | Doc PR        | -
    
    - f7eea72 reverts BC break introduced in #17760
    - 58e8ed0 fixes pre selection of choice with model values such as `false`, `null` or empty string without BC break.
    
    `ChoiceType` now always use `ChoiceToValueTransformer` or `ChoicesToValuesTransformer` depending on `multiple` option.
    Hence `CheckboxListMapper` and `RadioListMapper` don't handle the transformation anymore.
    
    Commits
    -------
    
    ea5375c [Form] refactor CheckboxListMapper and RadioListMapper
    71841c7 Revert "[Form] refactor `RadioListMapper::mapDataToForm()`"
  26. @fabpot

    Merge branch '3.0'

    fabpot committed Apr 28, 2016
    * 3.0:
      [Console] Fix wrong exceptions being thrown
      Add missing parenthesis in docblock description
      [FrameworkBundle] Remove duplicated code in ContainerDebugCommand
  27. @fabpot

    Merge branch '2.8' into 3.0

    fabpot committed Apr 28, 2016
    * 2.8:
      [Console] Fix wrong exceptions being thrown
      Add missing parenthesis in docblock description
      [FrameworkBundle] Remove duplicated code in ContainerDebugCommand
  28. @fabpot

    Merge branch '2.7' into 2.8

    fabpot committed Apr 28, 2016
    * 2.7:
      [FrameworkBundle] Remove duplicated code in ContainerDebugCommand
  29. @nicolas-grekas
Commits on Apr 27, 2016
  1. @Ener-Getick
  2. @weaverryan

    Updating the error message of an AuthenticationEntryPointInterface re…

    weaverryan committed Apr 27, 2016
    …turns a non-Response object
  3. @nicolas-grekas

    bug #18645 [Console] Fix wrong exceptions being thrown (JhonnyL)

    nicolas-grekas committed Apr 27, 2016
    This PR was merged into the 2.8 branch.
    
    Discussion
    ----------
    
    [Console] Fix wrong exceptions being thrown
    
    | Q             | A
    | ------------- | ---
    | Branch?       | 2.8
    | Bug fix?      | no
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | no
    | Fixed tickets |
    | License       | MIT
    | Doc PR        |
    
    Commits
    -------
    
    28fca7c [Console] Fix wrong exceptions being thrown
  4. @nicolas-grekas

    minor #18648 [FrameworkBundle] Minor UPGRADE files fix (nicolas-grekas)

    nicolas-grekas committed Apr 27, 2016
    This PR was merged into the 3.1-dev branch.
    
    Discussion
    ----------
    
    [FrameworkBundle] Minor UPGRADE files fix
    
    | Q             | A
    | ------------- | ---
    | Branch?       | 3.1
    | Bug fix?      | no
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | -
    | License       | MIT
    | Doc PR        | -
    
    Commits
    -------
    
    0de59f2 [FrameworkBundle] Minor UPGRADE files fix
  5. @nicolas-grekas
  6. @nicolas-grekas

    bug #18630 [FrameworkBundle][Serializer] Fix a deprecation triggered …

    nicolas-grekas committed Apr 27, 2016
    …by the ClassMetadataFactory (Ener-Getick)
    
    This PR was merged into the 3.1-dev branch.
    
    Discussion
    ----------
    
    [FrameworkBundle][Serializer] Fix a deprecation triggered by the ClassMetadataFactory
    
    | Q             | A
    | ------------- | ---
    | Branch?       | master
    | Bug fix?      | yes
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | yes
    | Tests pass?   | yes
    | Fixed tickets |
    | License       | MIT
    
    Without apparent reasons, [FOSRestBundle's tests fail](https://travis-ci.org/FriendsOfSymfony/FOSRestBundle/jobs/124384888) since #18561.
    ```
    Passing a Doctrine Cache instance as 2nd parameter of the "Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory" constructor is deprecated. This parameter will be removed in Symfony 4.0. Use the "Symfony\Component\Serializer\Mapping\Factory\CacheClassMetadataFactory" class instead: 6x
        1x in ErrorWithTemplatingFormatTest::testSerializeExceptionHtml from FOS\RestBundle\Tests\Functional
        1x in SerializerErrorTest::testSerializeExceptionJson from FOS\RestBundle\Tests\Functional
        1x in SerializerErrorTest::testSerializeExceptionJsonWithoutDebug from FOS\RestBundle\Tests\Functional
        1x in SerializerErrorTest::testSerializeExceptionXml from FOS\RestBundle\Tests\Functional
        1x in SerializerErrorTest::testSerializeInvalidFormJson from FOS\RestBundle\Tests\Functional
        1x in SerializerErrorTest::testSerializeInvalidFormXml from FOS\RestBundle\Tests\Functional
    ```
    We don't use cache in our tests but some of them are not in ``debug`` mode (will change soon) so the cache is automatically used.
    
    This PR fixes this deprecation by detecting if the cache used by the serializer is psr6 compliant or not (if it is, then it replaces the default metadata factory by an instance of the new class ``CacheClassMetadataFactory``, otherwise the second parameter of the ``ClassMetadataFactory`` is used).
    
    Commits
    -------
    
    15579d5 [FrameworkBundle] Deprecate framework.serializer.cache
    eccbffb [Serializer] Improve a deprecation message
    96e418a Revert "[FrameworkBundle] Fallback to default cache system in production for serializer"
Something went wrong with that request. Please try again.