Commit Graph

5939 Commits

Author SHA1 Message Date
sasezaki
266e60e7a2 Don't tell a lie to every WebServers 2011-07-24 14:01:26 +09: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
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
Fabien Potencier
edcdb4137f [HttpKernel] fixed possible double-classes in compiled classes 2011-07-22 22:17:31 +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
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
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
Fabien Potencier
cc07af2449 [ClassLoader] replaced MapFileClassLoader by MapClassLoader 2011-07-22 14:44:33 +02:00
Fabien Potencier
5d9bd6da4f [TwigBundle] fixed XSS in the exception template 2011-07-22 13:42:59 +02:00
Fabien Potencier
6419456de4 [Security] change a comparison to use a strict comparison 2011-07-22 13:37:59 +02:00
Fabien Potencier
9bf6216a85 added missing ' escaping 2011-07-22 13:37:23 +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
Fabien Potencier
49dda530e0 merged branch marcw/issue-1746 (PR #1758)
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
2011-07-22 10:11:44 +02:00
Fabien Potencier
d96c152c4c [HttpKernel] fixed error message in HttpKernel 2011-07-22 09:55:31 +02:00
Fabien Potencier
84abbbd6df [HttpKernel] enhanced the ExceptionHandler so that it can be used in prod environment too (mainly useful for Silex) 2011-07-22 09:38:05 +02:00
Fabien Potencier
3f3f8e8002 [ClassLoader] removed obsolete code 2011-07-21 23:27:21 +02:00
Fabien Potencier
6b0a9ff784 [HttpKernel] changed the compiled class cache to non-adaptative (as it is now loaded very early) 2011-07-21 22:33:29 +02:00
Fabien Potencier
e776d5dbce [FrameworkBundle] tweaked compiled class cache 2011-07-21 22:32:50 +02:00
Fabien Potencier
cede13e8cc [FrameworkBundle] moved the SessionListener to the session.xml configuration file 2011-07-21 22:32:21 +02:00
Fabien Potencier
ccda267c36 [FrameworkBundle] fixed wrong order in classes to compile 2011-07-21 21:44:10 +02:00
Fabien Potencier
7062cc2db5 [HttpKernel] fixed compiled classes 2011-07-21 21:32:57 +02:00
Fabien Potencier
b06a5dfcf3 merged branch andreia/master (PR #1760)
Commits
-------

350f207 Update the CSRF message

Discussion
----------

Update the CSRF message

Update the CSRF message
2011-07-21 20:57:10 +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
Fabien Potencier
3749ad43f4 moved the Exception listener from FrameworkBundle to TwigBundle as it relies on Twig being enabled
This commit also fixes exception pages when Twig is not enabled as a templating engine.
Instead of just displaying the raw Twig template as before, we now fallback to the default
exception handler introduced some time ago.
2011-07-21 19:24:04 +02:00
Andreia Bohner
350f2076ba Update the CSRF message 2011-07-21 12:47:42 -03:00
marc.weistroff
0327beb0b9 [Form] Added ObjectFactoryListener. Fixes #1746. 2011-07-21 15:02:52 +02:00
Andreia Bohner
cb37572b58 Update the Brazilian Portuguese validator translations and fix typo 2011-07-20 21:58:46 -03:00
Andreia Bohner
e0e4778fe6 Revert "Update the Brazilian Portuguese validator translations and fix typo"
This reverts commit 63f0707df6.
2011-07-20 21:00:45 -03:00
Andreia Bohner
63f0707df6 Update the Brazilian Portuguese validator translations and fix typo 2011-07-20 20:51:35 -03:00
Martin Schuhfuss
79e4ed661b simplified assignment 2011-07-20 17:29:23 +02:00
Martin Schuhfuss
04302ffe98 simplified ternary-operator 2011-07-20 17:27:36 +02:00
Martin Schuhfuss
3a285c1548 fixed handling of null-values in attribute- and query-arrays
when esi is enabled and internal uris are generated for esi-tags, an
attribute-array consisting entirely of null-values isn't handled correctly.

The reason is that php's `http_build_query()`-method outputs an empty string
for such arrays:

    http_build_query(array('foo' => '')) == 'foo='
    http_build_query(array('foo' => null)) == ''

In the latter case, the generation of an URI in `HttpKernel::generateInternalUri()`
generates an URI that could not be matched by the corresponding route (ex.
`_internal/Controller/.html` opposed to `_internal/Controller/none.html` which
should be expected).

This commit adds a possible solution as well as a simple test for this issue.
2011-07-20 17:03:20 +02:00
Fabien Potencier
97cb35b47a [DependencyInjection] tagged the public @api 2011-07-20 10:50:27 +02:00
Fabien Potencier
b36c002fa4 [Validator] tagged the public @api 2011-07-20 10:37:57 +02:00
Fabien Potencier
5c06b3cfeb [Templating] tagged the public @api 2011-07-20 10:27:25 +02:00
Fabien Potencier
7720cb9be4 [HttpKernel] tagged public @api 2011-07-20 10:14:31 +02:00
Fabien Potencier
7dcbcbe69d [HttpFoundation] tagged public @api 2011-07-20 10:06:02 +02:00
Johannes Schmitt
eae6a773c6 fixed wrong case 2011-07-20 08:43:26 +02:00
Fabien Potencier
311d691670 [HttpKernel] split ExceptionHandler::handle() in two methods for better re-usability 2011-07-19 22:27:03 +02:00
Johannes Schmitt
d0a175b6cd fixes #1659 2011-07-19 20:51:30 +02:00
Fabien Potencier
d3a69e3531 [DoctrineBundle] renamed RegistryInterface::getEntityManagerForObject() to getEntityManagerForClass() 2011-07-19 19:24:57 +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
Johannes Schmitt
a4f05ac7ab added some tests 2011-07-19 14:50:39 +02:00
Fabien Potencier
dafa4d28d6 [FrameworkBundle] made another small optimization for functional tests 2011-07-19 13:11:12 +02:00
Fabien Potencier
1454d61ad5 [FrameworkBundle] made a huge speed optimization for functional tests 2011-07-19 12:51:57 +02:00
Fabien Potencier
d2e9f14597 merged branch schmittjoh/routerFix (PR #1720)
Commits
-------

9bcce9f fix tests
fc4787a fix non-extensible router

Discussion
----------

Router fix

Right now, the router is hard to overwrite (you need always a compiler pass). This commit fixes this.

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

by fabpot at 2011/07/18 01:15:36 -0700

Why do you need a complier pass to override the router?

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

by schmittjoh at 2011/07/18 01:47:47 -0700

How would you suggest to overwrite it?

Basically, I want to do something like this:

```yml
services:
    router:
         parent: router.default
         class: MyClass
         calls:
             - [moreDeps, []]
```

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

by Seldaek at 2011/07/18 05:07:19 -0700

Then maybe we should somehow support redefining services with the same name while keeping the old one as parent, otherwise we need this foo.default for every service out there?

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

by fabpot at 2011/07/18 06:30:34 -0700

as @Seldeak said, why do that for the router and not all services?

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

by schmittjoh at 2011/07/18 06:38:39 -0700

I have designed the SecurityBundle this way where extension is encouraged.

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

by schmittjoh at 2011/07/18 11:15:57 -0700

I should add that this is mainly a problem for services where you still want to use the semantic configuration that is provided by the bundle. For services which are not configured by the extension, this is not so much of an issue.

Anyway, if you don't want to merge it, just close the PR. I have no problem with using a compiler pass.

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

by fabpot at 2011/07/18 11:55:11 -0700

We already have such a case with translator and translator.real. I will review the existing services to see where it makes sense to implement the same strategy.

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

by Seldaek at 2011/07/18 12:20:55 -0700

I guess you'd do it anyway, but we should pick a winner between .real and .default

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

by lsmith77 at 2011/07/18 12:26:52 -0700

I would prefer ".default" as ".real" always confused me.
2011-07-19 12:06:28 +02:00
Fabien Potencier
b4b8f35da2 renamed translator.real to translator.default 2011-07-19 12:05:51 +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
kwiateusz
9e038c005c Edited src/Symfony/Component/BrowserKit/Client.php via GitHub 2011-07-19 02:34:03 -07: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
3e2ba60738 merged branch geoffreytran/assetic-debug-performance (PR #1728)
Commits
-------

8e169e4 Improved performance when assetic's use_controller is enabled

Discussion
----------

Improved performance when assetic's use_controller is enabled

When assetic's use_controller is enabled, assetic has to loop through all the templates and create TemplateReferences through the assetic FileResource. This in turn causes a lot of calls to getLogicalName() leading to 5x the calls to the TemplateReference's get() (16k in my case). By accessing the protected field directly compared to using get() we achieve better performance during development (33% in my case).

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

by beberlei at 2011/07/18 11:22:43 -0700

+1 - assetic is a huge performance drain for my app in dev mode aswell.
2011-07-18 20:57:08 +02:00
Fabien Potencier
69a4af8868 merged branch stof/mapping_driver_optimization (PR #1729)
Commits
-------

5d17b92 [DoctrineBridge] Optimized the mapping drivers

Discussion
----------

[DoctrineBridge] Optimized the mapping drivers

This avoids loading all mappings when calling ``isTransient`` as it adds an overhead.

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

by beberlei at 2011/07/18 11:35:36 -0700

Its much better than the original one.

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

by stof at 2011/07/18 11:53:09 -0700

For the mapping defined in a specific class, this simply checks if the file exists (like Doctrine's implementation) but reusing the other method to keep the code DRY.
There is still an overhead when using a global mapping file but I don't see a way to avoid loading the file.
2011-07-18 20:55:55 +02:00
Fabien Potencier
27beb3bd15 [Form] fixed error message 2011-07-18 20:51:35 +02:00
Christophe Coevoet
5d17b9207c [DoctrineBridge] Optimized the mapping drivers 2011-07-18 18:58:02 +02:00
Fabien Potencier
b2efdcbad9 [Form] added a missing check (the code calls isset() and unset() and so the data must implements ArrayAccess and Traversable) 2011-07-18 18:43:52 +02:00
Fabien Potencier
c3a060e368 updated all core extensions to use the new shortcut method 2011-07-18 17:46:00 +02:00
Fabien Potencier
125fd21a38 merged branch schmittjoh/convenienceMethod (PR #1723)
Commits
-------

f6c5ef7 adds a small convenience method

Discussion
----------

adds a small convenience method
2011-07-18 17:42:46 +02:00
Fabien Potencier
e2eb601ebd [FrameworkBundle] fixed absolute paths to the cache directory after running cache:clear (closes #1725) 2011-07-18 17:38:41 +02:00
Fabien Potencier
3104a8ab22 oops 2011-07-18 16:14:13 +02:00
Fabien Potencier
8fc9547da5 [FrameworkBundle] fixed session support in functional tests when using several clients in the same process 2011-07-18 16:13:26 +02:00
Fabien Potencier
bb452cd7c4 [Form] renamed invalid_message_template to invalid_message to be consistent with other error message names 2011-07-18 14:49:07 +02:00
Fabien Potencier
f9229fe6d8 [Doctrine] added XML support for previous merge 2011-07-18 14:42:48 +02:00
Fabien Potencier
ab94d125b8 merged branch noelg/fix-doctrineconfiguration-dql (PR #1719)
Commits
-------

872d308 [DoctrineBundle] Allowed to configure dql functions without using the multiple entity mangers syntax

Discussion
----------

[DoctrineBundle] Allowed to configure dql functions using the single EM syntax

[DoctrineBundle] Allowed to configure dql functions without using the multiple entity managers syntax
2011-07-18 14:37:42 +02:00
Johannes Schmitt
f6c5ef7b74 adds a small convenience method 2011-07-18 11:48:20 +02:00
Johannes Schmitt
9bcce9fcdb fix tests 2011-07-18 10:10:04 +02:00
Johannes Schmitt
fc4787ac90 fix non-extensible router 2011-07-18 10:06:01 +02:00
Noel GUILBERT
872d308e9c [DoctrineBundle] Allowed to configure dql functions without using the multiple entity mangers syntax 2011-07-18 19:51:38 +12:00
excelwebzone
0d39cbb2d3 Fixed grammar 2011-07-17 09:35:52 -07:00
excelwebzone
254ce24a11 Translated missed row 2011-07-17 09:27:04 -07: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
Fabien Potencier
061ce6d833 merged branch geoffreytran/doctrine-acl-cache (PR #1708)
Commits
-------

b9bdab8 DoctrineAclCache unserialize sets the acl to the wrong field

Discussion
----------

DoctrineAclCache unserialize sets the acl to the wrong field

Upon unserialize of the acl, the acl is currently set to the id field which should be a string. Currently it passes the acl object into the id field which causes the following error upon unserialize.

Warning: Illegal offset type in isset or empty in Symfony/Component/Security/Acl/Dbal/AclProvider.php line 404
This is because at line 404, $ace->getId() returns an Acl object not an id and the acl field in $ace is null.
     if (isset($this->loadedAces[$ace->getId()])) {

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

by fabpot at 2011/07/16 09:31:42 -0700

@schmittjoh?

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

by schmittjoh at 2011/07/16 23:19:06 -0700

Yes, this fix is good.
2011-07-17 09:00:09 +02:00
Fabien Potencier
059af7964b merged branch jdreesen/fix-01 (PR #1715)
Commits
-------

3a33c65 Fixed typo

Discussion
----------

Fixed typo

Fixed a small typo in the docblock
2011-07-17 07:49:38 +02:00
Fabien Potencier
ebaf290d0a merged branch doup/euskara_translations (PR #1714)
Commits
-------

39e476f Basque translations added.
6f650f8 Basque file added

Discussion
----------

Euskara translations

Basque (euskara) translations added.
2011-07-17 07:49:14 +02:00
doup
39e476f921 Basque translations added. 2011-07-16 23:02:24 +02:00
Fabien Potencier
634131bc77 [Twig] made a small optimization to avoid problems with XDebug when rendering forms with deep nested collections 2011-07-16 20:40:19 +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
Fabien Potencier
c7b18887f8 merged branch xmontana/patch-1 (PR #1710)
Commits
-------

b64c15a Updated spanish translation

Discussion
----------

Updated spanish translation
2011-07-16 18:22:45 +02:00
Johannes Schmitt
d37ff152c0 removed unused code 2011-07-16 16:14:43 +02:00
Johannes Schmitt
2d3051f9cc tabs -> spaces 2011-07-16 16:13:26 +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
Johannes Schmitt
d0b056cce9 fixes a bug where getParameterBag() always returns null 2011-07-16 15:52:02 +02:00
xmontana
b64c15a17a Updated spanish translation 2011-07-16 00:59:04 -07:00
Geoffrey Tran
8e169e4457 Improved performance when assetic's use_controller is enabled
When assetic's use_controller is enabled, assetic has to loop through all the templates and create TemplateReferences through the assetic FileResource. This in turn causes a lot of calls to getLogicalName() leading to 5x the calls to the TemplateReference's get() (16k in my case). By accessing the protected field directly compared to using get() we achieve better performance during development (33% in my case).
2011-07-15 20:52:23 -05:00
Fabien Potencier
af67e65cbd [Form] fixed validation when using the 'validation_constraint' option 2011-07-16 00:45:53 +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
Fabien Potencier
1238bb3d53 [HttpKernel] lowered the number of level to keep in Flattened exceptions to make the tests pass when XDebug is enabled (beause of the default max nesting level of 100) 2011-07-16 00:29:33 +02:00
Geoffrey Tran
b9bdab8bd4 DoctrineAclCache unserialize sets the acl to the wrong field
Upon unserialize of the acl, the acl is currently set to the id field which should be a string. Currently it passes the acl object into the id field which causes the following error.

Warning: Illegal offset type in isset or empty in Symfony/Component/Security/Acl/Dbal/AclProvider.php line 404
2011-07-15 12:41:15 -05:00
Johannes Schmitt
5e80c68fab fixes a naming inconsistency 2011-07-15 18:06:18 +02:00
Johannes Schmitt
4123ec4a1f updated some missing references 2011-07-15 18:03:17 +02:00
Johannes Schmitt
3cb4b031b6 Revert "fixed inconsistent naming"
Incomplete, and wrong repo anyway.
2011-07-15 15:55:30 +02:00
Johannes
eaa173b788 fixed inconsistent naming 2011-07-15 06:41:41 -07:00
Costin Bereveanu
5395c6c675 Few RO translation tweaks 2011-07-15 02:46:38 -07:00
Johannes Schmitt
eb85cc550b fixes a bug where the cookie was wrongly considered expired 2011-07-15 11:07:35 +02:00
Fabien Potencier
43543bb85d merged branch francisbesset/httpfoundation_requestmatcher (PR #1690)
Commits
-------

71cfb56 Thrown a \RuntimeException in RequestMatcher::checkIp6() if PHP is compiled with the option "disable-ipv6"

Discussion
----------

[HttpFoundation] Problem with RequestMatcher if PHP is compiled with the option "disable-ipv6"

Thrown a \RuntimeException in RequestMatcher::checkIp6() if PHP is compiled with the option "disable-ipv6".
2011-07-15 10:35:42 +02:00
Johannes Schmitt
af6d4e4c8e changed test 2011-07-15 10:29:16 +02:00
Francis Besset
71cfb56917 Thrown a \RuntimeException in RequestMatcher::checkIp6() if PHP is compiled with the option "disable-ipv6" 2011-07-15 10:28:46 +02:00
Johannes Schmitt
6d1eb48a9b fixes a bug during session initialization in test environment 2011-07-15 10:23:38 +02:00
Fabien Potencier
2a0178c2b5 merged branch jmikola/yaml-numeric-strings (PR #1688)
Commits
-------

05cc24c [Yaml] Wrap numeric strings in quotes when dumping

Discussion
----------

[Yaml] Wrap numeric strings in quotes when dumping

This addresses an obscure case where a hash string (actually a commit-ish, "686e444") was dumped to YAML as an unquoted string value. It was later parsed from YAML as an exponential numeric and changed to ".Inf".

This commit should not change the existing behavior when dumping non-string numerics. It also doesn't appear to disturb any of the other test cases. I realize it's a huge edge case, so I'm open to discussion.

The alternative to this fix was an ugly `preg_replace()` to apply quoting around the commit-ish after dumping. I would look forward to removing that :)
2011-07-15 08:39:27 +02:00
jdreesen
3a33c65bd5 Fixed typo 2011-07-15 04:59:03 +02:00
doup
6f650f8e8d Basque file added 2011-07-15 02:16:30 +02:00
Fabien Potencier
6a264979d1 merged branch erheme318/mongolian_translation (PR #1695)
Commits
-------

3e092b5 Updated the Mongolian validator translations

Discussion
----------

Updated the Mongolian validator translations
2011-07-14 18:33:39 +02:00
Fabien Potencier
0dd44898ce merged branch erheme318/master (PR #1694)
Commits
-------

e09bc30 Added the Mongolian validator translations

Discussion
----------

Added the Mongolian validator translations
2011-07-14 18:29:20 +02:00
erheme318
3e092b5bfc Updated the Mongolian validator translations 2011-07-14 14:55:06 +07:00
Fabien Potencier
12b1875b88 merged branch schmittjoh/testSessionListenerFix (PR #1691)
Commits
-------

e94eb0b fixes a bug in the test session listener

Discussion
----------

fixes a bug in the test session listener
2011-07-14 08:16:53 +02:00
erheme318
e09bc3015d Added the Mongolian validator translations 2011-07-14 09:14:38 +07:00
Johannes Schmitt
e94eb0b7e0 fixes a bug in the test session listener 2011-07-14 00:54:12 +02:00
Jeremy Mikola
05cc24ce5b [Yaml] Wrap numeric strings in quotes when dumping
This addresses an obscure case where a hash string (actually a commit-ish, "686e444") was dumped to YAML as an unquoted string value. It was later parsed from YAML as an exponential numeric and changed to ".Inf".
2011-07-13 16:58:57 -04:00
Fabien Potencier
ae092b9482 merged branch schmittjoh/abstractAuthenticationListener (PR #1683)
Commits
-------

29e4063 [Security] changed order of checks to check for more specific things first

Discussion
----------

[Security] changed order of checks
2011-07-13 19:12:19 +02:00
Johannes Schmitt
29e4063825 [Security] changed order of checks to check for more specific things first 2011-07-13 18:49:52 +02:00
Fabien Potencier
093c0c7163 merged branch hason/czech_translation (PR #1682)
Commits
-------

6f859a4 [FrameworkBundle] Updated the Czech validator translations

Discussion
----------

[FrameworkBundle] Updated the Czech validator translations
2011-07-13 18:20:39 +02:00
Fabien Potencier
9e4422b510 merged branch xmontana/patch-1 (PR #1681)
Commits
-------

ba7ec9b Edited src/Symfony/Bundle/FrameworkBundle/Resources/translations/validators.ca.xliff via GitHub

Discussion
----------

Edited src/Symfony/Bundle/FrameworkBundle/Resources/translations/validato

Updated catalan translation
2011-07-13 18:20:21 +02:00
Martin Hason
6f859a4e04 [FrameworkBundle] Updated the Czech validator translations 2011-07-13 18:16:11 +02:00
xmontana
ba7ec9b98b Edited src/Symfony/Bundle/FrameworkBundle/Resources/translations/validators.ca.xliff via GitHub 2011-07-13 09:14:00 -07:00
Johannes Schmitt
b7c4806a5a [Security] fixes #1329 2011-07-13 18:10:58 +02:00
Fabien Potencier
f0a75e8358 merged branch aboks/dutch_translations (PR #1679)
Commits
-------

61de80d [FrameworkBundle] Updated the Dutch validator translations for the changes in 95f7eedd63

Discussion
----------

[FrameworkBundle] Updated the Dutch validator translations

[FrameworkBundle] Updated the Dutch validator translations for the changes in 95f7eedd63
2011-07-13 16:42:29 +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
Arnout Boks
61de80d414 [FrameworkBundle] Updated the Dutch validator translations for the changes in 95f7eedd63 2011-07-13 16:36:57 +02:00
Christian Raue
7992ce6796 fixed German validator translation again (see #1676) 2011-07-13 06:59:52 -07:00
Christian Raue
374c53ab47 fixed German validator translation 2011-07-13 06:02:09 -07:00
Fabien Potencier
182f9e6508 [HttpFoundation] added population of the Authorization header based on the PHP_AUTH_* data 2011-07-13 14:12:03 +02:00
Francis Besset
7cf891a448 Renamed variable returned and used self in place of static for constants 2011-07-13 14:10:50 +02:00
Jan Behrens
86b96f4f81 Added missing import of UserInterface. 2011-07-13 04:30:07 -07:00
Jan Behrens
88fd076133 Added missing import of UserProviderInterface. 2011-07-13 04:16:24 -07:00
Fabien Potencier
d80ee41130 Revert "merged branch yktd26/master (PR #1673)"
This reverts commit af70ac8d77, reversing
changes made to c881379fe7.
2011-07-13 12:21:56 +02:00
Fabien Potencier
af70ac8d77 merged branch yktd26/master (PR #1673)
Commits
-------

26ff05b fixes #1538

Discussion
----------

fixes #1538

Constructor of  Symfony\Component\Security\Acl\Domain\RoleSecurityIdentity
--------------------------------------------------------------------------------------------------------

currently it check if the argument is instance of Symfony\Component\Security\Core\Role\Role by

``if ($role instanceof Role)``

Maybe it should be changed to

``if ($role instanceof RoleInterface)``

Because if we use another Role class which implements RoleInterface

it dosen't work when we check access, it will throw a *NoAceFoundException* when vote
2011-07-13 11:30:35 +02:00
Fabien Potencier
c881379fe7 merged branch marcw/doctrine-bridge-security (PR #1672)
Commits
-------

66c698a Updated update.md
b33e1ba [SecurityBundle] Reported namespace change of EntityUserProvider
26e96c4 [DoctrineBridge] Changed namespace of EntityUserProvider[B
1633cb3 [Security] Moved EntityUserProvider to Doctrine Bridge

Discussion
----------

[2.1] Moved EntityUserProvider class from Security Component to Doctrine Bridge

I guess that this should better be placed in the Doctrine Bridge.

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

by henrikbjorn at 2011/07/13 00:00:39 -0700

Missing entry in UPDATE.md

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

by schmittjoh at 2011/07/13 00:34:10 -0700

What is our distribution strategy for these bridges?

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

by stof at 2011/07/13 00:53:29 -0700

@schmittjoh Each bridge (Doctrine, Twig, Monolog) is available as a separate repo just like the components.

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

by schmittjoh at 2011/07/13 00:57:41 -0700

I've just checked, but we don't seem to have PEAR packages for these.

If we make this change, then it should still be easy to install the component because there is no benefit of moving this class there. The bridges are mainly useful for extracting code from bundles.

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

by stof at 2011/07/13 01:02:42 -0700

@fabpot any plan to add the bridges on the PEAR channel ?

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

by fabpot at 2011/07/13 02:27:05 -0700

@stof: Bridges will be added with the RC5 release.
2011-07-13 11:28:02 +02:00
yktd26
26ff05b333 fixes #1538 2011-07-13 10:28:34 +02:00
Fabien Potencier
68c07775ad [FrameworkBundle] fixed translation loading process when a file does not respect the expected pattern (avoid loading foo.fr.xliff~ for instance) 2011-07-13 09:23:43 +02:00
marc.weistroff
b33e1bae29 [SecurityBundle] Reported namespace change of EntityUserProvider 2011-07-13 08:46:21 +02:00
marc.weistroff
26e96c4ab0 [DoctrineBridge] Changed namespace of EntityUserProvider[B 2011-07-13 08:44:37 +02:00
marc.weistroff
1633cb30bd [Security] Moved EntityUserProvider to Doctrine Bridge 2011-07-13 08:41:17 +02:00
Fabien Potencier
451c737b97 merged branch jdreesen/validator-trans-update (PR #1670)
Commits
-------

eb77683 [FrameworkBundle] Updated German validator translation

Discussion
----------

[FrameworkBundle] Updated German validator translation
2011-07-13 07:39:15 +02:00
jdreesen
eb776835fc [FrameworkBundle] Updated German validator translation 2011-07-13 01:36:38 +02:00
Benjamin Eberlei
25ab8596da [DoctrineBundle] Add warning about inheritance not supported in entity generation 2011-07-12 23:35:07 +02:00
Joseph Bielawski
719034ff41 [Validator] Sync & fix polish translation 2011-07-12 12:06:54 -07:00
Fabien Potencier
053d2ec179 merged branch yethee/update_translations (PR #1661)
Commits
-------

ad2b224 [FrameworkBundle] Updated Russian translations.
95f7eed [FrameworkBundle] Fixed messages of the Choice constraint in all translations.

Discussion
----------

[FrameworkBundle] Fixes for all translations

Fixed the source messages of the choice contstraint for all translations, and re-sort messages.

And also updated Russian translations, added translations for all constraints.
2011-07-12 20:51:34 +02:00
Fabien Potencier
3825a842d7 [DoctrineBundle] fixed unit tests for previous merge 2011-07-12 20:16:16 +02:00
Deni
ad2b224637 [FrameworkBundle] Updated Russian translations. 2011-07-12 22:10:41 +04:00
Fabien Potencier
362aa330b0 merged branch geoffreytran/master (PR #1655)
Commits
-------

91cfb24 Made namespace for Doctrine cache unique to each environment

Discussion
----------

Made the cache namespace for the Doctrine cache extension unique to each environment

The current cache namespace for the Doctrine adapters is unique on an entity manager and the kernel root directory; however, it causes problems as settings for entity managers can differ between environments, so the addition of the environment into the namespace would address the issue.

        $namespace = 'sf2orm_'.$entityManager['name'].'_'.md5($container->getParameter('kernel.root_dir'));

Solves issues with the cache not being valid for the DBAL ACL provider using D2 as the cache and switching environments.

        An exception has been thrown during the rendering of a template ("Warning: Illegal offset type in isset or  empty in ../vendor/symfony/src/Symfony/Component/Security/Acl/Dbal/AclProvider.php line 404")
2011-07-12 20:08:56 +02:00
Fabien Potencier
121a407f05 merged branch stloyd/patch-2 (PR #1656)
Commits
-------

31317cc [Validator] Sync polish translation

Discussion
----------

[Validator] Sync polish translation
2011-07-12 20:06:30 +02:00
Fabien Potencier
582dda5c85 merged branch vicb/fmwk/ide (PR #1657)
Commits
-------

df34e0e [FrameworkBundle] Fix for setting a custom file link format (fixes #1652)

Discussion
----------

[FrameworkBundle] Fix for setting a custom file link format (fixes #1652)

[FrameworkBundle] Fix for setting a custom file link format (fixes #1652)
2011-07-12 20:06:08 +02:00
Fabien Potencier
5cb165c259 merged branch aboks/dutch_translations (PR #1658)
Commits
-------

2227e41 Fixed incorrect indentation
85b6985 [FrameworkBundle] Sync'ed Dutch validator translations

Discussion
----------

[FrameworkBundle] Sync'ed Dutch validator translations
2011-07-12 20:05:34 +02:00
Fabien Potencier
07ddff5862 merged branch jdreesen/validator-trans-update (PR #1654)
Commits
-------

6d87e67 [FrameworkBundle] Updated German validator translation

Discussion
----------

[FrameworkBundle] Updated German validator translation
2011-07-12 20:04:55 +02:00
Deni
95f7eedd63 [FrameworkBundle] Fixed messages of the Choice constraint in all translations. 2011-07-12 21:54:08 +04:00
Arnout Boks
2227e41b7e Fixed incorrect indentation 2011-07-12 19:24:25 +02:00
Arnout Boks
85b6985eb0 [FrameworkBundle] Sync'ed Dutch validator translations 2011-07-12 19:08:04 +02:00
Victor Berchet
df34e0eb29 [FrameworkBundle] Fix for setting a custom file link format (fixes #1652) 2011-07-12 19:01:49 +02:00
Joseph Bielawski
31317ccf61 [Validator] Sync polish translation 2011-07-12 09:57:21 -07:00
jdreesen
6d87e6715d [FrameworkBundle] Updated German validator translation 2011-07-12 18:51:04 +02:00
Geoffrey Tran
91cfb24e40 Made namespace for Doctrine cache unique to each environment
Solves issues with the cache not being valid for the DBAL ACL provider using D2 as the cache and switching environments.

An exception has been thrown during the rendering of a template ("Warning: Illegal offset type in isset or empty in ../vendor/symfony/src/Symfony/Component/Security/Acl/Dbal/AclProvider.php line 404")
2011-07-12 11:50:37 -05:00
marc.weistroff
dc14f68171 Added fr translation. 2011-07-12 18:08:54 +02:00
Fabien Potencier
fe6f23163e removed unused use statements 2011-07-12 17:58:39 +02:00
Fabien Potencier
88d915d175 [Validator] fixed Min and Max validator when the input value is not a number (now return an error message instead of an exception which does not make sense in this context) 2011-07-12 17:40:02 +02:00
Emil Einarsson
b96e0d3fea Updated some awkward swedish validator message translations. 2011-07-12 07:17:31 -07:00
Fabien Potencier
51dd916cc8 merged branch vicb/routing/route-annotation (PR #1650)
Commits
-------

2a24603 [Routing] Allow multiple `@Route` annotations with a default name on a single method (fixes #1647)

Discussion
----------

[Routing] Allow multiple `@Route` annotations with a default name

[Routing] Allow multiple `@Route` annotations with a default name on a single method (fixes #1647)

Before this change, the default name would be the same for multiple `@Route` with a default name on the same method. Then only the last declared route is active.

The defaults names are (for consecutive `@Route`s):

  * former_default,
  * former_default_1,
  * former_name,
  * former_default_2,
  * ...

The FrameworkExtraBundle needs to be updated in sync with this PR: https://github.com/sensio/SensioFrameworkExtraBundle/pull/50
2011-07-12 15:41:38 +02:00
Victor Berchet
2a24603061 [Routing] Allow multiple @Route annotations with a default name on a single method (fixes #1647) 2011-07-12 15:30:32 +02:00
yktd26
b2ce732bf9 added chinese translations for validator messages 2011-07-12 15:13:38 +02:00
Fabien Potencier
5eaf884cda [Process] fixed CS 2011-07-12 08:16:22 +02:00
Fabien Potencier
f2a301bc6c merged branch import/master (PR #1637)
Commits
-------

95ca258 Fixed problems with running processes returns wrong exitcode (-1) on Linux.

Discussion
----------

#1636

Fixed problems with running processes returns wrong exitcode (-1) on Linux.

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

by schmittjoh at 2011/07/11 11:07:42 -0700

This doesn't concern this PR specifically, but can we somehow start adding tests for this class? The process component seems like the by far most unstable code that we have.

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

by fabpot at 2011/07/11 23:07:43 -0700

@schmittjoh: Problem is that the behavior highly depends on the platform and PHP version.

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

by fabpot at 2011/07/11 23:14:23 -0700

@schmittjoh: By the way, we have added a bunch of tests recently (2d29a82412 (tests)/Symfony/Tests/Component/Process). Things are also "unstable" because the behavior depends on the amount of input, the amount of output, and when things happens. That means that it is also impossible to cover all possible cases reliably.
2011-07-12 08:15:25 +02:00
Fabien Potencier
baa35f51db merged branch craue/patch-6 (PR #1638)
Commits
-------

d34caee merged and unified blocks `field_label` and `form_label` into `generic_label`

Discussion
----------

merged and unified blocks `field_label` and `form_label` into `generic_label`
2011-07-12 08:10:09 +02:00
Tobias Sjösten
4764cfb8d6 [FrameworkBundle] Added Swedish translation 2011-07-11 23:51:58 +02:00
Francis Besset
f91f4dda13 Added the possibility to set cookies with the same name for different domains and paths for Symfony\Component\HttpFoundation\ResponseHeaderBag
ResponseHeaderBag::hasCookie() and ResponseHeaderBag::getCookie() were removed
2011-07-11 23:03:26 +02:00
Christian Raue
d34caeea3a merged and unified blocks field_label and form_label into generic_label 2011-07-11 12:06:28 -07:00
Francis Besset
f08eeb4433 Moved managing cookies of HeaderBag in ResponseHeaderBag
By example, a cookie can't be set in a request
2011-07-11 19:50:24 +02:00
Osman Üngür
95ca258a42 Fixed problems with running processes returns wrong exitcode (-1) on Linux. 2011-07-11 09:37:49 -07:00
Fabien Potencier
9a6aafa83f added missing required classes on form label 2011-07-11 18:37:09 +02:00
Fabien Potencier
e718a51b59 [DependencyInjection] fixed un-detected circular references involving aliases 2011-07-11 18:25:40 +02:00
Fabien Potencier
be31bc091e [DependencyInjection] made a small performance optimization 2011-07-11 17:55:12 +02:00
Fabien Potencier
f0f83a9f6e merged branch stof/exception_listener (PR #1633)
Commits
-------

11369eb Fixed phpdoc
dbe1854 Added a AccessDeniedHttpException to wrap the AccessDeniedException.

Discussion
----------

Added a AccessDeniedHttpException to wrap the AccessDeniedException.

This is a proposal to fix #1631

It wraps the AccessDeniedException in an AccessDeniedHttpException when the firewall is not able to handle it itself. This allows getting a 403 response using the standard exception listener in this case.

Note that the app should not throw the AccessDeniedHttpException itself but keep using the AccessDeniedException to let the Security component check if the user is already fully authenticated or if it should give a chance to authenticate.

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

by fabpot at 2011/07/11 07:10:12 -0700

For reference, I've tried something more radical some time ago here: https://github.com/symfony/symfony/pull/369.

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

by stof at 2011/07/11 07:22:07 -0700

my implementation is what @schmittjoh suggested in the comments on your PR.
2011-07-11 17:02:32 +02:00
Fabien Potencier
00c7e91182 [HttpKernel] removed special case when using the CLI
* This special case means that functional tests run from the CLI behave differently
* It means that web servers created in PHP behave differently
2011-07-11 16:13:15 +02:00
Christophe Coevoet
11369eb7e4 Fixed phpdoc 2011-07-11 14:08:49 +02:00
Christophe Coevoet
dbe1854e1f Added a AccessDeniedHttpException to wrap the AccessDeniedException.
See #1631
2011-07-11 13:12:24 +02:00
jdreesen
f0765618de [FrameworkBundle] Synced German validator translation 2011-07-11 12:41:21 +02:00
Arnout Boks
bf7ca509a2 [FrameworkBundle] Synced Dutch validator translation 2011-07-11 12:06:18 +02:00
Fabien Potencier
8a653f2335 merged branch stloyd/patch-1 (PR #1629)
Commits
-------

e54ad66 [Validator] Polish translation sync.

Discussion
----------

[Validator] Polish translation sync.
2011-07-11 11:57:54 +02:00
Fabien Potencier
6a7359389d removed usage of \Exception as PHPUnit won't allow to catch them anymore in the next major version 2011-07-11 11:54:00 +02:00
Joseph Bielawski
e54ad66e7d [Validator] Polish translation sync. 2011-07-11 02:48:27 -07:00
Fabien Potencier
41210b07c7 [FrameworkBundle] fixed form PHP templates for previous merge 2011-07-11 11:38:46 +02:00
Fabien Potencier
4e605aa761 merged branch Seldaek/form_tpl (PR #1519)
Commits
-------

52fdd53 [Bridge/Twig] Add required class to labels that match required fields

Discussion
----------

[Bridge/Twig] Add required class to labels that match required fields

I have used this to simply style labels that are required with a red star behind them using this CSS:

``` css
label.required::after {
	content: " *";
	color: #c00;
}
```

The problem is that you can't use `input[required] + label::after` as a selector since the label is typically rendered before the input. There is no way to check for an element that is *followed by* another, only elements *following*.

Of course this CSS in particular won't work except in the latest browsers, but you could still use the `label.required` selector to add a background image and so on. I think this is a very common use case and therefore I think it'd benefit the core framework.

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

by fabpot at 2011/07/05 01:27:49 -0700

Can you also update the PHP templates?

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

by schmittjoh at 2011/07/05 01:43:33 -0700

How about namespacing these css classes, like for example "sf-form-required"?

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

by stloyd at 2011/07/05 01:50:58 -0700

I would prefer an @schmittjoh naming, or even adding ability to setup it thought options.

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

by fabpot at 2011/07/05 01:54:36 -0700

Please, do not add more options. Prefix with `sf` is actually a good idea but people will argue that this is not a good idea because it gives too much information about the technology used to create the website (that's one of the things that came up pretty often in symfony1).

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

by schmittjoh at 2011/07/05 02:00:11 -0700

An option is not such a good idea imo since you likely want to have a uniform naming strategy across your entire site. How about adding a new service CssNamingStrategy?

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

by stloyd at 2011/07/05 02:01:19 -0700

Then this can be some simpler one not giving such informations i.e.: `form-label-required`, `label-required`, `framework-form-required`, `form-required` or whatever else ;-)

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

by fabpot at 2011/07/05 02:16:41 -0700

It cannot be configurable as it would potentially break bundles that come with stylesheets.

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

by stloyd at 2011/07/05 02:21:10 -0700

IMO if we decide to add this one, we could add same to `inputs/selects/etc` with `required` option.

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

by schmittjoh at 2011/07/05 02:21:59 -0700

I think it can, consider an interface like this:

```php
interface CssNamingStrategyInterface
{
    function getCssName($class);
}
```

This will give people a lot of flexibility, and it also does allow them to exclude classes which for example are provided by third-party bundles.

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

by Seldaek at 2011/07/05 02:47:54 -0700

Wow guys, if this turns into a full blown class generator solution, I'm happy to close the PR.

"required" is not a name that's commonly used for main page elements, it's typically associated with forms, and therefore I don't see the need to make it unnecessary longer/namespaced. Similarly I don't see the need to add it to the input/select/.., because they already have an attribute, which you can very easily select as: `input[required]` in CSS. That works everywhere except IE6, but we can't build for the future on very old browsers. If you really want support for IE6, you can override the templates imo. But core should be looking forward, as it already is with HTML5, form markup, etc.

As for calling it form-label-required or label-required, again, I don't see the benefit, you can use `label.required` if you want to avoid conflicts with non-label elements having a required class, or a safer `form .required`. There are plenty of options in CSS itself, let's not make this overly complex.

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

by schmittjoh at 2011/07/05 02:52:17 -0700

see
http://code.google.com/intl/de-DE/speed/page-speed/docs/rendering.html#UseEfficientCSSSelectors

On Tue, Jul 5, 2011 at 11:47 AM, Seldaek <
reply@reply.github.com>wrote:

> Wow guys, if this turns into a full blown class generator solution, I'm
> happy to close the PR.
>
> "required" is not a name that's commonly used for main page elements, it's
> typically associated with forms, and therefore I don't see the need to make
> it unnecessary longer/namespaced. Similarly I don't see the need to add it
> to the input/select/.., because they already have an attribute, which you
> can very easily select as: `input[required]` in CSS. That works everywhere
> except IE6, but we can't build for the future on very old browsers. If you
> really want support for IE6, you can override the templates imo. But core
> should be looking forward, as it already is with HTML5, form markup, etc.
>
> As for calling it form-label-required or label-required, again, I don't see
> the benefit, you can use `label.required` if you want to avoid conflicts
> with non-label elements having a required class, or a safer `form
> .required`. There are plenty of options in CSS itself, let's not make this
> overly complex.
>
> --
> Reply to this email directly or view it on GitHub:
> https://github.com/symfony/symfony/pull/1519#issuecomment-1502560
>

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

by Seldaek at 2011/07/05 03:11:50 -0700

Really? Come on, we're talking about forms, it's not like you have billions of form/input tags per page that have to be parsed by the browser when you select that. Also you don't have to select the elements, if you want true performance just use no stylesheet, your users will thank you.

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

by schmittjoh at 2011/07/05 03:30:40 -0700

Your CSS selectors not only affect the performance of form elements, but of all elements that have a "required" class. Likewise, the same applies if we decide to add more classes.

Why close the door for people who care about performance? We can easily avoid this by making the css class more specific as suggested earlier. The idea with the renaming strategy is one step further and allows people to "obfuscate" which tool was used to generate the form, or do additional optimizations like shortening the css name.

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

by lenar at 2011/07/05 03:34:34 -0700

@Seldaek: Just for remark I've seen matrix forms spanning multiple screenfuls horizontally and vertically
containing tens of thousands inputs. Not pretty, but they do exist. Basically "poor" man's/company's excel
emulation or something.

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

by Seldaek at 2011/07/05 04:19:13 -0700

@schmittjoh, @lenar: We're catering to the most common use case, for which this will be more than fast enough. Small/medium scale websites don't have to optimize on CSS rules parsing, they usually have much bigger issues to deal with. If you really care about it, overriding the block to remove the class is just as easy as it was to for me to add it, but IMO this is the edge case.

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

by schmittjoh at 2011/07/05 05:37:19 -0700

IMO Symfony should follow best practices by encouraging to use class selectors, and not tag selectors for the reasons explained on the page I linked.

Anyway, I think everybody made his points. Time for @fabpot to make a decision :)
2011-07-11 11:32:26 +02:00
Fabien Potencier
fa78e78f5f [HttpFoundation] added some information in a phpdoc 2011-07-11 11:30:24 +02:00
Fabien Potencier
7f960a10f2 merged branch gbirke/form_error_docs (PR #1599)
Commits
-------

22a49f1 Better docstring for FormError constructor

Discussion
----------

Better docstring for FormError constructor

Better docs for placeholder format of FormError.
2011-07-11 11:28:00 +02:00
Fabien Potencier
c188ca85b9 merged branch vicb/form/translate (PR #1627)
Commits
-------

24e0d71 [FrameworkBundle] Fix a translatable string from the Form default validator
30d348d [Form] Make the default invalid message translatable

Discussion
----------

[Form] Translation

The first commit adds the ability to customize the default message when the form is invalid:

  * Make it an option in the form builder,
  * Allow placeholders in the message,
  * The default value `This value is not valid` exists in the translation files.

The second commit updates a source string in the XLIFF files to make it translatable. All translations should be updated accordingly. The source string is from the [default validator](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Form/Extension/Core/Validator/DefaultValidator.php#L27).

This PR should fix The issue #997.

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

by fabpot at 2011/07/11 01:53:05 -0700

The first commit is not about making the message translatable, but to make it customizable (as the message is used for very different purposes depending on the Type).

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

by fabpot at 2011/07/11 01:55:11 -0700

The "This value is not valid" string should be added to the translation files too.

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

by vicb at 2011/07/11 02:02:51 -0700

@fabpot it was not translatable as the name was hardcoded in the message (instead of using a placeholder). So yes it becomes translatable now (and "customize"able as explained in the PR message).

I have also removed the form name from the default message as I don't think it brings any added value.

`This value is not valid` already exists in the translation files (see id=24).
2011-07-11 11:25:45 +02:00
Fabien Potencier
0e4d057984 moved some RFC-tweaking logic in Response to a public method to make it reusable 2011-07-11 11:22:12 +02:00
Fabien Potencier
1a576552f8 [HttpFoundation] fixed unit test for previous merge 2011-07-11 11:02:30 +02:00
Fabien Potencier
de2ab0b506 merged branch lenar/patch-3 (PR #1551)
Commits
-------

f7d0f65 RFC2616 changes
b9a218a [HttpFoundation] set Content-Length header to the length of content

Discussion
----------

[HttpFoundation] set Content-Length header to the length of content

I can't think of why this could be bad but if somebody knows please chime in.

The good thing is that with this change keepalive will work out of the box.

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

by Seldaek at 2011/07/06 05:34:51 -0700

That sounds like a great change. I think it might explain/fix the issues I've encountered with AppCache on my production box. Never had time to look into it, but IIRC I noticed the missing Content-Length, and it seemed to load forever.

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

by fabpot at 2011/07/06 06:46:50 -0700

The `Content-Length` is automatically added by servers like Apache. Moreover, sometimes, you should not add it: http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.4

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

by lenar at 2011/07/06 07:54:45 -0700

It is not added automatically by default. Yes, in case of Apache it is actually added if deflate module is enabled and if that module decides to compress the content (decision based on content-type).

About RFC2616: I will read it and add changes to this PR if applicable.

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

by fabpot at 2011/07/06 08:38:14 -0700

e943fde2ef

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

by Seldaek at 2011/07/06 08:45:22 -0700

@lenar all you have to do is skip setting the Content-Length for `1xx`, `204`, and `304` responses I believe.

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

by Seldaek at 2011/07/06 08:46:54 -0700

But this should maybe be done in sendHeaders() à la `fixContentType`, because you can't be sure about the statusCode before that.

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

by lenar at 2011/07/06 13:55:33 -0700

I propose this based on what I read and understood from RFC2616.

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

by mheleniak at 2011/07/10 03:57:26 -0700

+1
2011-07-11 10:58:31 +02:00
DerStoffel
377ef7974f Error Message id 1 & 2 changed in "true" & "false", since direct german translation (wahr, falsch) are properly missleading. Corrected typos. 2011-07-11 01:18:45 -07:00
Victor Berchet
24e0d71d92 [FrameworkBundle] Fix a translatable string from the Form default validator 2011-07-11 08:41:58 +02:00
Victor Berchet
30d348d18d [Form] Make the default invalid message translatable 2011-07-11 08:36:37 +02:00
Fabien Potencier
21c80df3a1 merged branch arnaud-lb/issues/1598 (PR #1603)
Commits
-------

e6a2d76 delay resolving values of extensions config until all files are loaded

Discussion
----------

[DependencyInjection] Delay resolving values of extensions' config until all files are loaded

This addresses #1598.

This delays resolving of extensions' configuration until all files are loaded. Without this, overriding parameters do not work for extensions.
2011-07-11 08:15:47 +02:00
Fabien Potencier
ea7a0eb19c [Security] fixed redirection URLs when using {_locale} in the pattern 2011-07-11 08:09:36 +02:00
Fabien Potencier
9301ad00fd merged branch tero/master (PR #1624)
Commits
-------

0149ba9 Added finnish translation for validator messages

Discussion
----------

Created finnish translation file for validator messages
2011-07-10 21:55:14 +02:00
Fabien Potencier
ff92ba79f0 merged branch davideborsatto/translation-it (PR #1623)
Commits
-------

f359e3d Updated italian translations

Discussion
----------

Updated and corrected italian translations

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

by davideborsatto at 2011/07/10 12:41:29 -0700

Previously they were not translated that good, plus there were a few typos here and there.
2011-07-10 21:53:42 +02:00
Tero Alén
0149ba99d6 Added finnish translation for validator messages 2011-07-10 22:44:49 +03:00
Davide Borsatto
f359e3db18 Updated italian translations 2011-07-10 12:37:17 -07:00
Guilherme Blanco
89c8962574 Fixed minor portuguese brazilian messages. File is pretty much up to date, just small glitches. 2011-07-10 12:19:10 -07:00
Fabien Potencier
1a5b14d49d merged branch xmontana/master (PR #1618)
Commits
-------

b8b8869 updated translation to catalan

Discussion
----------

Edited src/Symfony/Bundle/FrameworkBundle/Resources/translations/validators.ca.xliff
2011-07-10 19:53:41 +02:00
Fabien Potencier
99f5eac71a merged branch wtfzdotnet/patch-2 (PR #1619)
Commits
-------

0be00c1 Edited src/Symfony/Bundle/FrameworkBundle/Resources/translations/validators.nl.xliff via GitHub

Discussion
----------

Edited src/Symfony/Bundle/FrameworkBundle/Resources/translations/validato

Edited src/Symfony/Bundle/FrameworkBundle/Resources/translations/validators.nl.xliff via GitHub
2011-07-10 19:53:25 +02:00
Fabien Potencier
f88a7a78b0 merged branch 77web/add_ja_translation_11_july (PR #1620)
Commits
-------

d53f312 changed "should" to "must" in message 6 and 7. also moved message 32 as replacement of message 5, according to note by yethee
e151c80 updated japanese translations

Discussion
----------

updated japanese translations

Please update japanese translations.
I  picked up some messages from the latest sources of validation classes on your master branch, because translations for many other languages seems not to contain messages for recent validator classes, such as Image,Ip,Locale,Language.
Thanks in advance!

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

by yethee at 2011/07/10 09:23:01 -0700

> "One or more..." is on message#33 in my commit, should I locate #33 just after #5?

Not necessarily, the order of messages is not important, AFAIK.
2011-07-10 19:53:09 +02:00
77web
d53f312e2b changed "should" to "must" in message 6 and 7. also moved message 32 as replacement of message 5, according to note by yethee 2011-07-11 00:50:09 +09:00
Michael Roterman
0be00c13dd Edited src/Symfony/Bundle/FrameworkBundle/Resources/translations/validators.nl.xliff via GitHub 2011-07-10 08:24:56 -07:00
Xmontana
b8b8869f05 updated translation to catalan 2011-07-10 17:07:42 +02:00
77web
e151c805a0 updated japanese translations 2011-07-10 23:53:04 +09:00
Fabien Potencier
29460becde merged branch drm/master (PR #1615)
Commits
-------

9714cfc Fixes fatal error when intl module is not installed.

Discussion
----------

Session instantiation breaks with Fatal error if intl module is not installed.

A check for class_exists in setPhpDefaultLocale() fixes this, though I got the feeling it should be resolved with a proxy or subscriber object; setPhpDefaultLocale feels like a hack now.

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

by stealth35 at 2011/07/10 06:32:43 -0700

Locale::setDefault don't throw any exception
Maybe just :

```php
if (class_exists('Locale', false)) {
    return \Locale::setDefault($this->locale);
} else {
    return false;
}
```
2011-07-10 15:34:36 +02:00
Vladislav
cd7eb02816 Edited src/Symfony/Bundle/FrameworkBundle/Resources/translations/validators.ru.xliff via GitHub 2011-07-10 06:28:16 -07:00
drm
9714cfc4f9 Fixes fatal error when intl module is not installed. 2011-07-10 15:15:04 +02:00
Javier Eguíluz
bb6eefed55 [FrameworkBundle] Updated Spanish validator translations 2011-07-10 13:39:21 +02:00
Fabien Potencier
86356661f7 merged branch beberlei/Issue1376 (PR #1612)
Commits
-------

08b4219 [DoctrineBridge] Issue #1376 - Unique Validator does not work with null values

Discussion
----------

Issue1376

[DoctrineBridge] Issue #1376 - Unique Validator does not work with null values
2011-07-10 11:14:23 +02:00
Benjamin Eberlei
08b4219347 [DoctrineBridge] Issue #1376 - Unique Validator does not work with null values 2011-07-10 11:06:21 +02:00
Deni
c3f89992b5 [FrameworkBundle] Fixes Russian translations for the validators. 2011-07-10 12:47:22 +04:00
Fabien Potencier
21cf0b15ab merged branch yethee/ru_translations (PR #1601)
Commits
-------

c1cab27 [FrameworkBundle] Updated Russian translations for validators.

Discussion
----------

[FrameworkBundle] Updated Russian translations for validators.

Sync translations with the actual validator constraints.

Removed some translations (they are not found among the constraints):

  - `This value should be instance of class {{ class }}`
  - `This field group should not contain extra fields`
  - `The uploaded file was too large. Please try to upload a smaller file`
2011-07-10 09:58:31 +02:00
Fabien Potencier
bbf2f05566 merged branch excelwebzone/hebrew_translations (PR #1605)
Commits
-------

801e578  Add hebrew translations

Discussion
----------

Add hebrew translations
2011-07-10 09:56:53 +02:00
excelwebzone
801e578112 Add hebrew translations 2011-07-09 10:37:38 -07:00
Arnaud Le Blanc
e6a2d76366 delay resolving values of extensions config until all files are loaded 2011-07-09 18:03:05 +02:00
Christophe Coevoet
7517fa4448 [DoctrineBundle] Fixed the transient test 2011-07-09 16:52:49 +02:00
Deni
c1cab277be [FrameworkBundle] Updated Russian translations for validators. 2011-07-09 18:49:22 +04:00
Christophe Coevoet
f21dc42358 [DoctrineBundle] Fixed the Registry::getEntityManagerForObject method 2011-07-09 16:31:24 +02:00
Gabriel Birke
22a49f14df Better docstring for FormError constructor 2011-07-09 16:14:57 +02:00
Joseph Bielawski
c1866e3710 Profiler search typo 2011-07-09 00:42:37 -07:00
Fabien Potencier
4a7b7597d8 merged branch marcw/validator-choice (PR #1577)
Commits
-------

df57e0f [Validator] Added strict option to ChoiceConstraint.

Discussion
----------

[Validator] Added strict option to ChoiceConstraint.

By default, ChoiceValidator was ensuring strict type when checking if value is present in choices. This behavior is a problem when you want to validate against integer values. As all data you will receive from a request will be typed as a string, you won't be able to validate these numeric values.
This patch solves this.

In order for being nice to developers, I've set "strict" to false by default.
2011-07-09 09:19:08 +02:00
Fabien Potencier
2a5bf56a3a merged branch ornicar/redirectResponseIndentation (PR #1589)
Commits
-------

6c736c9 Fix RedirectResponse HTML indentation and constructor phpDoc

Discussion
----------

Fix RedirectResponse HTML indentation and constructor phpDoc

Removes extra indents from the redirection response content.
2011-07-09 09:15:20 +02:00
Alif Rachmawadi
937af2f7d2 add indonesian translations 2011-07-09 09:52:20 +07:00
ornicar
6c736c936f Fix RedirectResponse HTML indentation and constructor phpDoc 2011-07-08 18:14:45 -07:00
Fabien Potencier
aed87c50f0 merged branch aboks/dutch_translations (PR #1586)
Commits
-------

45c2da7 [FrameworkBundle] Updated Dutch validator translations

Discussion
----------

[FrameworkBundle] Updated Dutch validator translations

Synchronized Dutch validator translations for some recent changes.
2011-07-08 10:45:31 +02:00
Fabien Potencier
103e9d1c6e merged branch sortex/sk_translations (PR #1584)
Commits
-------

d0258dd [FrameworkBundle]Slovak translations

Discussion
----------

Slovak translations

Slovak translations for framework bundle
2011-07-08 10:45:14 +02:00
Arnout Boks
45c2da75cf [FrameworkBundle] Updated Dutch validator translations 2011-07-08 10:39:56 +02:00
Sortex
d0258dd483 [FrameworkBundle]Slovak translations 2011-07-08 09:23:39 +02:00
Fabien Potencier
8cba4903d8 [Process] removed workaround as it seems to not work anymore after the recent changes 2011-07-08 09:14:48 +02:00
Fabien Potencier
c85fd081c8 [FrameworkBundle] fixed _internal route when the path contains dots 2011-07-07 17:25:53 +02:00
marc.weistroff
df57e0fe9a [Validator] Added strict option to ChoiceConstraint. 2011-07-07 15:11:36 +02:00
Fabien Potencier
0753f86dc1 [Translation] fixed CS 2011-07-07 12:27:49 +02:00
Fabien Potencier
d184b33bff merged branch stealth35/patch-8 (PR #1576)
Commits
-------

bb1b480 [Translation][Loader] CSV controls for CsvFileLoader

Discussion
----------

[Translation][Loader] CSV controls for CsvFileLoader
2011-07-07 12:26:16 +02:00
Fabien Potencier
0b0356f348 [HttpKernel] fixed exception handler when an exception is thrown during handling 2011-07-07 12:24:58 +02:00
stealth35
bb1b48046d [Translation][Loader] CSV controls for CsvFileLoader 2011-07-07 02:46:07 -07:00
Fabien Potencier
4f9060c929 [Routing] added back a comment that were deleted previously 2011-07-07 11:11:30 +02:00
Fabien Potencier
c061b4576b merged branch Seldaek/urlgen (PR #1573)
Commits
-------

ac1448f [Routing] Revert to rawurlencode + whitelisting of '/'

Discussion
----------

[Routing] Revert to rawurlencode + whitelisting of '/'

After more discussion on 761724ae57 - sorry you merged too fast for once ;)
2011-07-07 11:08:08 +02:00
Fabien Potencier
cce2bc59a8 fixed CS 2011-07-07 11:07:02 +02:00
Fabien Potencier
9b3c2ca3d3 merged branch vicb/uploaded-file/max-size (PR #1574)
Commits
-------

6786e81 [HttpFoundation] code factorization in UploadedFile

Discussion
----------

[HttpFoundation] code factorization in UploadedFile

As both #1542 and #1544 have been merged.
2011-07-07 11:06:29 +02:00
Fabien Potencier
76a5816d60 [HttpKernel] fixed recursion when flattenning an exception stack trace 2011-07-07 10:59:18 +02:00
Victor Berchet
6786e81f61 [HttpFoundation] code factorization in UploadedFile 2011-07-07 10:47:10 +02:00
Jordi Boggiano
ac1448f573 [Routing] Revert to rawurlencode + whitelisting of '/' 2011-07-07 10:44:17 +02:00
Fabien Potencier
2ec4b04547 merged branch Seldaek/urlgen (PR #1569)
Commits
-------

6039569 [Routing] Add # and ? to escaped chars

Discussion
----------

[Routing] Add # and ? to escaped chars

See comments on 761724ae57
2011-07-07 09:44:11 +02:00
Fabien Potencier
59870bfe02 fixed typo 2011-07-07 09:42:47 +02:00
Fabien Potencier
3a5d508766 [Console] replaced fgets by stream_get_line in DialogHelper
Problem with fgets is that false means two things: an error or the end of the stream.
That's ok for STDIN, but it becomes a problem when using another stream (in a unit test for instance).
2011-07-07 09:41:45 +02:00
Jordi Boggiano
603956979c [Routing] Add # and ? to escaped chars 2011-07-07 09:38:15 +02:00
Fabien Potencier
7eec2ca7b3 [Form] added a form type name validator 2011-07-07 09:16:13 +02:00
Fabien Potencier
db415db0af [HttpFoundation] tweaked previous merge 2011-07-07 07:41:40 +02:00
Fabien Potencier
c41da9d447 merged branch ktomk/patch-1 (PR #1558)
Commits
-------

db37bbb HTTP 1.1 / RFC 2616 - Make Redirect response HTTP body having a HTML body.

Discussion
----------

[HttpFoundation] Redirect response is missing a HTML body

HTTP 1.1 / RFC 2616 - Make Redirect response HTTP body having a HTML body as "...the entity of the response SHOULD contain a short hypertext note with a hyperlink to the new URI(s)." (unless HEAD request, see response codes 301, 302, 303 and 307).

See [10.3 Redirection 3xx *in* Hypertext Transfer Protocol -- HTTP/1.1 (RFC 2616 Fielding, et al.)](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3) and [9.3 Redirection 3xx *in* Hypertext Transfer Protocol -- HTTP/1.0](http://tools.ietf.org/html/rfc1945#section-9.3).

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

by stloyd at 2011/07/06 10:50:50 -0700

As we allow changing protocol version, and by [default](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpFoundation/Response.php#L88) use 1.0 this should have an use also `$this->getProtocolVersion()`.

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

by ktomk at 2011/07/06 10:57:48 -0700

(Updated the original comment and linked the HTTP 1.0 specs in there)

Just have reviewed the RFCs and the processing inside `[HttpFoundation]`.  The response class [identifies the following status codes as redirects](db37bbb189/src/Symfony/Component/HttpFoundation/Response.php (L741)): `201`, `301`, `302`, `303` and `307`. That's quite the same list I compiled above where I did only check for 3xx codes. In HTTP/1.0 (symfony default) the 201 response can contain the new location in it's entity (body) of the response (in contrast, [RFC 1945 is *not* talking about the location header explicitly](http://tools.ietf.org/html/rfc1945#section-9.2); see as well [10.11  Location](http://tools.ietf.org/html/rfc1945#section-10.11), that's [in HTTP/1.1 done](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.2), compare [14.30 Location](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.30)).

So I would say HTTP 1.0 is properly reflected with the changes as well and the concrete Response object [is already taking care for protocol validity](db37bbb189/src/Symfony/Component/HttpFoundation/RedirectResponse.php (L41)).
2011-07-07 07:37:39 +02:00
Fabien Potencier
bb5075d820 [HttpFoundation] prevented Response headers to be sent twice
This change allows for more flexibility if the developer wants to flush
the Response content early (the drawback being that Response listeners
won't be able to tweak the HTTP headers anymore).

There is another benefit: avoid the infamous
"Fatal error: Exception thrown without a stack frame in Unknown on line 0".

Here is a small scenario when this can happen (thanks dtee for identifying this issue):

* Call flush() in controller to output html early, then throw exception
* ExceptionHandler triggers handle() function and return new Response object to output...
* Because the header is sent (flush() call in Controller), php's E_WARNING error get raised, which gets handled by ErrorHandler->handle() and it throws new ErrorException()
* PHP fatals to prevent Exception loop: "Fatal error: Exception thrown without a stack frame in Unknown on line 0"
2011-07-07 07:34:35 +02:00
Fabien Potencier
6645cb44c7 merged branch dlsniper/romanian-validation (PR #1568)
Commits
-------

8a6ac0c Added Romanian translations for validators

Discussion
----------

[Validator] Added Romanian translations

Added all strings up to commit SHA: d58ba34246
2011-07-07 07:10:20 +02:00
Fabien Potencier
430b5cdfa9 merged branch lenar/validator-et (PR #1567)
Commits
-------

b4cdecd Additional et translations

Discussion
----------

[Validator] Additional Estonian translations
2011-07-07 07:09:45 +02:00
Florin Patan
8a6ac0ce4e Added Romanian translations for validators 2011-07-06 18:59:43 -04:00
lenar
b4cdecd423 Additional et translations 2011-07-07 00:24:48 +03:00
jdreesen
39d3a90b6c Sync German translation with commit: d58ba34246 2011-07-06 22:55:00 +02:00
lenar
f7d0f651a3 RFC2616 changes 2011-07-06 23:50:37 +03:00
Lenar Lõhmus
b9a218a5c1 [HttpFoundation] set Content-Length header to the length of content 2011-07-06 23:47:40 +03:00
Michel Weimerskirch
c76d2b5807 Fix error message 2011-07-06 12:54:57 -07:00
Michel Weimerskirch
a5822314eb Complete Luxembourgish translation 2011-07-06 12:41:51 -07:00
Joseph Bielawski
23ec11949e Revert copy&paste 2011-07-06 10:25:12 -07:00
Joseph Bielawski
7a95330804 Sync polish translation with commit: d58ba34246 2011-07-06 10:22:51 -07:00
Tom Klingenberg
db37bbb189 HTTP 1.1 / RFC 2616 - Make Redirect response HTTP body having a HTML body. 2011-07-06 09:29:18 -07:00
Fabien Potencier
c12676b0a1 [Doctrine] added a better error message when an Entity has no __toString method defined 2011-07-06 18:10:55 +02: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
Fabien Potencier
e943fde2ef [HttpKernel] fixed HEAD requests Content-Length header 2011-07-06 17:37:42 +02:00
Christophe Coevoet
f8b5f350dc [MonologBundle] Refactored the way to configure the email prototype for swiftmailer 2011-07-06 16:25:32 +02:00
Fabien Potencier
5f6c5f02d3 removed obsolete code 2011-07-06 16:11:01 +02:00
Christophe Coevoet
874fb9540a [MonologBundle] Refactored the configuration of processors 2011-07-06 15:52:04 +02:00
Fabien Potencier
14c8cc2962 [DoctrineBundle] ensured that the ORM\ prefix is always set for CLI commands 2011-07-06 15:49:36 +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
001af2ae4a [DependencyInjection] enhanced error message 2011-07-06 15:26:21 +02:00
Fabien Potencier
bb3f5c5575 [DependencyInjection] fixed CS for previous merge 2011-07-06 15:26:08 +02:00
Fabien Potencier
907d2439cd merged branch lstrojny/master (PR #1555)
Commits
-------

133169f Better exception message for extension in XmlFileLoader

Discussion
----------

Better exception message for XmlFileLoader

Include namespace that has been looked for an registered namespaces in the exception message to ease debugging.
2011-07-06 15:18:33 +02:00
Fabien Potencier
990fb4638a merged branch everzet/console-help-printing-fix (PR #1553)
Commits
-------

fa20b51 [Console] refactored definition printer
e49d61f [Console] fixed console help printing expectations

Discussion
----------

[Console] definitions printing fix

Before this change, console component printed definitions as:

``` bash
Arguments:
 features        Feature(s) to run. Could be a dir (features/),
a feature (*.feature) or a scenario at specific line
(*.feature:10).

Options:
 --config (-c) Specify external configuration file to load. behat.yml or config/behat.yml will be used by default.
 --profile (-p) Specify configuration profile to use. Define profiles in config file (--config).
 --init Create features directory structure.

 --format (-f) How to format features. pretty is default. Available formats are
- pretty
- progress
- html
- junit
 --out Write formatter output to a file/directory instead of STDOUT (output_path).
 --colors Force Behat to use ANSI color in the output.
 --no-colors Do not use ANSI color in the output.
 --no-time Hide time in output.
 --lang Print formatter output in particular language.
 --no-paths Do not print the definition path with the steps.
 --no-snippets Do not print snippets for undefined steps.
 --no-multiline No multiline arguments in output.
 --expand Expand Scenario Outline Tables in output.

 --story-syntax Print *.feature example in specified language (--lang).
 --definitions Print available step definitions in specified language (--lang).

 --name Only execute the feature elements (features or scenarios) which match part of the given name or regex.
```

As you might see, indentation is totally broken (also notice how it prints multiline descriptions in argument and --format option).

This PR makes output looks like this:

``` bash
Arguments:
 features        Feature(s) to run. Could be a dir (features/),
                 a feature (*.feature) or a scenario at specific line
                 (*.feature:10).

Options:
 --config (-c)   Specify external configuration file to load. behat.yml or config/behat.yml will be used by default.
 --profile (-p)  Specify configuration profile to use. Define profiles in config file (--config).
 --init          Create features directory structure.

 --format (-f)   How to format features. pretty is default. Available formats are
                 - pretty
                 - progress
                 - html
                 - junit
 --out           Write formatter output to a file/directory instead of STDOUT (output_path).
 --colors        Force Behat to use ANSI color in the output.
 --no-colors     Do not use ANSI color in the output.
 --no-time       Hide time in output.
 --lang          Print formatter output in particular language.
 --no-paths      Do not print the definition path with the steps.
 --no-snippets   Do not print snippets for undefined steps.
 --no-multiline  No multiline arguments in output.
 --expand        Expand Scenario Outline Tables in output.

 --story-syntax  Print *.feature example in specified language (--lang).
 --definitions   Print available step definitions in specified language (--lang).

 --name          Only execute the feature elements (features or scenarios) which match part of the given name or regex.
```
2011-07-06 15:14:36 +02:00
Fabien Potencier
9140395b4f merged branch kertz/date_pattern (PR #694)
Commits
-------

d08a688 [Form] Fixed CS
954bdb5 [Form] Updated DateTimeType to accept a custom date pattern for the DateType child  * Added a test also about this change
e7e744f [Form] Synced changes in this branch with current Symfony master branch
436cb95 [Form] Changed to a CreateException when the 'format' option is invalid  * Updated DateTypeTest also
0045ffe [Form] Added tests to check that the date format option is validated correctly  * Format option must be either a IntlDateFormatter constants (FULL, LONG, MEDIUM, SHORT) or a string
a815232 [Form] The IntlDateFormatter pattern can now be passed via the format option  * Also changed the default value of the calendar paramter to \IntlDateFormatter:GREGORIAN    in DateTimeToLocalizedStringTransformer which is the same as the default value in    StubIntlDateFormatter
58f869a [Form] Synced custom pattern tests with master branch
c20edde [Form] Added some tests  * Tests to check if the pattern option is handled correctly by DateType  * Tests to check if the pattern parameter is handled correctly by DateTimeToLocalizedStringTransformer
52a1e1d moved date_pattern to IntlDateFormatter
dd104bc added code to use custom date_pattern

Discussion
----------

[Form] Added code to use custom date_pattern

Current DateType doesn't make use of the `date_pattern` option. Added code to use the custom `date_pattern` if provided.

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

by maoueh at 2011/05/02 21:52:37 -0700

You should also pass the pattern option to the DateTimeToLocalizedStringTransformer so the pattern is taken in consideration when converting from and to localized string. You can check the commit I did on my repository (maoueh/symfony@01ae75dd84) which do the same as yours for the DateType but also includes the modification needed by the DateTimeToLocalizedStringTransformer class.

Not sure if there is more work needed to fully support the pattern option. Moreover, I did not run the tests to check if everything pass correctly. It would also be a good idea to add some tests to check that the date_pattern is working as expected.

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

by dot-i-fy at 2011/05/02 22:02:14 -0700

There is also a problem with the regex, but this is not regarding the pattern option. If you set the 'format' option to 0, it returns the IntlDateFormatter::FULL but it does not pass the regex because there is first EEEE in the standard pattern so it comes on the fallback pattern year month day

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

by kertz at 2011/05/02 23:36:05 -0700

Thanks for your suggestions @maoueh and @dot-i-fy, I will check them.
I found the `date_pattern` doesn't work when using text widget. I will try to fix this.

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

by dot-i-fy at 2011/05/03 00:02:45 -0700

Here the regex I use now and working with IntlDateFormatter::FULL

https://gist.github.com/952929

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

by maoueh at 2011/05/03 07:13:01 -0700

@kertz: It is working for me using the text widget on my development machine. Don't know what is the problem on our side but it is working correctly for me. I'm willing to help track this problem if you want. Just let me know.

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

by dot-i-fy at 2011/05/03 07:57:34 -0700

@kertz : It is also working for me, we just have to pay attention about the format to be used in the text input regarding IntlDateFormatter.

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

by kertz at 2011/05/03 11:15:23 -0700

Ah well I guess I screwed up the whole commit log!

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

by dot-i-fy at 2011/05/03 11:19:08 -0700

wow !

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

by maoueh at 2011/05/03 11:23:51 -0700

Hell yeah! :) You should do a rebase the next time instead of merging Symfony master branch into yours:
 `git rebase symfony/master date_pattern` and when you need to push your changes to your repository, do `git push -f origin date_pattern`. This way, it will be easier for the core team to handle the merge process.

Since @dot-i-fy opened a pull request for fixing the same issue as here, maybe it would be a good idea to close this PR?

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

by kertz at 2011/05/03 11:33:34 -0700

Well, it's done. I just pushed it a little earlier that I should have! Well I didn't know that @dot-i-fy opened a PR, where is it? This patch currently works for me.

Regarding the change in regex, well I think it should also have a ChoiceList for week days, otherwise it's not useful. Probably that alone can be a separate PR.

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

by maoueh at 2011/05/03 11:46:09 -0700

Yep it is much better now :) I think it would be a good idea to remove this commit from your PR kertz/symfony@e47cfb6d49.

The other PR is [PR751](https://github.com/symfony/symfony/pull/751). Maybe @dot-i-fy could change is PR so it will only be about the regex? In both cases, you should coordinate with each other I think.

Thanks for merging the changes I made to the DateTimeToLocalizedStringTransformer class.

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

by dot-i-fy at 2011/05/03 12:00:06 -0700

Yeah, I will modify my commit to take only the regex in account.

Would someone work with me on the TimeType ? The pattern is also not working there but it looks like a little bit more complicated!

Thanks

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

by kertz at 2011/05/03 12:02:18 -0700

Thanks for the changes in DateTimeToLocalizedStringTransformer.

Is it really necessary to remove the initial commit?

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

by dot-i-fy at 2011/05/03 12:06:41 -0700

What does it mean CS ?

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

by maoueh at 2011/05/03 12:08:44 -0700

@dot-i-fy: It means Code Style, the comma is not placed correctly

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

by kertz at 2011/05/03 12:11:24 -0700

`Coding Standards` seems right :) http://symfony.com/doc/2.0/contributing/code/standards.html

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

by dot-i-fy at 2011/05/03 12:11:27 -0700

ah ok, thx

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

by maoueh at 2011/05/03 12:12:10 -0700

@kertz: I don't think it is strictly necessary to remove this commit. But I think it is a good idea since you kinda reverted it with some changes in a later commit. The core team might ask you to remove it. So leave it for now, and change it if they ask you to do so.

Hehe right, Coding Standards looks way better :)

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

by maoueh at 2011/05/03 12:30:00 -0700

@dot-i-fy: I will check later in the evening what can be done about the pattern in the TimeType class. I'm also planning on adding some tests about this PR. If I do so, I will send a PR to your repository @kertz so you will be able to add the tests to this PR.

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

by dot-i-fy at 2011/05/03 13:04:35 -0700

I had some problems with PHPUnit, seems to be ok now. Another problem, damned, APC is showing in my browser when in app_dev.php, not in prod. Any idea ? Can't get html output in dev env.

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

by dot-i-fy at 2011/05/04 00:43:46 -0700

@RapotOR : Are you talking about the dateType method in IntlDateFormatter ? If no can you make a snippet in gist with an example ?

If yes ...The option "format" already allows an IntlDateFormatter input, you can either set a \IntlDateFormatter::MEDIUM for example or an integer representing the dateType to use (0 -> full, 1 -> long, ... ).

The problem we are reveling here is the pattern based off the dateFormat option :

the $formatter look for Locale -> then for format option and based off these options he generate a pattern who can be different regarding the Locale. For example, for me I have my locale in php set to fr_BE, so my dates are always d-m-Y formatted but if I want to modify that it is momently not possible.

Grtz

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

by RapotOR at 2011/05/04 00:57:03 -0700

@dot-i-fy : my thought was more about having a full control of IntlDateFormatter from outside; instead of defining every variables. It is more like a DI way... especially if you have more than one DateType field!

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

by dot-i-fy at 2011/05/04 01:11:21 -0700

Oh so, it may be indeed a nice way to follow. Don't hesitate to submit your code suggestions.
But I think that if we go deeper in the core modifications, it is maybe a solution to take the $formatter out of the dateType class and put it in a own class and call it from the dateType class ???@}#

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

by maoueh at 2011/05/05 08:22:40 -0700

@mweimerskirch: Maybe it would be better to rename your option html_pattern? Since the pattern is not strictly associated to a date type, it would be a better name in my opinion if it was named html_pattern or html5_pattern?

I think it would lead to more misunderstandings if we had a date_pattern and a pattern option. In both cases, I agree totally that one or the other needs a renaming. Moreover, if we change the pattern option in the date type, I think the format option should be changed also to date_format.

What do you think?

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

by kertz at 2011/05/05 23:58:21 -0700

@mweimerskirch

I too think when we specify `pattern` in `DateType` everyone expects it to be the date pattern. So maybe renaming the HTML5 pattern to `html_pattern` would be more appropriate?

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

by bschussek at 2011/05/18 12:20:56 -0700

Looks good. Why don't we reuse the "format" option for this? If "format" is not one of the predefined constants, we could treat it as a custom date format.

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

by maoueh at 2011/05/18 12:28:22 -0700

@bschussek: I think it is a good idea indeed. When I first played with forms, I thought that the purpose of the format option was exactly for this but I soon realized it wasn't. I'm +1 for this.

@kertz: Let me know if you don't have time to do this switch, I will gladly submit the changes to you own repo if we agree to use "format" option instead of the "pattern" one.

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

by dot-i-fy at 2011/05/18 12:33:33 -0700

``format`` and ``pattern`` options are related to the IntlDateFormatter, I also agree with you but we have to keep in mind that we will loose the symmetry with the IntlDateFormatter class.

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

by bschussek at 2011/05/18 13:39:07 -0700

I think we can safely add this level of abstraction.

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

by kertz at 2011/05/18 20:29:11 -0700

@maoueh Would be great if you can make the changes :)

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

by dot-i-fy at 2011/05/19 09:09:41 -0700

@bschussek : I saw you removed pattern option, what are further intentions ?

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

by maoueh at 2011/05/19 09:42:40 -0700

@kertz: I will do the changes needed tomorrow as I have some spare times. You will need to sync your branch with current master or I will need to send another PR since @bschussek removed the pattern option which will cause bad conflicts with this implementation.

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

by kertz at 2011/05/20 06:45:22 -0700

@maoueh I've merged the changes.

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

by kertz at 2011/05/20 07:11:36 -0700

@maoueh I just removed a couple of commits from the log. Seems like the tests you committed are now missing from the PR. Can you please send the tests once again? Sorry about that.

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

by maoueh at 2011/05/20 09:03:52 -0700

@kertz: I will resend them along with the code modifications to use `format` instead of `pattern`.

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

by maoueh at 2011/05/20 19:11:28 -0700

I did the changes to make it possible to pass a custom pattern via the format option. I sent a PR on @kertz repository [here](https://github.com/kertz/symfony/pull/2) that will be merge eventually in this PR.

I have two small questions about it. First, since format option can now be a string, the allowed values for the option `format` have been removed from the array returned by `getAllowedOptionValues`. The check is done instead in the method `buildForm` directly. The 'format' option can be either one of the `IntlDateFormatter` constants (FULL, LONG, MEDIUM, or SHORT) or a string. If those conditions are not respected, a `FormException` is thrown. Is this correct?

When the `format` option is a custom pattern, the IntlDateFormatter needs a valid format even if it will not be used. So I retrieved the default format option by using the `getDefaultOptions` method. Is this correct or should I specify the default value directly:

this (specify directly):

    $format = \IntlDateFormatter::MEDIUM;

instead of (use predefined defaults):

    $defaultOptions = $this->getDefaultOptions($options);
    $format = $defaultOptions['format'];

Also added more tests to verify that the format option is validated correctly and updated previous ones.

Regards,
Matt

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

by kertz at 2011/05/20 20:38:32 -0700

Merged the changes. I have not tested this yet... Thanks @maoueh :)

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

by dot-i-fy at 2011/05/20 22:48:47 -0700

nice job @maoueh

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

by mprizmic at 2011/06/16 14:06:47 -0700

what do you think about
$pattern = $form->getAttribute('pattern');
instead of
$pattern = $form->getAttribute('formatter')->getPattern();
in line 96 of
symfony/component/form/extension/core/type/datetype.php

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

by maoueh at 2011/06/16 14:40:37 -0700

It is simpler to use the pattern of the formatter directly I think. The reason is that if the option to change the format is null, the default pattern of the formatter will be available and will be the right pattern to use. If the option is set, we modify the formatter before hand so getting the pattern from it will return the custom pattern we have set in the options.

So in both cases, no conditional is required to verify if it is set or not when retrieving the pattern from the formatter. Moreover, I think the pattern must be set as an attribute of the form for your suggestion to work correctly which is not the case right now.

Regards,
Matt

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

by stloyd at 2011/07/05 13:41:36 -0700

@fabpot What we do with that ? I have tried to rebase it with master, but my (Windows) git always gets insane and this ends up with unfixable error. This feature __should__ be in Symfony2 before final. Should I start work on it from "none" ?

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

by fabpot at 2011/07/06 05:44:26 -0700

@stloyd: I need to review the patch first.
2011-07-06 15:04:55 +02:00
everzet
fa20b514a2 [Console] refactored definition printer 2011-07-06 15:44:24 +03: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
Fabien Potencier
d49eaa6a41 merged branch vicb/kernel/client-ini-max-size (PR #1544)
Commits
-------

3df5ec3 [HttpKernel] Add support for 'upload_max_filesize' ini directive in the Client

Discussion
----------

[HttpKernel] Add support for 'upload_max_filesize' ini directive

[HttpKernel] Add support for 'upload_max_filesize' ini directive in the Client

__This PR depends on #1542__

This PR prevent the SW Client from uploading files larger than the limit set in php.ini to closer mimic a real browser usage.

If both PR eventually gets merge `static protected function getMaxUploadFilesize()` should probably be factorized to the UploadedFile class.

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

by stloyd at 2011/07/05 13:35:06 -0700

+1 for both, I just have found similar "wtf" issues with "empty" `upload_max_filesize`.

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

by oscarballadares at 2011/07/05 15:13:23 -0700

I have opened an issue related to UPLOAD_ERR_INI_SIZE. There was no way to handle this exception.
Can you confirm please?

 If this is the case I will close the issue I opened.

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

by vicb at 2011/07/05 23:04:08 -0700

@oscarballadares the PR you are looking for is most probably #1542 - which you should see in the message thread of your submitted issue.

The best would be for you to verify that PR #1542 fixes your issue and provide some feedback so that the issue can be close but only when the PR gets merged (if it fixes the issue).
2011-07-06 14:22:28 +02:00
Fabien Potencier
b9adab9796 merged branch vicb/form/ini-max-size (PR #1542)
Commits
-------

d58ba34 [Validator] Consider the ini directive 'upload_max_filesize' while validating an uploaded file (fixes GH-1441)

Discussion
----------

[Validator] FileValidator support for uploaded files

[Validator] Consider the ini directive 'upload_max_filesize' while validating an uploaded file (fixes GH-1441)

Added validator messages should get translated in all the available languages.
2011-07-06 14:22:15 +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
082473659e fixed validation of Doctrine proxy objects 2011-07-06 13:03:38 +02:00
Fabien Potencier
090a51a0fe added Registry::getEntityManagerForObject() to conveniently get the entity manager associated with a given Entity 2011-07-06 12:33:49 +02:00
Fabien Potencier
d3b78075f0 [Doctrine] fixed Doctrine guesser when the object is a proxy and not an original entity instance
After this patch, the guesser is run for regular entity instances and proxy instances.
2011-07-06 08:53:29 +02:00
Lars Strojny
133169f668 Better exception message for extension in XmlFileLoader 2011-07-06 00:08:33 +02:00
Victor Berchet
3df5ec3de5 [HttpKernel] Add support for 'upload_max_filesize' ini directive in the Client 2011-07-05 22:01:06 +02:00
Fabien Potencier
f562e60809 merged branch vicb/form/default-validator (PR #1533)
Commits
-------

4c6e177 [Form] Fix the default validator

Discussion
----------

[Form] Fix the default validator

When php.ini has an empty value for post_max_size
`post_max_size =`

see http://fr2.php.net/manual/en/function.ini-get.php

post_max_size can not be false as it has a default value
2011-07-05 20:09:31 +02:00
Victor Berchet
d58ba34246 [Validator] Consider the ini directive 'upload_max_filesize' while validating an uploaded file (fixes GH-1441) 2011-07-05 20:05:50 +02:00
Fabien Potencier
c814d4ce9c merged branch beberlei/ChoiceFix (PR #1531)
Commits
-------

03fee4f Fix permissions
431460f [Form] Remove choice or choice_list requirement as the following conditions already check enough and this condition prevents empty select forms (populated by ajax for example)

Discussion
----------

[Form] Choice fix

[Form] Remove choice or choice_list requirement as the following conditions already check enough and this condition prevents empty select forms (populated by ajax for example)

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

by stloyd at 2011/07/05 06:26:36 -0700

You should revert permission changes.

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

by fabpot at 2011/07/05 06:28:14 -0700

Why not replacing `if (!$options['choices'] && !$options['choice_list']) {` by `if (!isset($options['choices']) && !isset($options['choice_list'])) { `?

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

by beberlei at 2011/07/05 06:35:50 -0700

gnaa permission changes, i cant seem to configure my machine such that it does not do it, i have to do this on a per repository basis, very annoying.

@fabpot isset() is already guaranteed because these two options are in the defaults.

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

by beberlei at 2011/07/05 06:39:43 -0700

Fixed the permissions

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

by stof at 2011/07/05 06:48:37 -0700

@beberlei Can't you fix it in the global git config ?

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

by webda2l at 2011/07/05 09:48:58 -0700

I met the same problem this afternoon and vote for the isset solution. Better than nothing and work for me.
https://github.com/symfony/symfony/pull/1539

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

by stof at 2011/07/05 09:50:09 -0700

@webda2l why is a check that always return true better than nothing ? It adds overhead without adding any value in the code.
2011-07-05 20:04:38 +02:00
Fabien Potencier
01d583e889 [Console] fixed Command::setApplication() when the argument is null 2011-07-05 20:02:12 +02:00
Fabien Potencier
baeacc274c merged branch lenar/patch-2 (PR #1532)
Commits
-------

bcca47a missing argument to addProcessors()

Discussion
----------

[MonologBundle] Missing argument to addProcessors()

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

by Seldaek at 2011/07/05 07:03:45 -0700

@fabpot: Please merge, this is a regression in yesterday's PR
2011-07-05 19:50:00 +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
cf1714c9db [Validator] fixed non-anchored regex 2011-07-05 19:49:32 +02:00
Fabien Potencier
9fbffcc650 removed usage of preg_match with the 'e' modifier 2011-07-05 19:49:27 +02:00
Jordi Boggiano
f96baa7e0a [MonologBundle] Fix eager getDefinition() call throwing an exception 2011-07-05 06:59:49 -07:00
Lenar Lõhmus
bcca47a3db missing argument to addProcessors() 2011-07-05 06:47:49 -07:00
Victor Berchet
4c6e177a63 [Form] Fix the default validator 2011-07-05 15:45:01 +02:00
Benjamin Eberlei
03fee4f6cf Fix permissions 2011-07-05 15:39:05 +02:00
Benjamin Eberlei
431460f6ff [Form] Remove choice or choice_list requirement as the following conditions already check enough and this condition prevents empty select forms (populated by ajax for example) 2011-07-05 15:19:46 +02:00
Fabien Potencier
8a1fe40829 [Security] tweaked previous commit 2011-07-05 11:14:15 +02:00
Fabien Potencier
4f8a98033a [Security] removed a hack 2011-07-05 11:00:08 +02:00
Fabien Potencier
fb829b0d80 [FrameworkBundle] added missing fixtures 2011-07-05 10:59:40 +02:00
Fabien Potencier
e64d15355e merged branch Seldaek/monolog (PR #1522)
Commits
-------

8287ac7 [MonologBundle] CS fix
e6da824 [MonologBundle] Added services for core processors

Discussion
----------

[MonologBundle] Added services for core processors
2011-07-05 10:17:45 +02:00
Fabien Potencier
bc9ef8f297 merged branch lenar/patch-1 (PR #1526)
Commits
-------

511a9a1 Edited src/Symfony/Component/Console/Helper/DialogHelper.php via GitHub

Discussion
----------

EOF triggers infinite loop in console dialog helper

* fix by throwing an exception when fgets() fails
* Also fixes "0" returning a default answer instead of "0"

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

by lenar at 2011/07/05 00:26:02 -0700

Fixes #1521.
2011-07-05 10:16:25 +02:00
Lenar Lõhmus
511a9a1fd7 Edited src/Symfony/Component/Console/Helper/DialogHelper.php via GitHub 2011-07-05 00:19:44 -07:00
Daniel Londero
7dd8dd7699 Fixed @Return comment for getAcceptableContentTypes() method. 2011-07-04 14:34:11 -07:00
Jordi Boggiano
8287ac774c [MonologBundle] CS fix 2011-07-04 23:09:32 +02:00
Jordi Boggiano
e6da824aa1 [MonologBundle] Added services for core processors 2011-07-04 22:46:15 +02:00
Fabien Potencier
292d97d147 bumped version to RC5-DEV 2011-07-04 22:45:04 +02:00
Fabien Potencier
7d8fb3ddb9 prepare 2.0 RC4 release 2011-07-04 22:43:10 +02:00
Fabien Potencier
bd89cc7b37 [FrameworkBundle] fixed Template parser to accept template with dots 2011-07-04 22:38:34 +02:00
Fabien Potencier
f12edc3775 merged branch paulkamer/master (PR #1520)
Commits
-------

924ea92 made command consistent with other help texts (it's now './app/console', instead of 'php app/console')
8361346 Corrected help text from './symfony' to 'php app/console'

Discussion
----------

[console] Incorrect help text

When executing 'php app/console help', example commands starting with './symfony ' are shown.
I've made it consistent with the help text shown for generate:bundle; './app/console '
2011-07-04 20:35:52 +02:00
Fabien Potencier
c9a9200115 merged branch stloyd/datetime_fixes (PR #1485)
Commits
-------

3917ed7 Revert "* DateType, DateTimeType, TimeType: - a bit changed readability"
c85b815 Fixed few issues with Date and Time:

Discussion
----------

[Form] Fixed few issues with Date and Time

Fixed few issues with Date and Time:

* TimeType:
  - seconds are no longer populated if "with_seconds" = false
  - "widget = text" is now properly rendered (closes #1480)
* DateTimeToStringTransformer:
  - fixed using not default "format" (probably fix #1183)
* DateType, DateTimeType, TimeType:
  - fixed "input = datetime" and test covered
2011-07-04 20:26:31 +02:00
Paul
924ea926ea made command consistent with other help texts (it's now './app/console', instead of 'php app/console') 2011-07-04 20:18:08 +02:00
Paul
836134620b Corrected help text from './symfony' to 'php app/console' 2011-07-04 20:06:30 +02:00
Jordi Boggiano
52fdd53af8 [Bridge/Twig] Add required class to labels that match required fields 2011-07-04 20:04:44 +02:00
Fabien Potencier
311a9bd02b [HttpFoundation] tweaked previous merge 2011-07-04 16:26:19 +02:00
Fabien Potencier
88bee2bd41 merged branch stloyd/session_fix (PR #1517)
Commits
-------

756ea8d Call session_name() only if user gave an new one. Closes #1418

Discussion
----------

[Session] Call session_name() only if user gave an new one

Call `session_name()` only if user gave an new one, by default will use an "php.ini" option. Also added some phpdoc.

Closes #1418.
2011-07-04 16:25:19 +02:00
Fabien Potencier
e251e8e07c merged branch vicb/perf-array (PR #1516)
Commits
-------

2af2260 Remove useless code

Discussion
----------

Remove useless code

This PR is about removing useless code which could benefit to perfomances.

Credits go to [Jordi](https://github.com/symfony/symfony/commit/000229dbd0d161f1eebe) for this.

As a minor modif, I can understand if this could not be merged while in RC.
2011-07-04 15:26:07 +02:00
stloyd
756ea8db39 Call session_name() only if user gave an new one. Closes #1418 2011-07-04 14:46:04 +02:00
Victor Berchet
2af2260c34 Remove useless code 2011-07-04 14:08:20 +02:00
Fabien Potencier
5445b0d8b5 [Security] reverted change from previous merge 2011-07-04 12:52:45 +02:00
Fabien Potencier
cc03b73253 merged branch Herzult/testSecurity (PR #1447)
Commits
-------

164aea4 [Security] Add tests for the channel listener
d51cbc0 [Security] Remove useless attribute in basic authentication listener & test it
91e6dc9 [Security] Add tests for the anonymous authentication listener
3c2affb [Security] Update access listener constructor's prototype and add tests
81afd77 [Security] Add tests for the firewall map
aa6ae33 [Security] Remove useless attribute & var in firewall

Discussion
----------

Test security

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

by lsmith77 at 2011/06/29 13:41:07 -0700

@schmittjoh is probably the person to review this change ..
2011-07-04 12:47:32 +02:00
Fabien Potencier
beecac3adb [Form] simplified previous merge and fixed unit test 2011-07-04 12:13:46 +02:00
Fabien Potencier
c36f8d6459 merged branch jseverson/formnotboundexception (PR #1465)
Commits
-------

49af102 Throwing FormNotBoundException when calling form isValid

Discussion
----------

Throwing FormNotBoundException when calling form isValid

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

by Seldaek at 2011/06/28 12:20:04 -0700

I'd have made that a `\LogicException`, but that's just me hating on custom exceptions. Otherwise as said on IRC, 👍.

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

by stloyd at 2011/06/28 12:27:27 -0700

+1 but IMO `FormException` would be here good enough.
2011-07-04 12:12:06 +02:00
Fabien Potencier
d7da15d054 merged branch nicodmf/master (PR #1469)
Commits
-------

bf76bed Correct prefix from nothing to ORM\ for annotations

Discussion
----------

Correct prefix from nothing to ORM\ for annotations

For yml et xml mapping, the commands generate:doctrine:entities and doctrine:generate:entities, don't prefixed the annotations, specially for the listenners methods (prepersist, preupdate...).
2011-07-04 11:56:08 +02:00
Fabien Potencier
20fbcbe97e merged branch stloyd/patch-2 (PR #1514)
Commits
-------

00151db Call container directly (skip unnecesary method call)

Discussion
----------

[Controler] Call container directly

This skip unnecesary call for `Controller::get($id)` .
2011-07-04 11:34:00 +02:00
Joseph Bielawski
00151db889 Call container directly (skip unnecesary method call) 2011-07-04 01:14:47 -07:00
Fabien Potencier
cadeb5d254 merged branch beberlei/AnnotationAutoloading (PR #1508)
Commits
-------

c867209 Adjust UPDATE.md to Annotation changes
9069d06 Fix tests to run with Doctrine Common AnnotationRegistry
d5c1bbe Disable call to AnnotationReader::setAutoloadAnnotations()

Discussion
----------

Annotation autoloading

This pull request disables the annotation autoloading through the DIC. PHP Autoloading is now removed from the AnnotationReader and replaced with its own autoloading mechanism that offers much more control over possible error states.
2011-07-04 10:08:27 +02:00
Fabien Potencier
6793c20967 [Form] fixed error messages 2011-07-04 10:01:16 +02:00
Fabien Potencier
dba36ac543 merged branch vicb/form/csrf (PR #1512)
Commits
-------

06c3712 [Form csrf] FileTypeCsrdExtension is not required any more (as FileType now extends FieldType)

Discussion
----------

[Form csrf] FileTypeCsrdExtension is not required any more

FileType now extends FieldType.
2011-07-04 09:57:08 +02:00
Victor Berchet
06c371278f [Form csrf] FileTypeCsrdExtension is not required any more (as FileType now extends FieldType) 2011-07-04 08:28:43 +02:00
Benjamin Eberlei
d5c1bbee81 Disable call to AnnotationReader::setAutoloadAnnotations() 2011-07-03 16:21:52 +02:00