Commits
-------
022a9a7 [Security] Make saving target_path extendible
Discussion
----------
[Security] Make saving target_path extendible
The problem lies in how Security component handles ``target_path`` - the latest request URI is always stored. This can lead to problems in following scenarios:
a) The response type of the request is not HTML (think JSON, XML ..)
b) The URI matches a route that does not listen to HTTP GET
I opened a [PR](https://github.com/symfony/symfony/pull/604) months ago, to partly solve scenario A, which did not make it. Now I am proposing a different solution - user can extend ``ExceptionListener`` and override the logic behind setting the ``target_path`` to match his precise needs.
In my simplified scenario, I would be using:
```
protected function setTargetPath(Request $request)
{
if ($request->isXmlHttpRequest() || 'GET' !== $request->getMethod()) {
return;
}
$request->getSession()->set('_security.target_path', $request->getUri());
}
```
@Seldaek, @schmittjoh, @lsmith77, thoughts?
---------------------------------------------------------------------------
by Seldaek at 2011/09/21 02:37:02 -0700
Seems like a better solution for flexibility's sake. Would be quite awesome if you could add a cookbook entry to symfony/symfony-docs about this, otherwise I'm afraid we'll have to explain it over and over again :)
---------------------------------------------------------------------------
by helmer at 2011/09/21 03:38:57 -0700
[Cookbook](b22c5e666e) entry done. Perhaps though I rushed ahead ..
---------------------------------------------------------------------------
by Seldaek at 2011/09/21 03:52:01 -0700
Thanks. You can already do a pull request against symfony-docs, just reference this pull request in it so it's not merged before this is merged.
Commits
-------
c0494c4 [README] Adding a small section with information about contributing.
Discussion
----------
[WIP] Contributing addition to the README
Hey guys-
This adds a small section to the README about contributing. It's a WIP only because we need to wait for [this](0892a2cf5c) commit to be rendered so that the following link works (and takes you down to the new section):
http://symfony.com/doc/current/contributing/code/patches.html#check-list
Thanks!
Commits
-------
ae3aded Added PCRE_DOTALL modifier to RouteCompiler to allow urlencoded linefeed in route parameters.
Discussion
----------
Added PCRE_DOTALL modifier to RouteCompiler to allow urlencoded linefeed in route parameters.
Reopened from PR 2220 on master branch.
---------------------------------------------------------------------------
by Seldaek at 2011/09/23 07:59:58 -0700
👍 :)
Commits
-------
cf736cc [DomCrawler] Add test for ChoiceFormField without value
bca551e [DomCrawler] ChoiceFormField should take the content when value is unavailable
Discussion
----------
[DomCrawler] ChoiceFormField should take the content when value is unavai
[DomCrawler] ChoiceFormField should take the content when value is unavailable
---------------------------------------------------------------------------
by fabpot at 2011/09/20 09:15:21 -0700
Can you some unit tests?
Commits
-------
ab8e760 Fixed the creation of the subrequests
Discussion
----------
Fixed the creation of the subrequests
The subrequest must be created using an absolute path to keep the
informations about the host and the base path.
Closes#2168
Commits
-------
95dc7e1 Fixed fourth argument of Filesystem->mirror()
Discussion
----------
Fixed fourth argument of Filesystem->mirror()
See #2027 and #2033 for discussion.
@fabpot said that we don't want to use symlink at all on Windows so if this is confirmed, we should also change ``Filesystem->symlink()`` implementation.
---------------------------------------------------------------------------
by alexandresalome at 2011/09/16 08:29:40 -0700
Tested on Windows, OK for me
Commits
-------
8e2cbe6 fixes usage of mb_*
Discussion
----------
Fixes usage of mb_strlen
---------------------------------------------------------------------------
by Seldaek at 2011/09/16 05:33:45 -0700
This will fail if the mbstring ext isn't enabled, you should still test for the mb_ function first.
Commits
-------
aa8e029 Swedish translation fix.
Discussion
----------
Swedish translation fix.
"valda" translates to "chosen". Changed to correct term "angivna".
Commits
-------
43b55ef [Locale] Fix#2179 StubIntlDateFormatter support yy format
Discussion
----------
[Locale] Fix#2179 StubIntlDateFormatter support yy format
Fix#2179 Year limit is 2031 like IntlDateFormatter
Commits
-------
777f876 [HttpFoundation] Added test that exposes error in session saving
Discussion
----------
[HttpFoundation] Added test that exposes error in session saving
Noticed this commit in the recent release:
https://github.com/symfony/symfony/commit/34a1b53
And noticed that the save in __destruct won't be fired if a manual save has been called. The testSavedOnDestructAfterManualSave test I've added fails on 2.0.1 but it passes with 2.0.0. An example:
$session->set('foo', 'value');
$session->__destruct(); // eventually called during shutdown, triggers a save
// During next request, $session->get('foo') returns 'value'
$session->set('foo', 'value');
$session->save();
$session->set('foo', 'newvalue');
$session->__destruct(); // eventually called during shutdown, however WON'T trigger save
// During next request, $session->get('foo') returns 'value'
In my eyes the save on destruction should still happen whether a save has been called manually or not - it's more predictable. But i can see arguments for the opposite as well.
If consensus is that this is a bug, I'm happy to provide a fix but wanted to get feedback on the 2 options:
* Save optimisation can be reverted
* Can make the save optimisation more intelligent so a write to storage is only done if something has changed. The best way to do this would be to close down the api and mark the session as invalid when an attribute is set for example, however all properties are currently protected and would need to be private, so it might break some people's extensions of session
---------------------------------------------------------------------------
by stof at 2011/09/04 02:13:52 -0700
@fabpot what about it ?