Commit Graph

6734 Commits

Author SHA1 Message Date
Fabien Potencier
1a43505a3e [FrameworkBundle] fixed priority to be consistent with 2.1 2011-10-23 09:50:45 +02:00
Fabien Potencier
5a549f2be7 merged branch stof/profiler_priority (PR #2439)
Commits
-------

e81c710 Increased the priority of the profiler request listener

Discussion
----------

Increased the priority of the profiler request listener

If a request listener returns a response before calling the profiler
listener, the request will not be added in the stack leading to an error
during the handling of the kernel.response event. The profiler listener
should ideally be run first.

The same issue will occur if a previous listener throws an exception btw.

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

by schmittjoh at 2011/10/20 08:21:15 -0700

Can you add a test?

These interdependencies between listeners are really easy to mess up, and no-one will remember why listener X has to be run before listener Y, but after listener Z.

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

by stof at 2011/10/20 08:27:51 -0700

Well, in fact, the only rule is that the listener **must** run for the request event to avoid failing during the response event of an eventual subrequest. So if another listener triggers a subrequest before the profiler is called, it will fail because the parent request is not in the stack.

A better fix would probably make the listener work even when the propagation of the request event has been stopped (or has not reached this listener yet) to avoid issues (someone doing a subrequest in its own listener will still be able to use a higher priority for instance) but I don't have time to refactor @fabpot's refactoring now.

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

by schmittjoh at 2011/10/20 08:36:40 -0700

Another idea would be to add a ProfilerHttpKernel as it basically needs to wrap the request/response cycle, and people might have priorities beyond 1000 (see @Seldaek's SecurityBundle).

Using an extra kernel would be the only way to really guarantee that it is working. Note that I'm not implying you should do it, but as a "real" fix this would probably be better.

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

by stof at 2011/10/20 08:43:07 -0700

The issue by wrapping the HttpKernel is that the kernel passed in the event is the one dispatching the event. So we would have to implement it by using inheritance, not composition (otherwise the listener would create subrequests using the inner kernel and they would not be profiled).
But FrameworkBundle already extend the HttpKernel to handle the creation of the request scope (which must be done using inheritance for the same reason).
So it would require having a ContainerAwareHttpKernel (handling the scope), a ProfilerHttpKernel (handling the profiler) both extending the base HttpKernel (the Profiler one should be usable when using only the component, and the ContainerAware one is needed in prod when disabling the profiler) but also a ContainerAwareProfilerHttpKernel extending one of them and duplicating the logic of the other.

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

by schmittjoh at 2011/10/20 08:52:13 -0700

So maybe, we need to revisit which kernel is passed in the event as well.

But doing things more explicitly is better than making assumptions about priorities that no-one can remember in a few weeks.

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

by stof at 2011/10/20 09:53:45 -0700

@schmittjoh Issue is, using composition would require to let the inner kernel know about the wrapper to be able to pass it in the event. This looks ugly.

But I agree it would be better to do things explicitly

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

by Seldaek at 2011/10/21 07:39:23 -0700

Didn't read everything, busy, but regarding the mention of our security bundle, it is highlighting a big issue with priorities imo, in that we're missing a one-stop page that lists all the existing priorities, and possibly some more details like "if you do this, don't go above this priority or it'll blow up". Otherwise it'll just be a game of escalation :)
2011-10-23 09:50:26 +02:00
Miha Vrhovnik
6b872cfa40 Check if cache_warmer service is available before doing the actual cache warmup 2011-10-22 10:56:16 +02:00
Fabien Potencier
d3361c17e5 Revert "[Framework] removed wrong listener"
This reverts commit 40fb76dd1a.
2011-10-22 08:54:39 +02:00
Fabien Potencier
40fb76dd1a [Framework] removed wrong listener 2011-10-20 22:59:10 +02:00
Christophe Coevoet
e81c710784 Increased the priority of the profiler request listener
If a request listener returns a response before calling the profiler
listener, the request will not be added in the stack leading to an error
during the handling of the kernel.response event. The profiler listener
should ideally be run first.
2011-10-20 16:48:14 +02:00
Fabien Potencier
8ca19af477 merged branch Tobion/patch-3 (PR #2415)
Commits
-------

ae342c7 unified toolbar.css
a7e4e70 unified profiler.css
09fe09e unified and corrected exception_layout.css
3a1674b unified and corrected exception.css

Discussion
----------

Unified and corrected CSS markup

Unified (spaces, braces, quotes, indention) and corrected (missing semicolon) the CSS markup.
Did not change any semantic, only markup!
@fabpot: New pull based on symfony:2.0 and changed formatting style as agreed in #2405
2011-10-17 21:38:01 +02:00
Fabien Potencier
c6e9011fb5 [HttpKernel] fixed typo 2011-10-17 04:18:47 +02:00
Fabien Potencier
2b0af5e93b [HttpKernel] fixed profile parent/children for deep-nested requests 2011-10-17 02:32:06 +02:00
Tobias Schultze
ae342c7484 unified toolbar.css 2011-10-17 00:16:29 +03:00
Tobias Schultze
a7e4e70890 unified profiler.css 2011-10-17 00:14:43 +03:00
Tobias Schultze
09fe09ef5a unified and corrected exception_layout.css 2011-10-16 23:58:22 +03:00
Tobias Schultze
3a1674bcd4 unified and corrected exception.css 2011-10-16 23:50:00 +03:00
Fabien Potencier
2aa1e4d351 merged branch stloyd/tests-fix (PR #2401)
Commits
-------

205f524 [Tests] Skip MimeTypeTest if running as root
d3e9104 [Tests] Skip Routing annotation tests when Doctrine is not available.

Discussion
----------

[Tests] Fix tests when some vendor is not available.
2011-10-16 09:19:00 +02:00
Fabien Potencier
54211a94f6 merged branch Tobion/patch-2 (PR #2406)
Commits
-------

c736436 fixed language in test
2009249 fixed language

Discussion
----------

Fixed small language error
2011-10-16 09:18:47 +02:00
Tobias Schultze
c73643675f fixed language in test 2011-10-16 07:53:44 +03:00
Tobias Schultze
2009249128 fixed language 2011-10-16 07:51:23 +03:00
Fabien Potencier
64302103f6 merged branch igorw/composer (PR #2402)
Commits
-------

a1bab83 [composer] make doctrine dbal and orm recommended by doctrine-bundle
225b512 [composer] make doctrine dbal and orm recommended by doctrine-bridge
03bdac0 [composer] make twig-bundle require twig-bridge
5757713 [composer] add doctrine and twig dependencies

Discussion
----------

Composer update

Add doctrine and twig dependencies (they are now on packagist.org), move doctrine requires to recommends, add twig-bridge require to twig-bundle.

Per @stof, symfony 2.1 (master) will need doctrine to be updated to 2.2-dev.

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

by Seldaek at 2011/10/15 09:13:35 -0700

Also @fabpot it'd be great if you would submit all the sub-tree packages to packagist.org, that way we could start using them individually.

By the way if you want the automatic versioning is now working so if you just delete the "version" from the json files, it should do the right thing. Up to you. See details on http://packagist.org/about
2011-10-16 03:27:55 +02:00
Igor Wiedler
a1bab8305d [composer] make doctrine dbal and orm recommended by doctrine-bundle 2011-10-15 16:57:28 +02:00
Igor Wiedler
225b512b67 [composer] make doctrine dbal and orm recommended by doctrine-bridge 2011-10-15 16:56:23 +02:00
Igor Wiedler
03bdac04ae [composer] make twig-bundle require twig-bridge 2011-10-15 16:56:13 +02:00
Igor Wiedler
575771380b [composer] add doctrine and twig dependencies 2011-10-15 16:55:54 +02:00
Joseph Bielawski
205f524758 [Tests] Skip MimeTypeTest if running as root 2011-10-15 13:45:35 +02:00
Fabien Potencier
548c968444 merged branch stloyd/monolog-tests (PR #2400)
Commits
-------

d9d9c6b [Tests] Skip Monolog test if it's not available.

Discussion
----------

[Tests] Skip Monolog test if it's not available.
2011-10-15 13:08:41 +02:00
Joseph Bielawski
d3e9104b52 [Tests] Skip Routing annotation tests when Doctrine is not available. 2011-10-15 13:06:22 +02:00
Joseph Bielawski
d9d9c6b57a [Tests] Skip Monolog test if it's not available. 2011-10-15 13:00:48 +02:00
Fabien Potencier
5dba01851e merged branch beberlei/GH-1635 (PR #2396)
Commits
-------

9d8046e [Doctrine] GH-1635 - UniqueValidator now works with associations

Discussion
----------

GH 1635

Handle associations in unique validator correctly.

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

by beberlei at 2011/10/15 00:34:31 -0700

This can be merged into "master" as well. The test-code is also a little bit smelling, it includes files manually that dont follow PSR-0. I am going to fix that in another PR after this is merged.
2011-10-15 11:06:44 +02:00
Benjamin Eberlei
9d8046e407 [Doctrine] GH-1635 - UniqueValidator now works with associations 2011-10-15 09:20:06 +02:00
Fabien Potencier
3426c8390c [BrowserKit] fixed cookie updates from Response (the URI here is not the base URI, so it should not be used to determine the default values missing in the cookie, closes #2309) 2011-10-15 02:32:15 +02:00
Fabien Potencier
c0f5b8a3b6 [HttpKernel] fixed profile saving when it has children 2011-10-15 01:46:19 +02:00
Fabien Potencier
3d7510e921 [HttpKernel] fixed missing init for Profile children property 2011-10-15 00:56:18 +02:00
Fabien Potencier
663e25af64 merged branch cs278/issue/2394 (PR #2394)
Commits
-------

d8dfca2 [BrowserKit] Added additional unit tests for capital letters in cookies
00cbd39 [BrowserKit] Fixed cookie expiry discard when attribute contains capitals

Discussion
----------

[BrowserKit] Cookie expiry is discared if the attribute name contains a capital letter

`Cookie::fromString()` discards the expiry time of a cookie where the `expires` attribute contains a capital letter, like `foo=bar; Expires=Fri, 31 Dec 2010 23:59:59 GMT`.

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
2011-10-15 00:31:26 +02:00
Chris Smith
d8dfca21f2 [BrowserKit] Added additional unit tests for capital letters in cookies 2011-10-14 20:31:31 +01:00
Chris Smith
00cbd39813 [BrowserKit] Fixed cookie expiry discard when attribute contains capitals 2011-10-14 20:23:34 +01:00
Miha Vrhovnik
edfa29b01b session data needs to be encoded because it can contain non binary safe
characters e.g null. Fixes #2067
2011-10-11 21:42:38 +02:00
Fabien Potencier
c00ba4dab8 [Console] fixed typo (closes #2358) 2011-10-11 12:56:40 +02:00
Fabien Potencier
d01b29e9f6 [FrameworkBundle] added some unit tests 2011-10-11 12:54:11 +02:00
Fabien Potencier
550f158428 merged branch weaverryan/entity_better_exception_2_0 (PR #2372)
Commits
-------

2270a4d [Bridge][Doctrine] Adding a catch for when a developer uses the EntityType with multiple=false but on a "hasMany" relationship

Discussion
----------

[Bridge][Doctrine] Adding a catch for when a developer uses the EntityType

Hey guys!

See #2348 - same commit, but against the right branch.

Thanks!
2011-10-10 15:40:52 +02:00
Ryan Weaver
2270a4da5a [Bridge][Doctrine] Adding a catch for when a developer uses the EntityType with multiple=false but on a "hasMany" relationship
Without this, the exception is eventually thrown in EntityChoiceList::getIdentifierValues() with a very a message that doesn't really suit the real error: "Entities passed to the choice field must be managed"
2011-10-10 08:26:22 -05:00
Lukas Kahwe Smith
d3f137b9c1 cosmetic tweak 2011-10-09 16:09:22 +02:00
Lukas Kahwe Smith
28778834c7 anything in front of ;q= is part of the mime type, anything after may be ignored
see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1
2011-10-09 12:58:45 +02:00
Fabien Potencier
d233c44e98 merged branch ioalessio/2.0 (PR #2363)
Commits
-------

dd0d6fd fixing italian messages

Discussion
----------

italian messages

"bug fix" for branch 2.0
2011-10-09 08:39:22 +02:00
Alessio
dd0d6fd15b fixing italian messages 2011-10-09 02:40:44 +03:00
Tigran Azatyan
d2d849cf60 First 2011-10-08 22:57:17 +02:00
Fabien Potencier
d867f22b46 merged branch craue/patch-14 (PR #2354)
Commits
-------

2e5869d fixed "using $this when not in object context" error for 2.0 branch (replaces #2353)

Discussion
----------

fixed "using $this when not in object context" error for 2.0 branch (replaces #2353)
2011-10-08 14:23:35 +02:00
Christian Raue
2e5869db00 fixed "using $this when not in object context" error for 2.0 branch (replaces #2353) 2011-10-08 14:05:33 +02:00
Fabien Potencier
f75f46682d merged branch stealth35/fix_distant_trans (PR #2346)
Commits
-------

ae0685a [Translation] Loader should only load local files

Discussion
----------

[Translation] Security : Loader should only load local files

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
See: #2327
2011-10-08 13:34:50 +02:00
stealth35
ae0685a314 [Translation] Loader should only load local files 2011-10-07 18:30:56 +02:00
Fabien Potencier
50c47aa687 merged branch stloyd/form_texttypes (PR #2343)
Commits
-------

8bd0e42 [Form] Use proper parent (text) for EmailType and TextareaType

Discussion
----------

[2.0][Form] Use proper parent (text) for EmailType and TextareaType

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
2011-10-07 14:07:29 +02:00
Fabien Potencier
f22566ca19 merged branch stloyd/ScalarTransformer (PR #2341)
Commits
-------

95049ef [Form] Added type check to `ScalarToChoiceTransformer`

Discussion
----------

[2.0][Form] Added type check to ScalarToChoiceTransformer

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
2011-10-07 14:06:24 +02:00