Permalink
Commits on Jul 22, 2011
  1. updated VERSION to 2.0.0-RC5

    fabpot committed Jul 22, 2011
  2. merged branch ericclemmons/fix-router-generator-empty-query-string (PR

    fabpot committed Jul 22, 2011
    …#1773)
    
    Commits
    -------
    
    03c7cfe UrlGenerator no longer appends '?' if query string is empty
    
    Discussion
    ----------
    
    UrlGenerator no longer appends '?' if query string is empty
    
    If you generate a URL using null parameters (`array('foo' => null, 'bar' => null')`), `http_build_query` returns an empty string, resulting in a trailing `?` at the end of the generated URL.
    
    This fixes that so that, if there are `$extra` params & `http_build_query` is empty, the URL is no longer appended.
    
    ---------------------------------------------------------------------------
    
    by fabpot at 2011/07/22 10:15:26 -0700
    
    Can you add unit tests?
    
    ---------------------------------------------------------------------------
    
    by ericclemmons at 2011/07/22 10:52:21 -0700
    
    Yes sir, will do.
    
    -Eric Clemmons
     Sent from my iPad Nano
    
    On Jul 22, 2011, at 12:15 PM, fabpot<reply@reply.github.com> wrote:
    
    > Can you add unit tests?
    >
    > --
    > Reply to this email directly or view it on GitHub:
    > #1773 (comment)
    
    ---------------------------------------------------------------------------
    
    by ericclemmons at 2011/07/22 11:55:30 -0700
    
    **Added passing test.**
    
    Currently `master` fails test:
    
    ```
    1) Symfony\Tests\Component\Routing\Generator\UrlGeneratorTest::testUrlWithNullExtraParameters
    Failed asserting that two strings are equal.
    --- Expected
    +++ Actual
    @@ @@
    -http://localhost/app.php/testing
    +http://localhost/app.php/testing?
    
    //tests/Symfony/Tests/Component/Routing/Generator/UrlGeneratorTest.php:114
    ```
  3. [HttpKernel] changed the way compiled classes are managed to be sure …

    fabpot committed Jul 22, 2011
    …that they are included before the Kernel is booted
    
    If not, as classes can be loaded during the boot, there is no way to be sure that
    a class will not be already loaded by a third party bundle.
    
    If the Kernel is already booted, we don't included the compiled classes.
  4. updated UPDATE file

    fabpot committed Jul 22, 2011
  5. merged branch marcw/revert-1758 (PR #1769)

    fabpot committed Jul 22, 2011
    Commits
    -------
    
    d43d621 [Form] Reverted PR #1758.
    
    Discussion
    ----------
    
    [Form] Reverted PR #1758.
    
    Revert "[Form] CollectionType now checks for data_class parameter instead of only class."
    
    This reverts commit 2e024f8.
    
    Conflicts:
    
    	tests/Symfony/Tests/Component/Form/Extension/Core/Type/CollectionTypeTest.php
    
    Revert "[Form] Added ObjectFactoryListener. Fixes #1746."
    
    This reverts commit 0327beb.
    
    Conflicts:
    
    	tests/Symfony/Tests/Component/Form/Extension/Core/Type/CollectionTypeTest.php
  6. [Form] Reverted PR #1758.

    marc.weistroff committed Jul 22, 2011
    Revert "[Form] CollectionType now checks for data_class parameter instead of only class."
    
    This reverts commit 2e024f8.
    
    Conflicts:
    
    	tests/Symfony/Tests/Component/Form/Extension/Core/Type/CollectionTypeTest.php
    
    Revert "[Form] Added ObjectFactoryListener. Fixes #1746."
    
    This reverts commit 0327beb.
    
    Conflicts:
    
    	tests/Symfony/Tests/Component/Form/Extension/Core/Type/CollectionTypeTest.php
  7. merged branch schmittjoh/httpUtilFixes (PR #1739)

    fabpot committed Jul 22, 2011
    Commits
    -------
    
    eae6a77 fixed wrong case
    d0a175b fixes #1659
    f300ede fixes several bugs
    a4f05ac added some tests
    
    Discussion
    ----------
    
    Http util fixes
    
    Fixes several bugs in the http utils.
    
    Please don't add anymore features without sufficient tests. Especially for the Security\Http namespace, regressions are very likely otherwise.
    
    ---------------------------------------------------------------------------
    
    by fabpot at 2011/07/19 22:37:26 -0700
    
    Tests do not pass for me:
    
        There were 2 errors:
    
        1) Symfony\Bundle\SecurityBundle\Tests\Functional\LocalizedRoutesAsPathTest::testLoginLogoutProcedure with data set #0 ('en')
        InvalidArgumentException: The current node list is empty.
    
        .../src/Symfony/Component/DomCrawler/Crawler.php:604
        .../src/Symfony/Bundle/SecurityBundle/Tests/Functional/LocalizedRoutesAsPathTest.php:16
    
        2) Symfony\Bundle\SecurityBundle\Tests\Functional\LocalizedRoutesAsPathTest::testLoginLogoutProcedure with data set #1 ('de')
        InvalidArgumentException: The current node list is empty.
    
        .../src/Symfony/Component/DomCrawler/Crawler.php:604
        .../src/Symfony/Bundle/SecurityBundle/Tests/Functional/LocalizedRoutesAsPathTest.php:16
    
        --
    
        There were 4 failures:
    
        1) Symfony\Bundle\SecurityBundle\Tests\Functional\LocalizedRoutesAsPathTest::testAccessRestrictedResource with data set #0 ('en')
        Failed asserting that two strings are equal.
        --- Expected
        +++ Actual
        @@ @@
        -http://localhost/en/login
        +http://localhost/login
    
        .../src/Symfony/Bundle/Securitybundle/Tests/Functional/WebTestCase.php:22
        .../src/Symfony/Bundle/SecurityBundle/Tests/Functional/LocalizedRoutesAsPathTest.php:38
    
        2) Symfony\Bundle\SecurityBundle\Tests\Functional\LocalizedRoutesAsPathTest::testAccessRestrictedResource with data set #1 ('de')
        Failed asserting that two strings are equal.
        --- Expected
        +++ Actual
        @@ @@
        -http://localhost/de/login
        +http://localhost/login
    
        .../src/Symfony/Bundle/Securitybundle/Tests/Functional/WebTestCase.php:22
        .../src/Symfony/Bundle/SecurityBundle/Tests/Functional/LocalizedRoutesAsPathTest.php:38
    
        3) Symfony\Bundle\SecurityBundle\Tests\Functional\LocalizedRoutesAsPathTest::testAccessRestrictedResourceWithForward with data set #0 ('en')
        HTTP/1.0 302 Found
        Cache-Control:  no-cache
        Content-Length: 299
        Content-Type:   text/html; charset=UTF-8
        Date:           Wed, 20 Jul 2011 05:36:27 GMT
        Location:       http://localhost/login
        Set-Cookie: PHPSESSID=11c9c6a7e7620e13bddef223a5ba46d9; path=/; domain=
    
        <html>
            <head>
                <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
                <meta http-equiv="refresh" content="1;url=http://localhost/login" />
            </head>
            <body>
                Redirecting to <a href="http://localhost/login">http://localhost/login</a>.
            </body>
        </html>
        Failed asserting that <integer:0> matches expected <integer:1>.
    
        .../src/Symfony/Bundle/SecurityBundle/Tests/Functional/LocalizedRoutesAsPathTest.php:50
    
        4) Symfony\Bundle\SecurityBundle\Tests\Functional\LocalizedRoutesAsPathTest::testAccessRestrictedResourceWithForward with data set #1 ('de')
        HTTP/1.0 302 Found
        Cache-Control:  no-cache
        Content-Length: 299
        Content-Type:   text/html; charset=UTF-8
        Date:           Wed, 20 Jul 2011 05:36:28 GMT
        Location:       http://localhost/login
        Set-Cookie: PHPSESSID=2bbe63786a088471ade3717917f4ba4f; path=/; domain=
    
        <html>
            <head>
                <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
                <meta http-equiv="refresh" content="1;url=http://localhost/login" />
            </head>
            <body>
                Redirecting to <a href="http://localhost/login">http://localhost/login</a>.
            </body>
        </html>
        Failed asserting that <integer:0> matches expected <integer:1>.
    
        .../src/Symfony/Bundle/SecurityBundle/Tests/Functional/LocalizedRoutesAsPathTest.php:50
    
    ---------------------------------------------------------------------------
    
    by schmittjoh at 2011/07/19 23:47:29 -0700
    
    I fixed a wrong case, but I couldn't reproduce the other errors (tested on Ubuntu).
    
    My guess is that the temporary directory on your machine couldn't be deleted for some reason, and the test runs with the configuration of some of the previous tests.
    
    ---------------------------------------------------------------------------
    
    by fabpot at 2011/07/20 00:28:41 -0700
    
    That does not make any difference for me. For instance, in `LocalizedRoutesAsPathTest::testLoginLogoutProcedure()`, the first request to `'/'.$locale.'/login'` returns the following Response:
    
        <html>
            <head>
                <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
                <meta http-equiv="refresh" content="1;url=http://localhost/login" />
            </head>
            <body>
                Redirecting to <a href="http://localhost/login">http://localhost/login</a>.
            </body>
        </html>
    
    ---------------------------------------------------------------------------
    
    by schmittjoh at 2011/07/20 00:31:34 -0700
    
    That's weird, did you make sure that the temporary directory does not exist?
    
    ``rm -Rf /tmp/StandardFormLogin/``
    
    On Wed, Jul 20, 2011 at 9:28 AM, fabpot <
    reply@reply.github.com>wrote:
    
    > That does not make any difference for me. For instance, in
    > `LocalizedRoutesAsPathTest::testLoginLogoutProcedure()`, the first request
    > to `'/'.$locale.'/login'` returns the following Response:
    >
    >    <html>
    >        <head>
    >            <meta http-equiv="Content-Type" content="text/html;
    > charset=utf-8" />
    >            <meta http-equiv="refresh" content="1;url=
    > http://localhost/login" />
    >        </head>
    >        <body>
    >            Redirecting to <a href="http://localhost/login">
    > http://localhost/login</a>.
    >        </body>
    >    </html>
    >
    > --
    > Reply to this email directly or view it on GitHub:
    > #1739 (comment)
    >
    
    ---------------------------------------------------------------------------
    
    by fabpot at 2011/07/20 00:33:40 -0700
    
    Yes, I've just checked and the directory does not exist.
    
    ---------------------------------------------------------------------------
    
    by schmittjoh at 2011/07/20 00:39:55 -0700
    
    Sorry, I can't reproduce it on Ubuntu and unless someone wants to sponsor me a Mac, there is not much I can do.
  8. added missing ' escaping

    fabpot committed Jul 22, 2011
  9. [BrowserKit] changed Cookie::fromString() to not take the secure sett…

    fabpot committed Jul 22, 2011
    …ing into account if the URL is not present or is not HTTPS
  10. merged branch marcw/form-prototype-attribute (PR #1724)

    fabpot committed Jul 22, 2011
    Commits
    -------
    
    257f86c [Form] Collection's prototype is not not a child anymore.
    2b4cc9b [Form] Changed collection prototype rendering.
    
    Discussion
    ----------
    
    [Form] Changed collection prototype rendering
    
    Based on PR #1500. It is now rendered inside an attribute of collection
    tag.
    
    The data-attribute can be retrieved using this piece of jQuery code. You aways will need to adapt it. I think this will be also doable with plain JS.
    
    ```javascript
    <script type="text/javascript">
            jQuery('p.add-child').click(function() {
                var prototype = $('form #id').attr('data-prototype');
                prototype = prototype.replace(/\$\$name\$\$/g, 'levelxx');
                $('#id').append(prototype);
            });
    </script>
    ```
    
    Closes #1497
    
    ---------------------------------------------------------------------------
    
    by beberlei at 2011/07/18 06:40:40 -0700
    
    form div[data-prototype]? What about forms with two collections?
    
    ---------------------------------------------------------------------------
    
    by marcw at 2011/07/18 07:25:51 -0700
    
    My bad, the javascript snippet is not crystal clear. Actually, you'll have to specify the div's id to retrieve the right `data-prototype` attribute.
    The good way of doing this is by specifying the div's id in the selector (like in the 2nd part of the js example), like this :
    
        var prototype = $('form #level1_level2_level3_level3').attr('data-prototype');
    
    ---------------------------------------------------------------------------
    
    by tystr at 2011/07/18 12:32:39 -0700
    
    +1
    
    ---------------------------------------------------------------------------
    
    by marcw at 2011/07/22 01:46:08 -0700
    
    thanx @vicb ! :)
  11. [Form] Collection's prototype is not not a child anymore.

    marc.weistroff committed Jul 22, 2011
  12. [Form] Changed collection prototype rendering.

    marc.weistroff committed Jul 18, 2011
    Based on PR 1500. It is now rendered inside an attribute of collection
    tag.
  13. merged branch marcw/issue-1746 (PR #1758)

    fabpot committed Jul 22, 2011
    Commits
    -------
    
    2e024f8 [Form] CollectionType now checks for data_class parameter instead of only class.
    0327beb [Form] Added ObjectFactoryListener. Fixes #1746.
    
    Discussion
    ----------
    
    [Form] Added ObjectFactoryListener. Fixes #1746.
    
    ---------------------------------------------------------------------------
    
    by marcw at 2011/07/21 09:32:17 -0700
    
    This patch also fixes a validation issue because it was impossible for the validator to validate an array.
    
    ---------------------------------------------------------------------------
    
    by stof at 2011/07/21 09:47:46 -0700
    
    yeah, using the data_class of the prototype would be great
  14. [HttpKernel] enhanced the ExceptionHandler so that it can be used in …

    fabpot committed Jul 22, 2011
    …prod environment too (mainly useful for Silex)
Commits on Jul 21, 2011
  1. [HttpKernel] changed the compiled class cache to non-adaptative (as i…

    fabpot committed Jul 21, 2011
    …t is now loaded very early)
  2. Revert "merged branch trompette/patch-1 (PR #1761)"

    fabpot committed Jul 21, 2011
    This reverts commit 8e3b9c3, reversing
    changes made to 61f0290.
  3. merged branch andreia/master (PR #1760)

    fabpot committed Jul 21, 2011
    Commits
    -------
    
    350f207 Update the CSRF message
    
    Discussion
    ----------
    
    Update the CSRF message
    
    Update the CSRF message
  4. merged branch trompette/patch-1 (PR #1761)

    fabpot committed Jul 21, 2011
    Commits
    -------
    
    e2b249d fixed typo
    
    Discussion
    ----------
    
    fixed typo
  5. [Form] CollectionType now checks for data_class parameter instead of …

    marc.weistroff committed Jul 21, 2011
    …only class.
  6. udpated UPDATE file

    fabpot committed Jul 21, 2011