Commit Graph

7450 Commits

Author SHA1 Message Date
Fabien Potencier 0341492ed5 updated CHANGELOG for 2.0.16 2012-07-11 19:48:12 +02:00
Fabien Potencier b18f6f557b [Console] fixed wrong phpdoc (closes #4394) 2012-07-10 15:28:02 +02:00
Fabien Potencier b260f30a2e merged branch bschussek/issue4686 (PR #4828)
Commits
-------

854daa8 [Form] Fixed errors not to be added onto non-synchronized forms

Discussion
----------

[Form] Fixed errors not to be added onto non-synchronized forms

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #4686
Todo: -
2012-07-10 10:05:53 +02:00
Bernhard Schussek 854daa8f83 [Form] Fixed errors not to be added onto non-synchronized forms 2012-07-10 10:03:06 +02:00
Fabien Potencier facbcdcf45 [Validator] fixed error message for dates like 2012-02-31 (closes #4223) 2012-07-09 17:53:53 +02:00
Fabien Potencier 03d22b74ec fixed CS (mainly method signatures) 2012-07-09 14:43:50 +02:00
Fabien Potencier fd1d5e8c10 merged branch eriksencosta/issue-4718 (PR #4794)
Commits
-------

28f002d [Locale] fixed bug on the parsing of TYPE_INT64 integers in 32 bit and 64 bit environments, caused by PHP bug fix :) (closes #4718)

Discussion
----------

[Locale] fixed bug on the parsing of TYPE_INT64 integers in 32 bit and 64 bit environments, caused by PHP bug fix

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #4718
License of the code: MIT

[![Build Status](https://secure.travis-ci.org/eriksencosta/symfony.png?branch=issue-4718)](http://travis-ci.org/eriksencosta/symfony)

Tests pass on PHP 5.3.3, 5.3.14 and 5.4.4 with ICU 4.2, 4.4 and 4.6 on 32 and 64 bit environments.
2012-07-09 08:28:53 +02:00
Eriksen Costa 28f002d978 [Locale] fixed bug on the parsing of TYPE_INT64 integers in 32 bit and 64 bit environments, caused by PHP bug fix :) (closes #4718) 2012-07-08 22:15:42 -03:00
Marc Abramowitz c1fea1d8c8 fixed incorrect reference to set*Service() method 2012-07-01 12:35:01 +02:00
Fabien Potencier 24696641db updated vendors 2012-06-29 18:05:48 +02:00
Fabien Potencier b89b00fa20 bumped minimal version of Swiftmailer to 4.2.0 2012-06-29 18:02:19 +02:00
Fabien Potencier 997bcfc420 [SwiftmailerBridge] allowed versions 4.2.* 2012-06-29 18:00:35 +02:00
Fabien Potencier 9572e9bd6e merged branch eriksencosta/issue-3841 (PR #4601)
Commits
-------

a609d55 [Locale] fixed StubIntlDateFormatter to behave like the ext/intl implementation

Discussion
----------

[2.0][WIP][Locale] StubIntlDateFormatter should use the TZ environment variable instead of the PHP's date.timezone setting

Bug fix: yes
Feature addition: no
Backwards compatibility break: yes
Symfony2 tests pass: yes
Fixes the following tickets: #3841
Todo: Check ext/intl changes for the next PHP 5.4 release
License of the code: MIT

![Build Status](https://secure.travis-ci.org/eriksencosta/symfony.png?branch=issue-3841)

There were changes that need to be investigated for the next PHP 5.4 release:

 - [php-src @ eb346ef](eb346ef0f4)
 - [php-src @ 888e77f](888e77ff73)

A strong evidence of bug in ext/intl was found while testing `StubIntlDateFormatter`. See the comment available at the docblock of `StubIntlDateFormatterTest`'s `testFormatWithDefaultTimezoneIntlShouldUseTheTzEnvironmentVariableWhenAvailable()` method and the following Gist for test scripts: https://gist.github.com/2946342

Maybe the upcoming PHP 5.4 release fix this bug since it will use the PHP's `date.timezone` when no time zone is provided. If confirmed the bug, it will need to be reported to the ext/intl maintainers.

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

by travisbot at 2012-06-18T05:02:05Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1644431) (merged a609d55c into cd0aa378).

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

by fabpot at 2012-06-28T14:09:08Z

@eriksencosta Now that PHP 5.4.4 is out, our tests for the Locale components are broken. Is this PR ready to be merged?

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

by eriksencosta at 2012-06-28T14:53:14Z

@fabpot the failed test case seems unrelated to this issue. I will debug it.

Failed test: `Locale\Tests\Stub\StubNumberFormatterTest::testParseTypeInt64IntlWith32BitIntegerInPhp32Bit`

Recent build job: http://travis-ci.org/#!/symfony/symfony/jobs/1729618

I just need to confirm mine todo note. If you want, merge it, I'll track this and make a new PR if needed (possibly only to remove the TODO note.)
2012-06-28 16:57:13 +02:00
Fabien Potencier 15ae25b2e2 merged branch Maks3w/patch-4 (PR #4616)
Commits
-------

fa050b7 [Security] Change return value in DocBlock

Discussion
----------

[Security] Change return value in DocBlock

Change the return value for avoid confusions.

```php
if (!$user instanceof UserInterface) {
    throw new AuthenticationServiceException('retrieveUser() must return a UserInterface.');
}
```

[UserAuthenticationProvider.php#L67](https://github.com/symfony/symfony/tree/2.0/src/Symfony/Component/Security/Core/Authentication/Provider/UserAuthenticationProvider.php#L67)

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

by travisbot at 2012-06-19T21:03:07Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1659148) (merged fa050b77 into e78a7bae).
2012-06-20 21:15:34 +02:00
Fabien Potencier 231d9d9073 merged branch vicb/security/password_0 (PR #4624)
Commits
-------

680b83c [Security] Allow "0" as a password

Discussion
----------

[Security] allow "0" as a password

```php
<?php
!"0" == true
```
2012-06-20 21:12:34 +02:00
Victor Berchet 680b83c6d3 [Security] Allow "0" as a password 2012-06-20 20:42:55 +02:00
Maks fa050b77af [Security] Change return value in DocBlock
Change the return value for avoid confusions.
2012-06-19 23:27:38 +03:00
Fabien Potencier e78a7baeac merged branch stof/composer_provide (PR #4614)
Commits
-------

2c12ed3 Added a missing provide for the swiftmailer bridge

Discussion
----------

Composer provide

Currently, the standalone bridge will be installed when a library requires it, even if you have the full framework, thus leading to weird issues if the versions missmatch (which is possible as the bridge does not have any hard requirement to a component in the composer.json which would enforce ``self.version``)
2012-06-19 20:03:24 +02:00
Christophe Coevoet 2c12ed3914 Added a missing provide for the swiftmailer bridge 2012-06-19 19:19:34 +02:00
Eriksen Costa a609d55c1f [Locale] fixed StubIntlDateFormatter to behave like the ext/intl implementation 2012-06-18 01:41:22 -03:00
Fabien Potencier cd0aa3781b tweaked the previous commit 2012-06-16 18:27:53 +02:00
Fabien Potencier a07f4f5f5f merged branch uwej711/only_redirect_on_get (PR #4580)
Commits
-------

3ce8227 [Security] Only redirect to urls called with http method GET

Discussion
----------

[Security] Only redirect to urls called with http method GET

Bug fix: [yes]
Feature addition: [no]
Backwards compatibility break: [no]
Symfony2 tests pass: [yes]
License of the code: MIT

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

by travisbot at 2012-06-14T12:01:32Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1619029) (merged 3ce8227a into 4e1e08ef).
2012-06-16 18:27:18 +02:00
Uwe Jäger 3ce8227a9b [Security] Only redirect to urls called with http method GET 2012-06-14 13:45:10 +02:00
Fabien Potencier 4e1e08eff7 merged branch stof/use_statements (PR #4576)
Commits
-------

0d67b9f Removed useless use statements
a3c1299 [Form] Added a missing use statement and fix a phpdoc

Discussion
----------

Use statements

This adds a missing use statements in the Form component (which would cause a fatal error if the exception was thrown) and removes useless use statements in the BrowserKit component (the use statement for the current class confuses the IDEs)

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

by travisbot at 2012-06-14T08:05:41Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1617154) (merged 0d67b9f2 into 41f48b7e).
2012-06-14 13:31:39 +02:00
Christophe Coevoet 0d67b9f25f Removed useless use statements 2012-06-14 09:54:43 +02:00
Christophe Coevoet a3c1299ac2 [Form] Added a missing use statement and fix a phpdoc 2012-06-14 09:53:49 +02:00
Fabien Potencier 41f48b7e6c merged branch mvrhov/1813_regression (PR #4551)
Commits
-------

5d88255 Authorization header should only be rebuild when Basic Auth scheme is used

Discussion
----------

[Regression fix] Authorization header should only be rebuild when Basic Auth scheme is used

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: fixes regression introduced by #1813
Todo: N/A
License of the code: MIT

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

by travisbot at 2012-06-11T14:40:28Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1592604) (merged cf5ee26a into 27100ba4).

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

by mvrhov at 2012-06-12T06:13:01Z

fixed

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

by travisbot at 2012-06-12T06:14:55Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1598555) (merged 5d88255d into 27100ba4).
2012-06-12 19:52:08 +02:00
Fabien Potencier ba16a51d37 changed getName() to name on all Reflection* object calls (fixes #4555, refs https://bugs.php.net/bug.php?id=61384) 2012-06-12 13:59:42 +02:00
Miha Vrhovnik 5d88255d4e Authorization header should only be rebuild when Basic Auth scheme is used 2012-06-12 08:10:53 +02:00
Fabien Potencier 27100ba4eb merged branch jakzal/yamlDoubleQuotesDumperFix (PR #4320)
Commits
-------

b631073 [Yaml] Fixed double quotes escaping in Dumper.

Discussion
----------

[Yaml] Fixed double quotes escaping in Dumper

Issue #4308 is caused by Dumper::escapeWithDoubleQuotes() which uses [str_replace()](http://php.net/str_replace).

From the php docs:

> Because str_replace() replaces left to right, it might replace a previously inserted value when doing multiple replacements.

We should be very careful in deciding about the order of elements in $escapees array. I'd really appreciate if someone reviewed my fix. Tests say I didn't break anything but I'm not sure what percentage of Yaml specification is covered by tests.

Bug fix: yes
Feature addition: no
Backwards compatibility break: not that I know
Symfony2 tests pass: [![Build Status](https://secure.travis-ci.org/jakzal/symfony.png?branch=yamlDoubleQuotesDumperFix)](http://travis-ci.org/jakzal/symfony)
Fixes the following tickets: #4308

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

by travisbot at 2012-05-18T08:53:51Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1364279) (merged 5192722c into a04acc89).

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

by travisbot at 2012-05-18T23:19:49Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1371539) (merged ecaa1aab into fc3c609b).

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

by dinamic at 2012-05-19T07:35:21Z

Something is really wrong with this method. You can see clearly that multiple characters would fail proper escaping.

Here's an example:
```
$value = '\\\\"some value\n \"some quoted string\" and \'some single quotes one\'"';
var_dump(Escaper::escapeWithDoubleQuotes($value));
string(72) ""\\\"some value\n \\some quoted string\\ and 'some single quotes one'\"""
```

To begin with the backslash - in the initial value you have 2 (escaped ones), that after escaping should result in 4, not in 1 (escaped). I guess this behavior has to be verified with the importer, but imho it does not seem right.

Does anyone know why this escaping wasn't done using a regular expression in first place?

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

by clemens-tolboom at 2012-05-19T10:18:58Z

Searching for https://duckduckgo.com/?q=what+is+\xc2\x85 the table on http://stackoverflow.com/questions/6609895/efficiently-replace-bad-characters is interesting enough to decide we need way more documentation on this file.

\xc2\x85 seems to be triple dot (ellipses)
\xe2\x80\xa9 seems to be paragraph separator see http://drupal.org/node/914360#comment-3468550
2012-06-09 17:04:17 +02:00
Fabien Potencier 15b5aa4f7c merged branch beberlei/GH-4491 (PR #4493)
Commits
-------

4938080 MethodNotImplementedException -> MethodArgumentValueNotImplementedException
789fc14 Accept calling setLenient(false)

Discussion
----------

GH-4491 - Move patch from master to 2.0

A patch in PR-4469 fixed an issue with setLenient() and not having intl. This was only merged into master, although the original issue was created in the 2.0 branch. This PR cherry-picked the patches against 2.0 again.

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

by travisbot at 2012-06-06T15:29:19Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1527145) (merged 49380804 into 9a5e6c90).

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

by kbond at 2012-06-06T17:42:40Z

fixes #4491
2012-06-08 09:44:31 +02:00
Fabien Potencier 2b767612c5 merged branch raulfraile/patch-3 (PR #4505)
Commits
-------

26d416f Fixed typo in ConstraintValidatorFactoryInterface PHPDoc (2.0)

Discussion
----------

Fixed typo in ConstraintValidatorFactoryInterface PHPDoc: Constrain => Constraint.

Bug fix: yes

Feature addition: no

Backwards compatibility break: no

Symfony2 tests pass: yes

Fixed typo in ConstraintValidatorFactoryInterface PHPDoc: Constrain => Constraint.
Fixes #4503

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

by travisbot at 2012-06-06T15:30:53Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1546330) (merged 26d416fe into 9a5e6c90).
2012-06-08 09:16:24 +02:00
Raul Fraile 26d416fe51 Fixed typo in ConstraintValidatorFactoryInterface PHPDoc (2.0) 2012-06-06 15:13:50 +03:00
Francesc Rosàs 4938080422 MethodNotImplementedException -> MethodArgumentValueNotImplementedException 2012-06-04 19:15:56 +02:00
Francesc Rosàs 789fc14145 Accept calling setLenient(false) 2012-06-04 19:15:47 +02:00
Fabien Potencier 9a5e6c9081 bumped Symfony version to 2.0.16-DEV 2012-05-31 17:18:01 +02:00
Fabien Potencier c2480c1e73 updated VERSION for 2.0.15 2012-05-30 18:59:58 +02:00
Fabien Potencier 9f729a806b update CONTRIBUTORS for 2.0.15 2012-05-30 18:59:37 +02:00
Fabien Potencier 27f9c02100 updated CHANGELOG for 2.0.15 2012-05-30 18:59:04 +02:00
Fabien Potencier aaa5cca19d updated vendors for 2.0.15 2012-05-30 18:57:09 +02:00
Fabien Potencier f541844c78 merged branch iteman/date-validation-with-singletext-form-fix (PR #4434)
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.
2012-05-30 10:49:34 +02:00
Fabien Potencier de560629c6 merged branch Maks3w/patch-3 (PR #4442)
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).
2012-05-30 07:07:58 +02:00
Maks face1f1bd1 Add 5.3.3 to Travis, now is available. 2012-05-28 15:38:15 +03:00
Victor Berchet cc42a1873d php 5.3.2 is no more supported by travis 2012-05-28 10:43:19 +03:00
KUBO Atsuhiro 20b556dacb [Form] fixed a bug that caused input date validation not to be strict when using the single_text widget with a datetime field 2012-05-28 14:41:53 +09:00
KUBO Atsuhiro 7e3213cf3f [Form] fixed a bug that caused input date validation not to be strict when using the single_text widget with a date field 2012-05-28 14:41:48 +09:00
Fabien Potencier 167779e546 merged branch jaugustin/fix-cache-clear-windows-2.0 (PR #4408)
Commits
-------

35b458f fix kernel root, linux dir separator on windows, to fix cache:clear issue

Discussion
----------

Fix cache clear windows 2.0

Hi,

This fix the issue #3453 for the 2.0 branch.

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

by travisbot at 2012-05-25T07:43:47Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1430935) (merged 35b458f6 into f9044e44).
2012-05-25 09:51:23 +02:00
jaugustin 35b458f6b8 fix kernel root, linux dir separator on windows, to fix cache:clear issue 2012-05-25 09:39:01 +02:00
Fabien Potencier f9044e44cc merged branch jakzal/CacheWarmerPassNotice (PR #4404)
Commits
-------

8da880c Fixed notice in AddCacheWarmerPass if there is no cache warmer defined.
8c6c86c Added unit tests for AddCacheWarmerPass class.

Discussion
----------

[FrameworkBundle] Fix for notice in AddCacheWarmerPass

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #4391

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

by travisbot at 2012-05-24T23:08:48Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1428180) (merged 8da880c3 into 7f93bf1f).
2012-05-25 09:35:02 +02:00
Jakub Zalas 8da880c394 Fixed notice in AddCacheWarmerPass if there is no cache warmer defined. 2012-05-24 23:58:50 +01:00