Commit Graph

137 Commits

Author SHA1 Message Date
Fabien Potencier e91ca34ead updated UPDATE file 2011-07-22 17:45:02 +02:00
Fabien Potencier aab0bf7e2c merged branch schmittjoh/httpUtilFixes (PR #1739)
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:
> https://github.com/symfony/symfony/pull/1739#issuecomment-1613504
>

---------------------------------------------------------------------------

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.
2011-07-22 14:45:54 +02:00
Fabien Potencier 61f02902fe added missing information in UPDATE file 2011-07-21 20:44:42 +02:00
Fabien Potencier db9a37530e udpated UPDATE file 2011-07-21 19:28:44 +02:00
Johannes Schmitt f300edebe4 fixes several bugs 2011-07-19 16:21:58 +02:00
Fabien Potencier 760b11cbeb fixed UPDATE file markup 2011-07-16 18:33:57 +02:00
Johannes Schmitt 8cfca155a6 added change to upgrade file 2011-07-15 18:03:17 +02:00
Fabien Potencier b6563afae7 fixed typo 2011-07-13 18:26:19 +02:00
Fabien Potencier 0883fed86c tweaked UPDATE file 2011-07-13 16:41:38 +02:00
Fabien Potencier 4004b4411e merged branch francisbesset/httpfoundation_responseheaderbag (PR #1640)
Commits
-------

64e9263 Updated UPDATE.md
7cf891a Renamed variable returned and used self in place of static for constants
f91f4dd Added the possibility to set cookies with the same name for different domains and paths for Symfony\Component\HttpFoundation\ResponseHeaderBag
f08eeb4 Moved managing cookies of HeaderBag in ResponseHeaderBag

Discussion
----------

[HttpFoundation] Cookies management in ResponseHeaderBag

Fixed cookies management in `Symfony\Component\HttpFoundation\HeaderBag` and `Symfony\Component\HttpFoundation\ResponseHeaderBag`
2011-07-13 16:37:40 +02:00
Francis Besset 64e92633aa Updated UPDATE.md 2011-07-13 16:27:26 +02:00
marc.weistroff 66c698aa8c Updated update.md 2011-07-13 10:16:54 +02:00
Tim Nagel d736da6420 Fixed styling for getName() BC note 2011-07-08 00:15:34 -07:00
Fabien Potencier 498f72ce9c merged branch stof/monolog (PR #1556)
Commits
-------

f8b5f35 [MonologBundle] Refactored the way to configure the email prototype for swiftmailer
874fb95 [MonologBundle] Refactored the configuration of processors

Discussion
----------

Monolog

This refactors the way processors and email prototype are configured in MonologBundle for consistency with the other bundles. The hack using ``@id`` to use a service in the semantic configuration is not used anywhere else in Symfony2.
This removes the ability to use a static callback as processor (or a PHP function) but adds the support of adding a processor only for a given logging channel (for processors attached to the logger) which was not possible previously.

---------------------------------------------------------------------------

by stof at 2011/07/06 07:33:52 -0700

the PR for the doc and the standard edition are coming.
2011-07-06 17:49:40 +02:00
Fabien Potencier 722ad12a2d renamed proxy setting to trust_proxy_headers 2011-07-06 17:42:58 +02:00
Christophe Coevoet f8b5f350dc [MonologBundle] Refactored the way to configure the email prototype for swiftmailer 2011-07-06 16:25:32 +02:00
Christophe Coevoet 874fb9540a [MonologBundle] Refactored the configuration of processors 2011-07-06 15:52:04 +02:00
Fabien Potencier befb234e5c merged branch stof/form_type (PR #1552)
Commits
-------

ef022c0 Removed the magical guessing of the type name to avoid WTF issues

Discussion
----------

Removed the magical guessing of the type name to avoid WTF issues

As discussed on IRC, this removes the magical method to avoid breaking the user-land code by reusing the same name than another type which overrides it. This makes the user aware that a type should have a name as they now have to implement the method themselves.

---------------------------------------------------------------------------

by jalliot at 2011/07/06 05:35:30 -0700

Doc and generator should be modified as well if it's merged.
2011-07-06 15:36:48 +02:00
Fabien Potencier 47da6cf39e [Form] removed guesser for Choice constraints
The guesser has been removed as the constraints only knows
about the valid keys. But to be able to create the Type automatically,
we also need the values.
2011-07-06 14:36:20 +02:00
Christophe Coevoet ef022c0c6c Removed the magical guessing of the type name to avoid WTF issues 2011-07-06 14:20:59 +02:00
Fabien Potencier 932cd10477 made HTTP headers coming from proxies non-trusted by default 2011-07-05 19:49:36 +02:00
Fabien Potencier b93dd7a36b tweaked UPDATE file 2011-07-04 11:28:51 +02:00
Benjamin Eberlei c86720949f Adjust UPDATE.md to Annotation changes 2011-07-03 16:50:08 +02:00
Johannes Schmitt ee22c5d767 added a note to update file 2011-06-30 12:10:16 +02:00
Fabien Potencier 5f6a4a6d21 tweaked UPDATE file 2011-06-24 14:29:45 +02:00
Fabien Potencier 5a8c9f3a0b removed unneeded info in UPDATE file 2011-06-24 14:28:05 +02:00
Joseph Bielawski e993c87b08 Added info about Form and Validator component changes. 2011-06-24 02:29:28 -07:00
Jordi Boggiano 58b640376b Adjusted UPDATE 2011-06-21 17:18:34 +02:00
Jordi Boggiano 7350109f6e Renamed core.* events to kernel.* and CoreEvents to KernelEvents 2011-06-21 16:35:14 +02:00
Jordi Boggiano edbdf7b154 Rename kernel.listener to kernel.event_listener
Better consistency with doctrine.event_listener
2011-06-21 16:35:12 +02:00
Fabien Potencier 25e99e894b renamed Command to ContainerAwareCommand 2011-06-20 21:04:55 +02:00
Fabien Potencier 7e40b63bdc updated UPDATE file 2011-06-17 18:20:15 +02:00
Fabien Potencier 627a7f7cd4 [TwigBridge] renamed some block names to avoid collisions 2011-06-17 08:39:56 +02:00
Fabien Potencier fa9b920051 [Security] renamed UserProviderInterface::loadUser() to refreshUser() 2011-06-16 18:00:36 +02:00
Fabien Potencier adb9aaf47d merged branch kriswallsmith/kernel/static-test-methods (PR #1291)
Commits
-------

5b0f1da [HttpKernel] made WebTestCase methods static

Discussion
----------

[HttpKernel] made WebTestCase methods static

This makes it possible to load fixture data in `::setUpBeforeClass()` which makes tests run much faster.

Also, `createClient()` is not protected instead of public; I'm not sure why it was public in the first place.
2011-06-16 16:33:42 +02:00
Fabien Potencier a7974ff43c renamed Form Twig templates to be more explicit 2011-06-16 15:20:12 +02:00
Fabien Potencier bd77bc832c updated UPDATE file 2011-06-16 07:44:10 +02:00
Fabien Potencier c5223bbcd1 merged branch vicb/file (PR #1317)
Commits
-------

9d6357c [HttpFoundation] Document the changes to the File classes
136b80a [HttFoundation] Add File::getExtension() as \SplFileInfo::getExtension() was introduced in PHP 5.3.6
38b3b74 [HttpKernel] Fix and test previous commit
ac0c00c [HttpFoundation] Make File extends \SplFileInfo

Discussion
----------

[HttpFoundation] Make File extends \SplFileInfo

This is a rebased version of [PR 674](https://github.com/symfony/symfony/pull/674).

  * File: The API has changed (now extends \SplFileInfo),
  * File: move() creates the target directory when it does not exist
  * UploadedFile: introduction of getClientXXX() methods (for Size, OriginalName, MimeType)

If this PR does not get merged UploadedFile should at least be fixed: [Client.php](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpKernel/Client.php#L124) relies on a last parameter which is no more defined and which is used to bypass [move_uploaded_file()](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpFoundation/File/UploadedFile.php#L155) in test mode.

If this could be merged, I'll detail the changes in UPDATE.md

---------------------------------------------------------------------------

by fabpot at 2011/06/14 08:20:59 -0700

I'll merge it. Can you update the UPDATE file?

---------------------------------------------------------------------------

by vicb at 2011/06/14 09:24:01 -0700

done
2011-06-15 08:57:16 +02:00
Victor Berchet 9d6357c35b [HttpFoundation] Document the changes to the File classes 2011-06-14 18:21:04 +02:00
Fabien Potencier 06614cd6ca [Yaml] moved exceptions to their own sub-namespace (added a specific exception for the dump) 2011-06-14 16:25:26 +02:00
Fabien Potencier 3859589daa [Yaml] renamed load() to parse() 2011-06-14 16:25:25 +02:00
Fabien Potencier d16a708cc8 [Form] simplified file type class
File uploads documentation is here:

https://github.com/symfony/symfony-docs/pull/400
2011-06-13 18:11:18 +02:00
Kris Wallsmith 5b0f1da074 [HttpKernel] made WebTestCase methods static 2011-06-11 08:50:27 -07:00
Fabien Potencier 96045739b1 [TwigBundle] removed the extensions setting 2011-06-11 07:50:14 +02:00
Christophe Coevoet 5458baf465 [MonologBundle] Changed the default bubbling behavior. Fixes #1268 2011-06-10 19:44:10 +02:00
Lukas Kahwe Smith b7c615d869 clarified that BC is broken in the Serializer component 2011-06-10 15:04:57 +02:00
Lukas Kahwe Smith 77fd5805e1 added UPDATE notes for Serializer component changes 2011-06-10 01:13:38 +02:00
Fabien Potencier 852a4c9c6a [Form] removed the file upload temporary storage feature
The current implementation is not ready for inclusion in 2.0. It has several
known problems (security, not possible to disable it, not "cloud-compatible",
...) and it's not a must have feature anyway.

Some references:

 * Security issue in FileType: https://github.com/symfony/symfony/issues/1001
 * Validation fails on file, still stored in TemporaryStorage: https://github.com/symfony/symfony/issues/908
 * Add a size argument & ability to configure TemporaryStorage: https://github.com/symfony/symfony/pull/748

This feature should be reworked and discussed for inclusion in 2.1.
2011-06-09 12:44:36 +02:00
Fabien Potencier 1e8cd6d34d [HttpFoundation] removed the leading . for extensions 2011-06-09 12:42:42 +02:00
Fabien Potencier fbf36957e6 refactored Doctrine Bridge
* added a RegistryInterface

 * changed all classes to depend on the Registry instead of a specific EntityManager

This is more consistent as the validator already took the registry and this allows
to use any entity manager in Forms.
2011-06-08 08:35:48 +02:00