Commit Graph

6842 Commits

Author SHA1 Message Date
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
Fabien Potencier
08730b604b merged branch andreia/master (PR #1754)
Commits
-------

cb37572 Update the Brazilian Portuguese validator translations and fix typo
e0e4778 Revert "Update the Brazilian Portuguese validator translations and fix typo"
63f0707 Update the Brazilian Portuguese validator translations and fix typo

Discussion
----------

Update pt_BR translations

Update the Brazilian Portuguese validator translations and fix typo
2011-07-21 04:43:13 +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
Fabien Potencier
6108b8dedc merged branch usefulthink/fix-interal-uri-generator (PR #1747)
Commits
-------

79e4ed6 simplified assignment
04302ff simplified ternary-operator
3a285c1 fixed handling of null-values in attribute- and query-arrays

Discussion
----------

[FrameworkBundle] 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()`][code1]
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.

[code1]: https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/FrameworkBundle/HttpKernel.php#L179
2011-07-20 17:35:32 +02: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
e42a2dede1 [Validator] fixed unit tests when intl is not installed 2011-07-20 14:45:35 +02:00
Fabien Potencier
e5fa78af31 [Form] fixed unit tests when intl is not installed 2011-07-20 14:36:55 +02:00
Fabien Potencier
8333df6161 fixed autoloader when tests are run on a machine without intl installed 2011-07-20 14:27:10 +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
Fabien Potencier
256b7aa179 merged branch kwiateusz/patch-1 (PR #1737)
Commits
-------

9e038c0 Edited src/Symfony/Component/BrowserKit/Client.php via GitHub

Discussion
----------

[BrowserKit] Small change in description of reset() method
2011-07-19 11:51:24 +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