This commit allows applications to know certain meta-data about the session
Session storage is designed to only store some data against a session ID
so this method is necessary to be compatible with any session handler, including
native handlers.
Commits
-------
8dd2c27 [HttpFoundation] Further micro-optimization.
54c5d5e [HttpFoundation] Micro-optimisation.
Discussion
----------
[HttpFoundation] Micro-optimisation.
Ref #3729
---------------------------------------------------------------------------
by robocoder at 2012-03-30T11:45:02Z
If you pre-flip your $validOptions arrays, you can use isset() instead of in_array() in the loop.
This changes the performance from O(m * n) to O(m).
---------------------------------------------------------------------------
by drak at 2012-03-30T11:53:24Z
@robocoder What is the expense of the array_flip though?
---------------------------------------------------------------------------
by robocoder at 2012-03-30T11:56:21Z
Why would you use array_flip if the array doesn't change? Change $validOptions = array('x', 'y', ...) to $validOptions = array('x' => 0, 'y' => 0, ...), then change the in_array() to use isset().
---------------------------------------------------------------------------
by stof at 2012-03-30T11:57:08Z
@drak a loop. But it will be done only once before the other loop so it will be O(n + m) instead of O(m * n)
---------------------------------------------------------------------------
by drak at 2012-03-30T12:00:47Z
Ok :)
Commits
-------
234ce4d [PhpUnit] Fix the path to the boostrap files in the components
Discussion
----------
[PhpUnit] Fix the path to the boostrap files in the components
Commits
-------
8f11f2dd shortened if/else syntax
2b8c2bc [FrameworkBundle] made http_cache dir extensible
Discussion
----------
[FrameworkBundle] make http_cache dir extensible
Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
I have a use case where I don't want the httpcache cleared on `cache:clear`. Currently, it is awkward to change this directory.
[![Build Status](https://secure.travis-ci.org/kbond/symfony.png?branch=extensible-httpcache)](http://travis-ci.org/kbond/symfony)
Commits
-------
aac6ad8 [Console] avoid warning parsing empty string argument
Discussion
----------
[Console] avoid warning parsing empty string argument
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
When passing an empty string argument (`app/console add:list "item1" "" "item3"`) the argument parser generates an invalid offset warning and ignores the argument. The parsing usually fails with some kind of invalid number of arguments error.
This fix the error cheching the empty string case and storing it as an argument
Commits
-------
3303155 added kernel shutdown before create client, fixed and stashed
Discussion
----------
[FrameworkBundle] WebTestCase createClient doesn't check if static:kernel was already allocated
with this little fix CreateClient shuts down the kernel before booting again.
If you add an echo after the "if" on the line number 38
and run the test you would see that sometime the kernel is not properly umounted.
Bug fix: [no]
Feature addition: [no]
Backwards compatibility break: [no]
Symfony2 tests pass: [yes]
---------------------------------------------------------------------------
by fabpot at 2012-03-29T09:19:07Z
Can you squash your commits before I merge? Thanks.
---------------------------------------------------------------------------
by liuggio at 2012-03-29T10:17:59Z
Done.
Commits
-------
c73748f [HttpFoundation] Added RFC reference to 308
468ad40 [HttpFoundation] Added support for 308 / Permanent Redirect
Discussion
----------
[HttpFoundation] Added support for 308 / Permanent Redirect
Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes (i guess) [![Build Status](https://secure.travis-ci.org/lyrixx/symfony.png?branch=patch-1)](http://travis-ci.org/lyrixx/symfony)
Fixes the following tickets: -
Todo: -
I know this is still a draft, but it is already implemented in Firefox.
See :
- http://tools.ietf.org/html/draft-reschke-http-status-308-07
- https://developer.mozilla.org/en/HTTP/HTTP_response_codes#308
---------------------------------------------------------------------------
by stloyd at 2012-03-29T09:25:20Z
It will be in Firefox... 14!
---------------------------------------------------------------------------
by fabpot at 2012-03-29T09:33:01Z
Like the non RFC 2616 status code, you need to add the RFC number as a comment (or the reference to the draft).
---------------------------------------------------------------------------
by lsmith77 at 2012-03-29T11:58:14Z
can you open a PR for https://github.com/FriendsOfSymfony/FOSRest/blob/master/Util/Codes.php ?
---------------------------------------------------------------------------
by lyrixx at 2012-03-29T12:08:31Z
@lsmith77 : Done. See : https://github.com/FriendsOfSymfony/FOSRest/pull/7 :)
Commits
-------
e4f3fd9 Fixed example code.
Discussion
----------
[Translation] example code did not work.
The example code for Translation did not compile. And the trans() result was void.
Commits
-------
44a7ca1 [FrameworkBundle] added new czech validators translations for the File constraint.
Discussion
----------
[FrameworkBundle] added new czech validators translations for the File c...
...onstraint.
Commits
-------
0bde12c Added some skipifs to prevent fatal errors on missing extensions.
Discussion
----------
Added some skipifs to prevent fatal errors on missing extensions.
2.0 branch is ok, this should fix errors on master.
Commits
-------
dd4d46a add limit to logger explosion
Discussion
----------
add limit to logger explosion
This limit is required to display complete query with e.g. "array" type in it.
ping @willdurand
Commits
-------
d243097 Run built-in server on dev environment
Discussion
----------
Run built-in server on dev environment
Bug fix: yes?
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Change the router of the built-in server command to run on dev environment.
The symfony standard edition doesn't have any `/` route by default (it's only available to dev), so by default, when ran, it gives a `404`, unless you explicitely add the `app_dev.php` front controller to the route.
Also, this server is meant to be run on dev only, so no need to run it with the prod front controller by default.
Commits
-------
15dd17e Simplified CONTENT_ headers retrieval
Discussion
----------
Header bag
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes (actually no but I think this has nothing to do with this PR...)
Fixes the following tickets: -
Todo: -
Commits
-------
cdba4cf [FrameworkBundle] Change XSD to allow string replacements on session args.
52f7955 [FrameworkBundle] Remove default from gc_* session configuration keys.
749593d [FrameworkBundle] Allow configuration of session garbage collection for session 'keep-alive'.
Discussion
----------
[2.1][FrameworkBundle] Allow configuration of session garbage collection
Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #2171
Todo: -
---------------------------------------------------------------------------
by drak at 2012-03-21T21:56:20Z
@fabpot - this PR is ready for merge. It basically allows configuration of some session ini values that are necessary in controlling the session behaviour.
---------------------------------------------------------------------------
by dlsniper at 2012-03-21T22:57:18Z
@drak shouldn't all the options here: https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php#L266 be available for configuration, or am I just reading the source wrong and they already are?
In this case should I make a separate PR to cover the rest or could you do it in this one?
---------------------------------------------------------------------------
by fabpot at 2012-03-23T14:56:22Z
@drak: the discussion is the ticket is very interesting and I think it should be part of a cookbook in the documentation. Can you take care of that before I merge this PR? Thanks.
---------------------------------------------------------------------------
by drak at 2012-03-25T15:32:59Z
@fabpot - yes - it's on the todo list. Will update this PR when done.
---------------------------------------------------------------------------
by drak at 2012-03-26T19:45:13Z
@fabpot - this is ready for merging, the documentation is done (the PR is in but I'll tweak it, but no need to wait to merge this PR). I will also add something extra to cookbook (I wrote docs for the component).
Commits
-------
9ef5e95 Add connection name in the propel data collector
Discussion
----------
Add connection name in the propel data collector
Bug fix: no
Feature addition: yes, This will allow to explain a propel query on a specific connection
Backwards compatibility break: no
Symfony2 tests pass: yes
- Require PR propelorm/Propel#315
- Related to PR propelorm/PropelBundle#129
cc @willdurand
---------------------------------------------------------------------------
by willdurand at 2012-03-16T18:17:26Z
@fabpot please, let me merge Propel related PRs before that one, thanks!
---------------------------------------------------------------------------
by willdurand at 2012-03-26T08:38:36Z
@fabpot good to go from my point of view
Commits
-------
b718960 HttpFoundation\HeaderBag Little improvement.
Discussion
----------
[HttpFoundation\HeaderBag] Removed unnecessary anonymous function
---------------------------------------------------------------------------
by vicb at 2012-03-24T16:07:00Z
Related issue: #3294
Commits
-------
10947cb [DoctrineBridge][Security] Fixes bug that prevents repository's refreshUser from being called
Discussion
----------
[Security][DoctrineBridge] Fixes bug that prevents repository's refreshUser from being called
---------------------------------------------------------------------------
by marcw at 2012-02-21T08:46:09Z
Updated. What do you guys think about this patch ?
---------------------------------------------------------------------------
by henrikbjorn at 2012-02-21T08:57:47Z
Isnt this a bit dangerous, the custom repository implementing refreshUser should always be called first right? You wouldnt specify the $property property if your class has custom implementations would you?
---------------------------------------------------------------------------
by marcw at 2012-02-21T09:05:08Z
@henrikbjorn At this time, the refreshUser method is never called from the custom repository, even if you don't specify the "property" property. This patch fixes this.
---------------------------------------------------------------------------
by marcw at 2012-02-21T09:44:06Z
Updated & Squashed.
---------------------------------------------------------------------------
by stof at 2012-02-21T10:03:33Z
@marcw please move the retrieval of the id in the ``else`` block, like in my comment as it is useless to do this logic for the case where the userProviderInterface is implemented (and it will answer to @vicb by making it impossible to write it with elseif)
---------------------------------------------------------------------------
by marcw at 2012-02-21T10:19:06Z
I'm not sure about this, but Isn't the check of the id essential here to ensure that the entity is a persisted one ?
---------------------------------------------------------------------------
by stof at 2012-02-21T10:21:55Z
@marcw if the interface is used, it means that the user wants to do the work himself. So you should really let him do the way he wants. If he does not use the id to refresh the user, he could choose not to include it in the serialized data.
Retrieving the id is needed for the ``find()`` call because we pass the id as argument and so we fail when the serialized data don't contain it
---------------------------------------------------------------------------
by marcw at 2012-02-21T10:33:30Z
@stof Roger that. I'll do the fix.
---------------------------------------------------------------------------
by marcw at 2012-02-21T10:41:58Z
Updated & Squashed, again.
---------------------------------------------------------------------------
by stof at 2012-02-21T11:00:44Z
btw, to answer to your previous question, the exception when retrieving the id does not check if the object is persisted (you need to reach teh DB for this, which is what find() does) but that the id is part of the serialized data to give a better error reporting.
---------------------------------------------------------------------------
by fabpot at 2012-03-07T19:39:33Z
ready to be merged now?
---------------------------------------------------------------------------
by henrikbjorn at 2012-03-08T07:21:37Z
would say so.
---------------------------------------------------------------------------
by dlsniper at 2012-03-25T11:58:34Z
Hi, can this be merged now or not?
Commits
-------
86a3512 [FrameworkBundle] Add support for full URLs to redirect controller
Discussion
----------
[FrameworkBundle] Add support for full URLs to redirect controller
I'd consider this a bugfix since at the moment using an URL just redirects to `/current/pathhttp://example.org`.