Commit Graph

1677 Commits

Author SHA1 Message Date
stloyd
18a83c67f4 [Form] Simplified a bit FormUtil and extended test coverage 2011-10-07 12:04:26 +02:00
stloyd
95049ef902 [Form] Added type check to ScalarToChoiceTransformer 2011-10-07 12:01:07 +02:00
Joseph Bielawski
d7c9644d29 [Validator] Extend and fix DateValidator & TimeValidator tests 2011-10-07 10:47:59 +02:00
Katsuhiro OGAWA
828b18f467 [Form] Fixed lacking attributes in DateTimeType 2011-10-05 17:57:43 +09:00
Fabien Potencier
92d19063a8 [Translation] changed some unit tests for PHPUnit 3.6.0 compatibility 2011-10-04 08:43:04 +02:00
Fabien Potencier
5c8a2fb48d [Routing] fixed route overriden mechanism when using embedded collections (closes #2139) 2011-09-30 12:01:46 +02:00
Danny Berger
e70c884f49 [Bridge/Monolog] Fix WebProcessor to accept a Request object. 2011-09-30 01:58:45 -04:00
Fabien Potencier
d429594afb removed separator of choice widget when the separator is null 2011-09-29 10:14:34 +02:00
Fabien Potencier
6eeca8e36d merged branch stealth35/fix_2142 (PR #2290)
Commits
-------

b12ce94 [HttpFoundation] fix #2142 PathInfo parsing/checking

Discussion
----------

[HttpFoundation] fix #2142 PathInfo parsing/checking

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #2142
2011-09-28 15:02:56 +02:00
stealth35
b12ce94c38 [HttpFoundation] fix #2142 PathInfo parsing/checking
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #2142
2011-09-28 13:18:44 +02:00
Fabien Potencier
b4028350d2 [HttpFoundation] standardized cookie paths (an empty path is equivalent to /) 2011-09-28 10:49:50 +02:00
Fabien Potencier
128468193f [BrowserKit] standardized cookie paths (an empty path is equivalent to /) 2011-09-28 10:49:26 +02:00
Josef Cech
85ed5c67dc [ClassLoader] Fixed state when trait_exists doesn't exists 2011-09-25 19:25:50 +02:00
Fabien Potencier
49c585ebd2 Revert "merged branch stealth35/ini_bool (PR #2235)"
This reverts commit 363057b181, reversing
changes made to 545cd4cd63.
2011-09-25 11:33:22 +02:00
Fabien Potencier
fa13469bba Revert "[DependencyInjection] fixed array support for the ini loader"
This reverts commit e0ace8eaee.
2011-09-25 11:33:07 +02:00
Fabien Potencier
27fc06785b Revert "[DepedencyInjection] fixed unit tests"
This reverts commit b8e5a155e4.
2011-09-25 11:33:00 +02:00
Fabien Potencier
d830253876 [Routing] fixed unit tests broken by previous merge 2011-09-23 20:56:18 +02:00
Alberto Pirovano
ae3aded83f Added PCRE_DOTALL modifier to RouteCompiler to allow urlencoded linefeed in route parameters. 2011-09-23 16:53:06 +02:00
Fabien Potencier
b8e5a155e4 [DepedencyInjection] fixed unit tests 2011-09-23 11:59:37 +02:00
Fabien Potencier
e0ace8eaee [DependencyInjection] fixed array support for the ini loader 2011-09-23 11:45:30 +02:00
stealth35
11c441289a [DependencyInjection] fix 2219 IniFileLoader accept Boolean 2011-09-21 22:14:12 +02:00
Matthieu Bontemps
e3f6b4fc0d [Translation] Add a failing test when translating a non existent string with a fallback 2011-09-21 19:43:20 +02:00
stealth35
cf736ccde3 [DomCrawler] Add test for ChoiceFormField without value 2011-09-20 18:30:35 +02:00
stealth35
43b55efd04 [Locale] Fix #2179 StubIntlDateFormatter support yy format
Fix #2179 Year limit is 2031 like IntlDateFormatter
2011-09-16 13:12:22 +02:00
Fabien Potencier
c50a3a194d [Translation] fixed transchoice when used with a fallback 2011-09-14 22:31:09 +02:00
Fabien Potencier
c985ffaa99 [Translation] fixed message selector when the message is empty (closes #2144) 2011-09-14 22:04:39 +02:00
Fabien Potencier
55eaf4e0f5 merged branch danielholmes/master (PR #2031)
Commits
-------

777f876 [HttpFoundation] Added test that exposes error in session saving

Discussion
----------

[HttpFoundation] Added test that exposes error in session saving

Noticed this commit in the recent release:

https://github.com/symfony/symfony/commit/34a1b53

And noticed that the save in __destruct won't be fired if a manual save has been called. The testSavedOnDestructAfterManualSave test I've added fails on 2.0.1 but it passes with 2.0.0. An example:

$session->set('foo', 'value');
$session->__destruct(); // eventually called during shutdown, triggers a save
// During next request, $session->get('foo') returns 'value'

$session->set('foo', 'value');
$session->save();
$session->set('foo', 'newvalue');
$session->__destruct(); // eventually called during shutdown, however WON'T trigger save
// During next request, $session->get('foo') returns 'value'

In my eyes the save on destruction should still happen whether a save has been called manually or not - it's more predictable. But i can see arguments for the opposite as well.

If consensus is that this is a bug, I'm happy to provide a fix but wanted to get feedback on the 2 options:

 * Save optimisation can be reverted
 * Can make the save optimisation more intelligent so a write to storage is only done if something has changed. The best way to do this would be to close down the api and mark the session as invalid when an attribute is set for example, however all properties are currently protected and would need to be private, so it might break some people's extensions of session

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

by stof at 2011/09/04 02:13:52 -0700

@fabpot what about it ?
2011-09-14 20:55:06 +02:00
Fabien Potencier
73c8d2ba74 [Form] fixed error bubbling for Date and Time types when rendering as multiple choices (closes #2062) 2011-09-14 08:30:47 +02:00
H. Westphal
3e2f1a4b13 Removed executable bits from all php files 2011-09-09 15:16:17 +02:00
Fabien Potencier
6677dabda5 merged branch jmikola/entity-validator (PR #2076)
Commits
-------

d19f1d7 [Doctrine] Fix UniqueEntityValidator reporting a false positive by ignoring multiple query results

Discussion
----------

[Doctrine] Fix UniqueEntityValidator reporting a false positive by ignoring multiple query results

An entity should only be considered unique if its search criteria returns no matches or a single, identical entity. Multiple results indicates that conflicting entities exist.

Note: the DoctrineMongoDBBundle's unique validator checks identifier values if the object strict-equality check is false. This may be a worthwhile improvement, as it would prevent reporting a validation error for an enttiy which is going to overwrite its conflicting counter-part in the database.

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

by jmikola at 2011/09/01 14:23:27 -0700

This is the Doctrine bridge equivalent for my fix to DoctrineMongoDBBundle: https://github.com/symfony/DoctrineMongoDBBundle/pull/42

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

by fabpot at 2011/09/02 00:13:52 -0700

As this is a bug fix, can you base your PR on the symfony/2.0 branch? Thanks.
2011-09-02 09:43:19 +02:00
Fabien Potencier
adb7291b67 Merge branch 'EvanK-patch-1' into 2.0
* EvanK-patch-1:
  Per the [documentation][1], the `NotBlank` constraint should be using the `empty` language construct, otherwise it will not trigger on, for example, a boolean false from an unchecked checkbox field.
2011-09-02 09:39:11 +02:00
Evan Kaufman
639513a67a Per the [documentation][1], the NotBlank constraint should be using the empty language construct, otherwise it will not trigger on, for example, a boolean false from an unchecked checkbox field.
[1]: http://symfony.com/doc/2.0/reference/constraints/NotBlank.html
2011-09-02 09:37:48 +02:00
Jeremy Mikola
d19f1d7621 [Doctrine] Fix UniqueEntityValidator reporting a false positive by ignoring multiple query results
An entity should only be considered unique if its search criteria returns no matches or a single, identical entity. Multiple results indicates that conflicting entities exist.
2011-09-01 17:20:30 -04:00
Fabien Potencier
bddcb4cc11 fixed a unit test 2011-09-01 11:05:39 +02:00
Fabien Potencier
946ccb6bd2 [Routing] fixed annotation loaders for abstract classes, added more unit tests 2011-08-30 20:57:43 +02:00
Daniel Holmes
777f876b90 [HttpFoundation] Added test that exposes error in session saving 2011-08-26 20:00:57 +10:00
Fabien Potencier
8f50592f31 [HttpFoundation] changed \LogicException to \InvalidArgumentException 2011-08-26 08:45:12 +02:00
Fabien Potencier
1c7694ff30 [HttpFoundation] added a missing exception 2011-08-25 10:38:08 +02:00
Fabien Potencier
a79f22544e [HttpKernel] added a test for uploading a file via an array instead of an UploadedFile instance 2011-08-25 10:07:28 +02:00
Jeremy Mikola
39fabab013 [EventDispatcher] Fix removeSubscriber() to work with priority syntax 2011-08-23 16:41:08 -04:00
Fabien Potencier
3380f2a039 [DomCrawler] fixed disabled fields in forms (they are available in the DOM, but their values are not submitted -- whereas before, they were simply removed from the DOM) 2011-08-23 11:21:48 +02:00
Fabien Potencier
277d75b7ce [Security] added a unit test for previous merge 2011-08-23 08:52:50 +02:00
Fabien Potencier
0b531932a0 merged branch stloyd/issue_1986 (PR #2000)
Commits
-------

c29fa9d [Form] Fix for treatment zero as empty data. Closes #1986

Discussion
----------

[Form] Fix for treatment zero as empty data. Closes #1986

For more info please read #1986.
2011-08-23 08:44:09 +02:00
Fabien Potencier
2b1bb2c357 [Form] added missing DelegatingValidator registration in the Form Extension class (used when using the Form component outside a Symfony2 project where the validation.xml is used instead) 2011-08-22 22:35:46 +02:00
stloyd
933c5aa771 [Tests] Added missing test for NumberType 2011-08-22 15:23:00 +02:00
stloyd
c29fa9d64e [Form] Fix for treatment zero as empty data. Closes #1986 2011-08-22 15:19:31 +02:00
Fabien Potencier
b66eb4db57 merged branch stloyd/form_datetime_transformer (PR #1851)
Commits
-------

d880db2 [Form] Test covered fix for invalid date (13 month/31.02.2011 etc.) send to transformer. Closes #1755
df74f49 Patched src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToArrayTransformer.php to throw an exception when an invalid date is passed for transformation (e.g. 31st February)

Discussion
----------

[Form] Fix for "DateTimeToArrayTransformer" with invalid dates

Hey,

this is test covered fix from @mdavis1982 (closes #1755)

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

by stloyd at 2011/08/16 01:31:32 -0700

@fabpot Can we have this fix merged ?
2011-08-19 14:26:00 +02:00
Fabien Potencier
95719e78ad merged branch schmittjoh/requestMethodOverrideFix (PR #1980)
Commits
-------

a1d9fed updated tests
b6ee1a6 fixes a bug when overriding method via the X-HTTP-METHOD-OVERRIDE header

Discussion
----------

Request method override fix
2011-08-19 14:13:57 +02:00
Fabien Potencier
46bbfff336 merged branch lsmith77/create_from_globals_tests (PR #1983)
Commits
-------

8c9ccf6 added more tests for Request::createFromGlobals()

Discussion
----------

added more tests for Request::createFromGlobals()
2011-08-18 19:44:05 +02:00
Lukas Kahwe Smith
8c9ccf6bc2 added more tests for Request::createFromGlobals() 2011-08-18 19:10:51 +02:00
Johannes Schmitt
a1d9fed988 updated tests 2011-08-18 12:19:27 +02:00
Victor Berchet
1518a81ea7 [HttpKernel] Simplify test code 2011-08-18 09:32:26 +02:00
Fabien Potencier
0b5d87d484 [HttpFoundation] fixed a unit tests 2011-08-14 10:56:48 +02:00
Alexey Popkov
81fb8e16e7 [DomCrawler] fix finding charset in addContent 2011-08-10 13:41:07 +04:00
Fabien Potencier
9fd6b3c021 merged branch stloyd/console_fixtures (PR #1915)
Commits
-------

9f66263 [Console] Fix fixtures from failing tests

Discussion
----------

[Console] Fix fixtures from failing tests
2011-08-08 23:21:52 +02:00
Fabien Potencier
be031f54a1 [HttpKernel] fixed ControllerResolver when the controller is a class name with an __invoke() method 2011-08-08 23:20:03 +02:00
stloyd
9f662634fe [Console] Fix fixtures from failing tests 2011-08-07 10:00:06 +02:00
stloyd
d880db2791 [Form] Test covered fix for invalid date (13 month/31.02.2011 etc.) send to transformer. Closes #1755 2011-07-28 12:16:58 +02:00
Fabien Potencier
8700cd6154 fixed CS 2011-07-27 08:27:46 +02:00
Fabien Potencier
422522bcf8 merged branch aboks/mimetype_test (PR #1775)
Commits
-------

1283c47 [HttpFoundation] Fixed incorrect test; MimeTypeGuesser should be (and is) able to detect a path that is not a file also without the 'fileinfo' extension

Discussion
----------

[HttpFoundation] Fixed incorrect test when 'fileinfo' extension is not enabled

This test failed on my box with `fileinfo` disabled. The `FileNotFoundException` is thrown also when the `fileinfo`-extension is not enabled, so it should be expected.
2011-07-27 08:24:12 +02:00
Fabien Potencier
de9f8ab47e added a unit test for previous merge 2011-07-27 08:00:56 +02:00
Fabien Potencier
c6308a5daf merged branch stof/trans_locale (PR #1808)
Commits
-------

85c0087 [TwigBridge] Made the locale configurable for the trans and transchoice tags
3ea31a0 [TwigBridge] Made the locale configurable for the trans and transchoice filters

Discussion
----------

Trans locale

This allows setting the locale when translating in a Twig template. This was already allowed in the Translator and in the PHP templates
2011-07-27 07:44:42 +02:00
Fabien Potencier
853935fbab [HttpFoundation] made PHP_AUTH_PW optional 2011-07-26 09:32:45 +02:00
Fabien Potencier
acd9d09ada [HttpKernerl] fixed some unit tests 2011-07-26 09:28:27 +02:00
Fabien Potencier
91a41020a8 merged branch sasezaki/BrowserKit_useragent (PR #1789)
Commits
-------

266e60e Don't tell a lie to every WebServers

Discussion
----------

Please don't tell a lie to every WebServers

Fake Useragent name should be only in test case .
2011-07-26 09:21:10 +02:00
Christophe Coevoet
85c0087825 [TwigBridge] Made the locale configurable for the trans and transchoice tags 2011-07-26 01:27:09 +02:00
Christophe Coevoet
3ea31a0263 [TwigBridge] Made the locale configurable for the trans and transchoice filters 2011-07-26 01:25:25 +02:00
Johannes Schmitt
0b3ff39704 fix supported cookie date formats 2011-07-24 21:28:31 +02:00
sasezaki
266e60e7a2 Don't tell a lie to every WebServers 2011-07-24 14:01:26 +09:00
Arnout Boks
0635548800 [Process] Fixed tests on Windows by using escapeshellarg to escape argument 2011-07-23 18:13:57 +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
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
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
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
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
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
c6115cee7f [BrowserKit] changed Cookie::fromString() to not take the secure setting into account if the URL is not present or is not HTTPS 2011-07-22 13:29:57 +02:00
marc.weistroff
257f86cb20 [Form] Collection's prototype is not not a child anymore. 2011-07-22 11:03:06 +02:00
marc.weistroff
2b4cc9bd06 [Form] Changed collection prototype rendering.
Based on PR 1500. It is now rendered inside an attribute of collection
tag.
2011-07-22 11:01:55 +02:00
marc.weistroff
2e024f87a3 [Form] CollectionType now checks for data_class parameter instead of only class. 2011-07-21 19:50:40 +02:00
marc.weistroff
0327beb0b9 [Form] Added ObjectFactoryListener. Fixes #1746. 2011-07-21 15:02:52 +02:00
Fabien Potencier
e42a2dede1 [Validator] fixed unit tests when intl is not installed 2011-07-20 14:45:35 +02:00
Fabien Potencier
e5fa78af31 [Form] fixed unit tests when intl is not installed 2011-07-20 14:36:55 +02:00
Fabien Potencier
9e7cb0a020 [Routing] fixed default value for Routes as they can be anything if they don't need to be used as default values for placeholders 2011-07-19 19:18:29 +02:00
Johannes Schmitt
f300edebe4 fixes several bugs 2011-07-19 16:21:58 +02:00
Fabien Potencier
d6cbbdd26c merged branch meckhardt/create-request-with-empty-path (PR #1736)
Commits
-------

95011ce [HttpFoundation] Fixed creation of requests without a path.

Discussion
----------

[HttpFoundation] Fixed creation of requests without a path.

Providing urls with no path led to php warning that the index 'path' is
not set. This patch initializes 'path' if no path is set.
2011-07-19 11:52:50 +02:00
Martin Eckhardt
95011ce4b7 [HttpFoundation] Fixed creation of requests without a path.
Providing urls with no path led to php warning that the index 'path' is
not set. This patch initializes 'path' if no path is set.
2011-07-19 10:54:21 +02:00
Fabien Potencier
a1d8c70890 [Routing] fixed a bug when a default value is an integer
A default value is always a string in the context of routing.
2011-07-17 17:30:35 +02:00
Deni
0f328d228b [Validator] Fixed using the strict option in the choice validator. 2011-07-16 21:16:21 +04:00
Fabien Potencier
d9048658d9 merged branch schmittjoh/lazyParameterBag (PR #1712)
Commits
-------

d37ff15 removed unused code
2d3051f tabs -> spaces
2c224ce improves the exception message, and removes unnecessary constraint to only allow strings inside strings
d0b056c fixes a bug where getParameterBag() always returns null

Discussion
----------

Fixes a bug in PHPDumper, and in parameter resolving
2011-07-16 18:30:54 +02:00
Fabien Potencier
52543e7a32 merged branch schmittjoh/cookieFix (PR #1702)
Commits
-------

eb85cc5 fixes a bug where the cookie was wrongly considered expired

Discussion
----------

fixes a bug where the cookie was wrongly considered expired

On a related note, what do you think about adding some more functional tests here? Not only phpunit, but I would also suggest to add behat tests since there are a lot of things which are not picked up by the in process request emulation, but only by a real client.

@fabpot, @everzet, what do you think?
2011-07-16 18:24:26 +02:00
Fabien Potencier
8e1f420e12 merged branch schmittjoh/sessionRename (PR #1705)
Commits
-------

5e80c68 fixes a naming inconsistency
8cfca15 added change to upgrade file
4123ec4 updated some missing references

Discussion
----------

Fix inconsistent naming

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

by jalliot at 2011/07/15 08:15:01 -0700

I think you forgot one commit (the one effectively changing Session and that you reverted in the main repo)

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

by schmittjoh at 2011/07/15 09:07:17 -0700

You're right, fixed now.
2011-07-16 18:23:21 +02:00
Johannes Schmitt
2c224ce42b improves the exception message, and removes unnecessary constraint to only allow strings inside strings 2011-07-16 16:10:11 +02:00
Fabien Potencier
5182a0c2c4 [Form] removed a constraint in PropertyPath as the path can definitely be an empty string for errors attached on the main form (when using a constraint defined with the 'validation_constraint' option) 2011-07-16 00:34:50 +02:00
Fabien Potencier
c04512086e [Validator] fixed error message property path when a collection error occurs 2011-07-16 00:29:54 +02:00
Johannes Schmitt
4123ec4a1f updated some missing references 2011-07-15 18:03:17 +02:00