Commits
-------
eb9bf05 [HttpFoundation] Remove hard coded assumptions and replace with API calls.
9a5fc65 [HttpFoundation] Add more tests.
68074a2 Changelog and upgrading changes.
7f33b33 Refactor SessionStorage to NativeSessionStorage.
b12ece0 [HttpFoundation][FrameworkBundle] Separate out mock session storage and stop polluting global namespace.
d687801 [HttpKernel] Mock must invoke constructor.
7b36d0c [DoctrineBridge][HttpFoundation] Refactored tests.
39526df [HttpFoundation] Refactor away options property.
21221f7 [FrameworkBundle] Make use of session API.
cb873b2 [HttpFoundation] Add tests and some CS/docblocks.
a6a9280 [DoctrineBridge] Refactor session storage to handler.
a1c678e [FrameworkBundle] Add session.handler service and handler_id configuration property.
1308312 [HttpFoundation] Add and relocate tests.
88b1170 [HttpFoundation] Refactor tests.
2257a3d [HttpFoundation] Move session handler classes.
0a064d8 [HttpFoundation] Refactor session handlers.
2326707 [HttpFoundation] Split session handler callbacks to separate object.
bb30a44 [HttpFoundation] Prepare to split out session handler callback from session storage.
Discussion
----------
[2.1] Support PHP 5.4 \SessionHandler
Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
This patch allows us to add services, like an encryption layer into any session handler without having to alter or inherit any code across any session handler, internal or custom.
The `\SessionHandler` class exposes internal PHP's native internal session save handlers like files, memcache, and sqlite by wrapping the internal callbacks through the class giving user-space the chance to intercept, override and filter them by inheriting from `\SessionHandler`. I've written a pretty nice use-case at http://docs.php.net/sessionhandler which really shows the power of it. I never considered how to make proper use of the `\SessionHandler` in Symfony2 until I wrote the code example you see in that documentation and also because of the `AbstractSessionStorage` base class got in the way.
It's really trivial to enable support for this in Symfony2 but requires to separate out the actual handlers because inheritance is not suitable.
Obviously, the feature will only work with internal PHP-extension provided handlers under PHP 5.4 and will already work in PHP 5.3 with any custom handler (since they all implement `\SessionHandlerInterface`). Symfony2 will also be the first framework to support these amazing features :-D
The necessary changes are really small but beautiful:
The basic idea is this: 1d55d1ff14 removed inheritance and separates out the actual session handler callbacks - the part PHP processes internally.
This is supported by an internal proxy mechanism: 10a36c901e
In terms of BC, not much changes net from 2.0:
- We can restore the deprecated service ID: `session.storage.native`
- We add a new service ID `session.handler` (and configuration alias `handler_id`) for the actual session handlers. This defaults to the renamed `session.handler.native_file` session handler (same behaviour just new name and as it's a default there is no BC break).
---------------------------------------------------------------------------
by fabpot at 2012-03-03T12:15:10Z
Looks good to me. Can you update the CHANGELOG and UPGRADE file accordingly and start to update the documentation at symfony/symfony-docs? Thanks for your work, the session handling in Symfony2 is starting to become amazing!
---------------------------------------------------------------------------
by drak at 2012-03-04T11:09:31Z
@fabpot I will start working on documentation this week and get the CHANGELOG/UPGRADING committed shortly. I'll ping when done.
---------------------------------------------------------------------------
by drak at 2012-03-14T16:48:37Z
@fabpot - This PR is ready now.
Commits
-------
6ad201f [FrameworkBundle + WebProfilerBundle] Optimized images and icons with PunnyPNG
Discussion
----------
[FrameworkBundle + WebProfilerBundle] Optimized images and icons with PunnyPNG
It's addition to #3571, in this one I optimized also some gifs, and replaced some of gifs with png, i.e. `spinner.gif` is almost 1kb smaller.
---------------------------------------------------------------------------
by vicb at 2012-03-12T10:27:59Z
-1 for .gif -> .png (the original images might be used by some 3rd party bundles)
---------------------------------------------------------------------------
by stloyd at 2012-03-12T10:36:51Z
@vicb Do you know any ? Because I'm not =)
Mainly because of change you mentioned this PR is on `master`, so if @fabpot would like it, I can also add note to `UPGRADE-2.1` (`CHANGELOG-2.1` ?) file about this change.
---------------------------------------------------------------------------
by stof at 2012-03-12T11:49:03Z
@stloyd you should update the toolbar templates which contain the base64 encoded version of the icons too so that they use the same version
---------------------------------------------------------------------------
by Tobion at 2012-03-12T12:09:29Z
+1 for png
---------------------------------------------------------------------------
by stloyd at 2012-03-12T12:13:18Z
@stof Added. Thanks for reminding =)
If this PR will be merged, I will send PRs into related bundles (Doctrine, Monolog, SwitfMailer).
---------------------------------------------------------------------------
by fabpot at 2012-03-13T11:04:42Z
I agree with @vicb. No need to convert gifs to pngs; the benefits are not worth the change.
---------------------------------------------------------------------------
by Tobion at 2012-03-13T11:35:56Z
I disagree strongly. A sophisticated framework such as symfony should promote web best practices. PNGs are simply better for icons and image compression is an important topic because of web traffic consumption. Google does not research in JPG replacement (webp) for no reason.
---------------------------------------------------------------------------
by fabpot at 2012-03-14T11:51:31Z
It's not about promoting best practices and I agree that using png would have been better. The point is to not break BC when it is not strictly needed.
---------------------------------------------------------------------------
by Tobion at 2012-03-14T12:14:33Z
How about not replacing gif but instead putting png next to them and using png by default for profiler etc.
So anybody who used these gif images (still don't know who that should be outside the framework, and these are not part of the API) could still use them.
---------------------------------------------------------------------------
by fabpot at 2012-03-14T13:48:44Z
looks like a good compromise to me.
---------------------------------------------------------------------------
by flyboarder at 2012-03-14T16:07:58Z
+1 for side-by-side , gif's can always be removed later.
---------------------------------------------------------------------------
by stloyd at 2012-03-14T22:32:50Z
@fabpot Rebased and restored `.gif` files.
It does not make sense to try and store session ini directives since they can be changes outside
of the class as they are part of the global state.
Coding stan
Revert service back to session.storage.native
Rename session.storage.native_file to session.handler.native_file (which is the default so no BC break from 2.0)
Commits
-------
17c3482 fixed timezone bug in DateTimeToTimestampTransformer
Discussion
----------
[FIX]fixed timezone bug in DateTimeToTimestampTransformer
After several trials, I found out that the original code
```php
$dateTime = new \DateTime(sprintf("@%s %s", $value, $this->outputTimezone));
```
would create a DateTime object with timezone being '0000', even though $this->outputTimezone is set to my local timezone.
so I expanded the code a bit and it's working now.
PHP Test code,
```PHP
$d = new DateTime("@1234567890 Asia/Tokyo");
echo date_format($d, 'Y/m/d H:i:s')."\n";
echo $d->getTimezone()->getName()."\n";
$d = new DateTime("now Asia/Hong_Kong");
echo date_format($d, 'Y/m/d H:i:s')."\n";
echo $d->getTimezone()->getName()."\n";
```
The output is as followed:
2009/02/13 23:31:30
+00:00
2012/03/13 03:35:55
Asia/Hong_Kong
This could be a bug of PHP,
---------------------------------------------------------------------------
by stealth35 at 2012-03-13T15:54:31Z
👍
Commits
-------
235be43 fix PropelLogger stopwatch events
Discussion
----------
fix PropelLogger "Event Propel Query X is not started."
---------------------------------------------------------------------------
by willdurand at 2012-03-13T16:00:39Z
👍
Commits
-------
50cb486 Fixed proxy generation in the DoctrineBundle when using Doctrine >= 2.2.0
Discussion
----------
[DoctrineBundle] Fixed proxy generation with Doctrine >= 2.2.0
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
The issue here was, that the name of the generated Proxy files have changed in Doctrine 2.2.0, thus the autoloader in the DoctrineBundle stoped working.
This PR fixes this issue by applying different string manipulations to the given class name depending on the currently used Doctrine version.
---------------------------------------------------------------------------
by fabpot at 2012-03-14T07:13:23Z
Can you squash your commits before I merge? Thanks.
---------------------------------------------------------------------------
by Spea at 2012-03-14T09:33:10Z
Should I open a new PR when squashed the commits? Because I don't know what happens when I force the remote repository to push my squashed commits.
---------------------------------------------------------------------------
by stloyd at 2012-03-14T09:48:05Z
First you should rebase (normally), then squash and push with `--force`, then GH will automaticaly update this PR (if you push into same branch on which bases this PR).
---------------------------------------------------------------------------
by Spea at 2012-03-14T10:04:30Z
Yeah I knew about the ```--force``` option. I just wasn't sure what happens when I do it. Thank you!
---------------------------------------------------------------------------
by Spea at 2012-03-14T10:14:23Z
Squashed commits.
Commits
-------
93cc9ef [Validator] Remove a race condition in the ClassMetaDataFactory (fix#3217)
Discussion
----------
[Validator] Remove a race condition (fix#3217)
#3581 for 2.0
Commits
-------
878c239 Fixed autoloader leakage in tests
Discussion
----------
Doctrine autoload
The autoloader for proxies is now unregistered on shutdown to avoid
having several instances registered at the same time in tests.
Commits
-------
14a18ae [WebProfilerBundle] Optimized toolbar and profiler icons with optiPNG
Discussion
----------
[WebProfilerBundle] Optimized toolbar and profiler icons with optiPNG
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Optimized web toolbar and profiler icons (pngs) to slightly reduce PNG sizes. Lossless compression.
Commits
-------
aa53b88 Sets _format attribute only if it wasn't set previously by the user
Discussion
----------
Sets _format attribute only if it wasn't set previously by the user.
Fixes#2653
Commits
-------
c68c8b8 [SecurityBundle] Lazily load the post schema listener
Discussion
----------
[SecurityBundle] Lazily load the post schema listener
As suggested by @stof in #3560
Commits
-------
705e460 provided unmerged definition for correct help generation
45bbb5b added getNativeDefinition() to allow specifying an alternate InputDefinition for help generation
Discussion
----------
[Console] Xml output fix
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #2667
Todo: add specific test
As per my comment [here](https://github.com/symfony/symfony/issues/2667#issuecomment-4431944), added the ability to provide an InputDefinition that will not be changed by merging with the Application InputDefinition..