Commits
-------
85db221 Since getClientIp() no longer takes a parameter, removed that old test
7b5328f getClientIp() will now only return valid IP addresses, rather than assuming the X_FORWARDED_FOR is the first comma seperated value.
Discussion
----------
getClientIp() will now only return valid IP addresses, rather than assuming the X_FORWARDED_FOR is the first comma seperated value.
Fixes#4471
I'm not sure why an empty string was being returned in the first place, rather than null. Any ideas?
---------------------------------------------------------------------------
by travisbot at 2012-05-31T08:59:12Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1485615) (merged 68c17e07 into 78747e6c).
---------------------------------------------------------------------------
by travisbot at 2012-05-31T09:02:57Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1485634) (merged 9c1ba1c4 into 78747e6c).
---------------------------------------------------------------------------
by neilferreira at 2012-05-31T09:04:16Z
Sorted, I'm guessing I need to squash the commits?
---------------------------------------------------------------------------
by travisbot at 2012-05-31T09:21:30Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1485732) (merged 7b5328f1 into 78747e6c).
---------------------------------------------------------------------------
by igorw at 2012-05-31T09:38:07Z
With what value did it fail? Can you add a test case for that `HTTP_X_FORWARDED_FOR ` value?
---------------------------------------------------------------------------
by neilferreira at 2012-05-31T10:45:11Z
Anyone have any idea why that function returns an empty string instead of null ?
---------------------------------------------------------------------------
by neilferreira at 2012-05-31T11:34:12Z
@igorw done, I've also removed an old test that should have been removed when getClientIp() started using the 'trust proxy' variable concept.
---------------------------------------------------------------------------
by travisbot at 2012-05-31T11:38:19Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1486534) (merged 85db2213 into 78747e6c).
Commits
-------
cbc9944 [Bridge][Form] Rename some deprecated methods
Discussion
----------
[Bridge][Form] Rename some deprecated methods
This pull request is for renaming some deprecated Form's methods from the Bridge namespace.
---------------------------------------------------------------------------
by travisbot at 2012-05-31T12:20:59Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1486874) (merged cbc99442 into 78747e6c).
---------------------------------------------------------------------------
by nomack84 at 2012-05-31T12:27:29Z
The fail is not my fault.
Commits
-------
d55f7ed MethodNotImplementedException -> MethodArgumentValueNotImplementedException
cea6489 Accept calling setLenient(false)
Discussion
----------
Avoid IntlDateFormatter::setLenient(false) to throw an exception
Right now it is breaking because the changes introduced here:
f541844c78
---------------------------------------------------------------------------
by travisbot at 2012-05-31T01:35:44Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1483621) (merged cea6489d into 49e213ce).
Commits
-------
2e299aa [FrameworkBundle] Sync with latest changes in session handlers
Discussion
----------
[FrameworkBundle] Sync with latest changes in session handlers
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #4458
---------------------------------------------------------------------------
by travisbot at 2012-05-30T10:12:54Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1475863) (merged 2e299aa8 into f5355f60).
Commits
-------
20b556d [Form] fixed a bug that caused input date validation not to be strict when using the single_text widget with a datetime field
7e3213c [Form] fixed a bug that caused input date validation not to be strict when using the single_text widget with a date field
Discussion
----------
[Form] fixed a bug that caused input date validation not to be strict when using the single_text widget with a date/datetime field
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: -
Currently, input date validation is not strict when using the single_text widget with a date or datetime field. This will cause unexpected transformation of input date value as follows:
* 2012-04-31 => 2012-05-01
* 2012-04-31 03:04:00 => 2012-05-01 03:04:00
Additionally this is not same as other transformation logic for date/datetime fields because they use the checkdate() function to validate input date values. The checkdate() function validates a date strictly.
```php
<?php
var_dump(checkdate(4, 31, 2012)); // bool(false)
```
BTW, the documentation of [IntlDateFormatter::setLenient()](http://php.net/manual/en/intldateformatter.setlenient.php) and [IntlDateFormatter::isLenient()](http://php.net/manual/en/intldateformatter.islenient.php) have been fixed recently. Please see https://bugs.php.net/bug.php?id=61896 **The default parser is lenient, not strict**.
---------------------------------------------------------------------------
by travisbot at 2012-05-28T07:35:11Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1453681) (merged 20b556da into 167779e5).
---------------------------------------------------------------------------
by bschussek at 2012-05-28T09:25:23Z
Quote on strict parsing:
> Extra space, unrecognized tokens, or invalid values ("February 30th") are not accepted.
Disabling lenient parsing makes entering dates in text boxes even harder than it is right now.
---------------------------------------------------------------------------
by iteman at 2012-05-29T09:31:49Z
In my opinion, in most applications, in particular enterprise applications, date/time handling is very important. Unexpected transformation of date/time may sometimes lead unexpected outcomes. In such applications, accepting invalid values is not important than avoiding unexpected transformation. **As specifications, "strict" should be the default, or at least, the "strict" option should be provided if the default is "lenient".**
Moving on to the current behavior.
If "lenient" is intended behavior, is there any way to know it? At least, there is nothing to be found in the tests and documentation for the date/datetime field.
http://php.net/manual/en/intldateformatter.setlenient.php:
> Extra space, unrecognized tokens, or invalid values ("February 30th") are not accepted.
This is only applicable to *DateTimeToLocalizedStringTransformer* (using *IntlDateFormatter*) that is used by *DateType*, not applicable to *DateTimeToStringTransformer* (using *DateTime*) that is used by *DateTimeType*. Why is defferent between these implementation in the first place?
On the one hand, strict validation by *checkdate()* has been adopted in the widgets except the single_text widget. Does this conflict with the single_text widget? Isn't there any problem to be determined "lenient" or "strict" by the widget type mainly from the point of view of the separation of concerns?
Additionally, is there any way to avoid unexpected transformation in the current behavior without changing the specification of a domain object, or writing a new transfer object, or not using the single_text widget?
Finally, I think that the current behavior is bad, but if the current behavior is not a bug, I think that the "strict" option should be provided in *DateType* and *DateTimeType*.
Thanks.
---------------------------------------------------------------------------
by tanakahisateru at 2012-05-29T13:45:12Z
Simply, potentially some users can't find represented their own posts if "4" changed to "5" silently. I think, for regular users to understand why converted so is harder than to understand why blocked his date text.
---------------------------------------------------------------------------
by fabpot at 2012-05-30T05:19:44Z
I'm +1 for this change, but only on master. @bschussek?
---------------------------------------------------------------------------
by sstok at 2012-05-30T07:44:04Z
Date parsing with 'only' the Locale component is hard, especially the extra space or using / when only - is excepted.
And there also a locale that uses dd. mm. yyyy. (dot + space).
So to overcome this I have created a little helper class https://github.com/rollerworks/Locale.
It works as follow.
1. First it searches all the numeric-script characters, and converts those to ASCII decimals
2. Then matches the converted input against an pre-compiled regex that accepts extra spaces or using '/' instead of '-', and omitting leading zero's, etc...
3. Validate the matched parts using checkdate().
I'm not suggesting to only use my Component, but making an it an option would be something to consider, no?
Like an option mode: lenient/strict/match (match is the Rollerworks Locale Component or a-like).
The only thing currently missing is Timezone parsing support, but that is not to hard.
I only have not implemented this because there was no direct need for it at the time.
---------------------------------------------------------------------------
by bschussek at 2012-05-30T07:49:11Z
@fabpot Ok. In the long run we need to find a better solution anyway.
Commits
-------
a551d9e [DependencyInjection] made ContainerAware class abstract.
Discussion
----------
[DependencyInjection] made ContainerAware class abstract.
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
---------------------------------------------------------------------------
by travisbot at 2012-05-30T07:09:10Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1474925) (merged a551d9e5 into 0e98d33e).
---------------------------------------------------------------------------
by stof at 2012-05-30T08:01:57Z
please add a note in the changelog of the component
Commits
-------
3c8cc0a [HttpFoundation][Sessions] Refactored tests
13a2c82 [FrameworkBundle] Refactor session file handler service name and update changelogs
b2cc580 [HttpFoundation] Removed Native*Handler session save handler classes
f33b77c [HttpFoundation] Added a custom file save handler
Discussion
----------
[HttpFoundation][Sessions] Removed native save handlers
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: -
Added a specific filesessionhandler
Removed native handlers to slim down code.
---------------------------------------------------------------------------
by travisbot at 2012-05-30T02:54:40Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1473181) (merged 3c8cc0a1 into adf07f1e).
Commits
-------
23bb668 [FrameworkBundle][SecurityBundle] updated configuration to new method names
8775f2c [Config] replaced setInfo(), setExample() with more generic attributes
Discussion
----------
[Config] replaced setInfo(), setExample() with more generic attributes
This replaces ``setInfo`` and ``setExample`` with a more generic attribute system which provides more flexibility and is more future prove.
I have kept the specialized ``setInfo`` and ``setExample`` methods because they are a bit shorter, and also a good demonstration of what the system could be used for. However for consistency, I have renamed them to ``info()`` and ``example()`` respectively.
---------------------------------------------------------------------------
by travisbot at 2012-05-26T17:37:06Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1442720) (merged 8775f2c1 into 9e951991).
---------------------------------------------------------------------------
by stof at 2012-05-26T17:42:02Z
and you forgot to update FrameworkBundle
---------------------------------------------------------------------------
by travisbot at 2012-05-26T17:46:37Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1442764) (merged 23bb668e into 9e951991).
Commits
-------
3ef377b Update src/Symfony/Bundle/FrameworkBundle/EventListener/TestSessionListener.php
Discussion
----------
Update src/Symfony/Bundle/FrameworkBundle/EventListener/TestSessionListener.php
Better patch for initialization/regeneration of id of already started session
---------------------------------------------------------------------------
by travisbot at 2012-05-30T05:31:15Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1474248) (merged 3ef377b6 into 223d187a).
Commits
-------
a30f4a0 [Form] cleanup
Discussion
----------
[Form] cleanup
---------------------------------------------------------------------------
by travisbot at 2012-05-27T19:47:21Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1450050) (merged 09574f4b into adf07f1e).
---------------------------------------------------------------------------
by travisbot at 2012-05-27T19:57:42Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1450149) (merged a8c63d72 into adf07f1e).
---------------------------------------------------------------------------
by vicb at 2012-05-27T20:00:13Z
thanks a bunch @travisbot !
---------------------------------------------------------------------------
by travisbot at 2012-05-28T06:52:52Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1453555) (merged a30f4a03 into adf07f1e).
---------------------------------------------------------------------------
by bschussek at 2012-05-28T09:20:05Z
Thank you Victor! 👍
Commits
-------
59c4f55 a few minor changes
Discussion
----------
a few minor changes / cleanup
---------------------------------------------------------------------------
by travisbot at 2012-05-27T07:58:52Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1446431) (merged bb7ae326 into 9e951991).
Commits
-------
fc38e2b [Form] Fixed mapping of violations with empty paths to the root form
Discussion
----------
[Form] Fixed mapping of violations with empty paths to the root form
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
---------------------------------------------------------------------------
by travisbot at 2012-05-27T12:57:36Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1447769) (merged fc38e2b4 into adf07f1e).
Commits
-------
d549493 [WebProfilerBundle] Fix time panel for fr locale (fix#4437)
Discussion
----------
[WebProfilerBundle] Fix time panel for fr locale (fix#4437)
@Vincent-P could you confirm if this commit fixes your issues , Thanks.
---------------------------------------------------------------------------
by travisbot at 2012-05-28T12:39:05Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1455324) (merged d5494936 into adf07f1e).
Commits
-------
d046fed [HttpFoundation] Remove temporary files after tests run
Discussion
----------
[HttpFoundation] Remove temporary files after tests run
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: [yes|no]
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: -
---------------------------------------------------------------------------
by travisbot at 2012-05-28T00:26:30Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1451809) (merged 30082e97 into adf07f1e).
---------------------------------------------------------------------------
by travisbot at 2012-05-28T06:59:39Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1453569) (merged d046fede into adf07f1e).
Commits
-------
395004c [Bridge][Doctrine] Fix missing dot in unique entity error message
Discussion
----------
[Bridge][Doctrine] Fix missing dot in unique entity error message
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: none
Todo: none
License of the code: MIT
Documentation PR: none
The translation message defined in the FrameworkExtraBundle defines the unique entity error message like that: ``This value is already used.`` but is defined without the dot in the Doctrine UniqueEntity validator. This PR fixes this issue.
---------------------------------------------------------------------------
by travisbot at 2012-05-29T12:31:59Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1464732) (merged 675c744c into adf07f1e).
---------------------------------------------------------------------------
by travisbot at 2012-05-29T14:24:48Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1465598) (merged 395004c0 into adf07f1e).
Commits
-------
face1f1 Add 5.3.3 to Travis, now is available.
Discussion
----------
Add 5.3.3 to Travis, now is available.
---------------------------------------------------------------------------
by travisbot at 2012-05-28T12:41:45Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1455374) (merged face1f1b into cc42a187).
---------------------------------------------------------------------------
by fabpot at 2012-05-28T14:03:29Z
The minimum PHP version has been changed for Symfony 2.1, not for 2.0.
---------------------------------------------------------------------------
by vicb at 2012-05-28T14:29:37Z
but 5.3.2 is not available on travis, @Maks3w right ?
---------------------------------------------------------------------------
by Maks3w at 2012-05-28T14:33:05Z
@vicb 5.3.2 is not available on Travis.
@fabpot Then you can merge #4439, it's the same but for master
---------------------------------------------------------------------------
by vicb at 2012-05-28T14:43:33Z
why not keep 5.3.3 for 2.0 also (closer to 5.3.2 than just 5.3 which is 5.3.13 - best we can do).
Commits
-------
3ad01c0 Update src/Symfony/Bundle/FrameworkBundle/EventListener/TestSessionListener.php
Discussion
----------
Fix broken web test cases with session already started
This PR fixes the issues highlighted in PR #4445 and #3741 by not overriding the session id if the session is already started.
---------------------------------------------------------------------------
by travisbot at 2012-05-29T19:06:33Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1468970) (merged 3ad01c05 into adf07f1e).
---------------------------------------------------------------------------
by stloyd at 2012-05-29T19:07:54Z
Look at #2040. It's quite old, but there is at least some "reason" =)
---------------------------------------------------------------------------
by guilhermeblanco at 2012-05-29T20:57:27Z
@stloyd it seems to me that doing a session_id() (and now as $session->setId()) is still wrong.
The right should be a regeneration of the id then, which would still make my code pass. The problem is that setId method checks for a possible regeneration/double attribution, which prevents an already started session (from a WebTestCase) to live peacefully with the TestSessionListener, because it will always try to set an id.
So either we allow to regenerate ids or this code is not only useless for 2.1, but actually broken.
---------------------------------------------------------------------------
by drak at 2012-05-30T02:42:47Z
@guilhermeblanco - When I was doing the session refactoring I wanted to make exactly the patch this PR now but I didnt because I wast sure if there were reasons I was unaware of. @fabpot - I would merge this PR if it fixes the related tickets.
Commits
-------
09e5f46 fix markdown for code
Discussion
----------
fix markdown for code in UPGRADE-2.1.md
---------------------------------------------------------------------------
by travisbot at 2012-05-25T12:20:04Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1432391) (merged 09e5f462 into 023dbf80).
---------------------------------------------------------------------------
by jaugustin at 2012-05-25T12:22:13Z
great I didn't break anything :D