Commit Graph

6616 Commits

Author SHA1 Message Date
Christophe Coevoet
3ea31a0263 [TwigBridge] Made the locale configurable for the trans and transchoice filters 2011-07-26 01:25:25 +02:00
Gábor Egyed
987eb54199 [FrameworkBundle] updated hungarian validator messages 2011-07-26 00:55:17 +02:00
Joseph Bielawski
03bd20fafc FrameworkExtension - Remove unused variable 2011-07-25 05:33:12 -07:00
Fabien Potencier
1543ad159d updated CONTRIBUTORS with the latest info from Github 2011-07-25 11:55:58 +02:00
alexandresalome
ea916c3910 [HttpKernel] Coding convention for the file profiler storage 2011-07-25 10:51:35 +02:00
Fabien Potencier
321730d5aa merged branch schmittjoh/cookieFix (PR #1793)
Commits
-------

0b3ff39 fix supported cookie date formats

Discussion
----------

fix supported cookie date formats

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

by stof at 2011/07/24 13:16:25 -0700

👍 as the current behavior breaks the crawling of some sites using Goutte (``bit.ly`` for instance)
2011-07-25 09:30:05 +02:00
Fabien Potencier
c53c1692c2 added a CONTRIBUTORS file 2011-07-25 09:27:50 +02:00
Johannes Schmitt
0b3ff39704 fix supported cookie date formats 2011-07-24 21:28:31 +02:00
Wouter Van Hecke
7b24de512a Updated the code to follow the symfony coding standard using stof his remarks 2011-07-24 20:45:33 +02:00
Henrik Westphal
5219f81f35 Using the $status parameter instead of fixed value when creating a RedirectResponse. 2011-07-24 03:16:11 -07:00
alexandresalome
9ae2c8dc0f [HttpKernel] CS in file storage 2011-07-24 11:58:14 +02:00
alexandresalome
b415efd395 [HttpKernel] Add a test for semicolon in file storage test 2011-07-24 11:54:46 +02:00
alexandresalome
1c1215fdce [HttpKernel] Use subfolders for better storage in file storage of profiler 2011-07-24 11:52:27 +02:00
alexandresalome
4b1dc1f002 [HttpKernel] Fix the folder attribute of file storage to private 2011-07-24 11:32:23 +02:00
Fabien Potencier
858cce84d5 merged branch aboks/process_test_windows (PR #1783)
Commits
-------

0635548 [Process] Fixed tests on Windows by using escapeshellarg to escape argument

Discussion
----------

[Process] Changed tests to use escapeshellarg for escaping arguments

To make the `ProcessTest` work on Windows, the code to pass to `php` needs to be escaped using `escapeshellarg` rather than using hardcoded single quotes. Also, since `escapeshellarg` escapes double quotes incorrectly on Windows, I changed the quotes in the code-to-be-executed to single quotes only.

I have checked that the test still runs correctly on Unix (Ubuntu 10.04).
2011-07-24 09:50:51 +02:00
Fabien Potencier
874e001262 merged branch aboks/insulation_temp_dir (PR #1785)
Commits
-------

bd9af2b [BrowserKit] Fixed incorrect temp dir when running insulated functional tests under Windows

Discussion
----------

[BrowserKit] Fixed incorrect temp dir when running insulated functional tests in Windows

The `Client` class in the `BrowserKit`-component does not pass on a temporary directory environment variable recognized by Windows. This can lead to an incorrect temp dir being used when using an insulated `Client` in a functional test. A fix for Mac was already present, I extended this to also work on Windows.
2011-07-24 09:50:22 +02:00
sasezaki
266e60e7a2 Don't tell a lie to every WebServers 2011-07-24 14:01:26 +09:00
Wouter Van Hecke
fbcbddee09 - Fixed a small bug
- Updated some phpdoc
2011-07-24 00:35:06 +02:00
alexandresalome
70f73e1ebc [HttpKernel] Fix tests for the file storage of profiler 2011-07-23 23:35:13 +02:00
alexandresalome
d5313d9778 [HttpKernel] Add tests for the file profiler storage 2011-07-23 23:33:51 +02:00
alexandresalome
09fc0a2eeb [HttpKernel] Add Symfony credits to the file storage class for the profiler 2011-07-23 23:25:58 +02:00
alexandresalome
d1d5892ddf [HttpKernel] Finalize the file storage for the profiler 2011-07-23 23:17:26 +02:00
alexandresalome
2f65cf29bf Add POC for file storage system 2011-07-23 22:53:52 +02:00
Wouter Van Hecke
00fdfec860 Added a MongoDbProfilerStorage engine 2011-07-23 20:05:48 +02:00
Arnout Boks
0635548800 [Process] Fixed tests on Windows by using escapeshellarg to escape argument 2011-07-23 18:13:57 +02:00
Arnout Boks
bd9af2b0d0 [BrowserKit] Fixed incorrect temp dir when running insulated functional tests under Windows 2011-07-23 18:13:32 +02:00
Fabien Potencier
fe1f42f142 updated version back to dev 2011-07-23 17:20:56 +02:00
Fabien Potencier
39dd8aee47 updated VERSION to RC6 2011-07-23 17:15:58 +02:00
Fabien Potencier
169f1b57f1 [FrameworkBundle] added a note about why we cannot include Controller in the compiled classes 2011-07-23 16:40:25 +02:00
Fabien Potencier
d236fc3662 merged branch aboks/icu_version (PR #1776)
Commits
-------

86aeb04 [Form] Added skip for tests that require a higher version of the ICU library (needed by intl) than installed

Discussion
----------

[Form] Skip tests that are incompatible with the installed ICU (intl) library

Two tests for the `DateTimeToLocalizedStringTransformer` depend on a datetime-format that has only been added in version 3.8 of the ICU library (used by `intl`), see http://bugs.icu-project.org/trac/changeset/21815#file60. Some PHP-versions still ship with ICU 3.6 however.

This PR skips these tests when an incompatible version of the ICU library is detected. Unfortunately I had to copy-paste some code from `Symfony\Tests\Component\Locale\TestCase`, but I don't see any other way without creating a strange dependency between the tests for the Form and Locale components.

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

by Abhoryo at 2011/07/22 16:42:40 -0700

PHP 5.3.5 = ICU 3.6
PHP 5.3.6 = ICU 3.8
PHP 5.3.7rc4 = ICU 4.6

Since the RC3 of Symfony, config/check script recommends ICU 4.0+

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

by aboks at 2011/07/23 00:33:12 -0700

I noticed, but since it's not a hard requirement (and difficult for some people to install ICU 4.0+ at the moment) this PR would at least prevent false positives when people unable to upgrade run the test suite.
2011-07-23 16:15:26 +02:00
Fabien Potencier
9d3700427a merged branch aboks/console_test_decoration (PR #1774)
Commits
-------

04d0b6c [Console] Forced undecorated output in tests that rely on Application/Command-output being equal to a fixed value

Discussion
----------

[Console] Fixed tests that rely on undecorated Application/Command-output

Some tests compare the output of an `Application`/`Command` run to a fixed string. The output is decorated however (at least) when run on a Windows box with Ansicon installed.
This PR fixes these failing tests by forcing the `Application`/`Command`-output to be undecorated.
2011-07-23 16:13:19 +02:00
Fabien Potencier
64c89b1455 merged branch mazen/master (PR #1780)
Commits
-------

77802ef fixes #1779

Discussion
----------

fixes #1779
2011-07-23 16:05:47 +02:00
Marcel Beerta
77802efe4e fixes #1779 2011-07-23 07:02:50 -07:00
Arnout Boks
9d8e6f677e [FrameworkBundle] Changed TraceableEventDispatcher to log calls to event listeners _before_ actually calling them 2011-07-23 10:49:25 +02:00
Fabien Potencier
05c8178349 changed VERSION to -DEV again 2011-07-22 22:48:46 +02:00
Fabien Potencier
9fe6c74a27 updated VERSION to 2.0.0-RC5 2011-07-22 22:25:36 +02:00
Arnout Boks
1283c47f98 [HttpFoundation] Fixed incorrect test; MimeTypeGuesser should be (and is) able to detect a path that is not a file also without the 'fileinfo' extension 2011-07-22 22:19:09 +02:00
Fabien Potencier
edcdb4137f [HttpKernel] fixed possible double-classes in compiled classes 2011-07-22 22:17:31 +02:00
Arnout Boks
86aeb042a1 [Form] Added skip for tests that require a higher version of the ICU library (needed by intl) than installed 2011-07-22 22:16:48 +02:00
Fabien Potencier
18894762ee merged branch ericclemmons/fix-router-generator-empty-query-string (PR #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:
> https://github.com/symfony/symfony/pull/1773#issuecomment-1633515

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

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
```
2011-07-22 22:00:27 +02:00
Arnout Boks
04d0b6c821 [Console] Forced undecorated output in tests that rely on Application/Command-output being equal to a fixed value 2011-07-22 21:06:35 +02:00
Eric Clemmons
03c7cfed5e UrlGenerator no longer appends '?' if query string is empty 2011-07-22 11:53:54 -07:00
Fabien Potencier
eb7c86b7a8 [HttpKernel] removed the need to keep the compiled classes in the container 2011-07-22 19:10:59 +02:00
Fabien Potencier
e16c226a5c [HttpKernel] changed the way compiled classes are managed to be sure 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.
2011-07-22 18:52:34 +02:00
Fabien Potencier
e91ca34ead updated UPDATE file 2011-07-22 17:45:02 +02:00
Fabien Potencier
e9d82506f7 merged branch marcw/revert-1758 (PR #1769)
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 2e024f87a3.

Conflicts:

	tests/Symfony/Tests/Component/Form/Extension/Core/Type/CollectionTypeTest.php

Revert "[Form] Added ObjectFactoryListener. Fixes #1746."

This reverts commit 0327beb0b9.

Conflicts:

	tests/Symfony/Tests/Component/Form/Extension/Core/Type/CollectionTypeTest.php
2011-07-22 17:43:42 +02:00
Fabien Potencier
1cec45c421 [BrowserKit] fixed test insulation on Mac 2011-07-22 17:40:14 +02:00
marc.weistroff
d43d621829 [Form] Reverted PR #1758.
Revert "[Form] CollectionType now checks for data_class parameter instead of only class."

This reverts commit 2e024f87a3.

Conflicts:

	tests/Symfony/Tests/Component/Form/Extension/Core/Type/CollectionTypeTest.php

Revert "[Form] Added ObjectFactoryListener. Fixes #1746."

This reverts commit 0327beb0b9.

Conflicts:

	tests/Symfony/Tests/Component/Form/Extension/Core/Type/CollectionTypeTest.php
2011-07-22 16:42:50 +02:00
Fabien Potencier
20a704431e [SecurityBundle] fixed typo in tests 2011-07-22 14:50:38 +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