Commits
-------
fc7c7f6 [Form] Fix min/max length guessing for numeric types (fix#3091)
Discussion
----------
[Form] Fix min/max length guessing for numeric types (fix#3091)
Before this PR, the length was guessed from `strlen(min/max)`.
This is obviously false for float: `strlen("1.123") > strlen ("5")` then this guess is now low confidence only and is masked by a `null` medium confidence guess for floats (implemented in both doctrine ORM & validator).
This PR also includes some code reorg in order to improve readability.
I'll update Propel & Mongo if needed once this is merged.
_note: `5.000` did neither work because of `5e3`_
---------------------------------------------------------------------------
by Koc at 2012-03-19T23:42:01Z
Will `strlen` works correctly with multibyte strings?
---------------------------------------------------------------------------
by vicb at 2012-03-19T23:58:33Z
could numeric types be multibyte strings ?
---------------------------------------------------------------------------
by Koc at 2012-03-20T00:07:24Z
I thought it somehow concerns `Symfony\Component\Validator\Constraints\MaxLengthValidator` too.
---------------------------------------------------------------------------
by vicb at 2012-03-20T00:20:33Z
This PR is about numeric types only and the MaxLengthValidator is [multibyte safe:](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Validator/Constraints/MaxLengthValidator.php#L45)
Commits
-------
447d468 restore previous testing style with static fixtures for console
11585c3 fix Command:asXml to use processed help
304e13d replaced command names with supported placeholders in help texts
Discussion
----------
using the placeholder in command help texts
Replaced the command names with the already supported placeholders `%command.name%` and `%command.full_name%`. Thus preventing typos in future commands based on the existing ones.
---------------------------------------------------------------------------
by fabpot at 2012-02-09T06:26:07Z
That breaks the unit tests.
---------------------------------------------------------------------------
by Tobion at 2012-02-09T17:05:06Z
fixed
---------------------------------------------------------------------------
by stof at 2012-02-09T17:43:47Z
can you rebase your branch please ? it conflicts with master
---------------------------------------------------------------------------
by stof at 2012-02-09T17:44:11Z
the reason is simple: SwiftmailerBundle is gone :)
---------------------------------------------------------------------------
by Tobion at 2012-02-09T23:23:23Z
done
---------------------------------------------------------------------------
by fabpot at 2012-02-11T23:47:10Z
Can you squash your commit before I merge this PR? Thanks.
---------------------------------------------------------------------------
by Tobion at 2012-02-12T13:57:14Z
I'm unable to squash it into 1 commit because of the uptream commits inside.
I hope it's fine now. If not someone needs to help me.
---------------------------------------------------------------------------
by stof at 2012-02-12T14:27:38Z
``git rebase -i upstream/master`` should allow you rebasing things and squashing them toghter (changing the action for the second commit to ``squash``)
---------------------------------------------------------------------------
by Tobion at 2012-02-12T14:47:29Z
first i tried with git rebase -i head~4 (4 commits), but this showed many more external commits. second I tried git reset --soft with a clean commit, but still no success.
then I used your proposal. and there are always conflicts of stuff that is not part of my PR.
now the diff is messed up...
this is frustrating
---------------------------------------------------------------------------
by stof at 2012-02-12T14:58:43Z
The only reason why the diff is messed is because you messed it when resolving the conflicts by choosing the wrong result for the output. Please fix things as it means that merging your PR would revert changes done previosuly
---------------------------------------------------------------------------
by stof at 2012-02-12T15:00:18Z
Basically, you reverted most of the changes done in Symfony the few last days.
---------------------------------------------------------------------------
by Tobion at 2012-02-12T15:10:59Z
I used `git checkout --theirs .` when resolving. Whats the correct way?
---------------------------------------------------------------------------
by stof at 2012-02-12T15:13:21Z
Well, I generally resolve the conflicts myself instead of asking git to use one version, as generally the final code is not one of the versions by a mix of both versions (as both sides are likely to have done useful changes)
---------------------------------------------------------------------------
by Tobion at 2012-02-12T15:15:02Z
Yes but the conflicts are in files I never touched and that are not part of my changes.
I cannot resolve hundreds of files by hand.
---------------------------------------------------------------------------
by Tobion at 2012-02-12T15:41:31Z
Finally it worked. I used git reset head~1 and then discarded all foreign changes.
There you go.
---------------------------------------------------------------------------
by Tobion at 2012-02-14T14:06:04Z
@fabpot ping
---------------------------------------------------------------------------
by Tobion at 2012-02-20T18:20:50Z
@fabpot ping
---------------------------------------------------------------------------
by stof at 2012-03-02T22:14:49Z
@Tobion the branch needs to be rebased. It conflicts with master
---------------------------------------------------------------------------
by Tobion at 2012-03-21T04:22:10Z
All done. I don't want to squash commits because they are self-contained fixes and changes that might be needed for future references (like the dynamic tests for -`>run()`).
Commits
-------
979c02b [HttpKernel] Fix MongoDbProfilerStorageTest
Discussion
----------
[HttpKernel] Fix MongoDbProfilerStorageTest
* The test was failing if no connection (trying to call purge)
* The extension / connection was tested before each single test
Commits
-------
c1206c3 [FrameworkBundle] Subrequests should always use GET method
Discussion
----------
[FrameworkBundle] Subrequests should always use GET method
Bug fix: yes
Feature addition: no
Backwards compatibility break: maybe?
Symfony2 tests pass: [![Build Status](https://secure.travis-ci.org/asm89/symfony.png?branch=subrequest-request-method)](http://travis-ci.org/asm89/symfony)
Fixes the following tickets: -
Todo: -
When generating a subrequest using the bundle/controller notation instead of a url, the method of the duplicated subrequest isn't set to GET, while this does happen in the other case (see [here](https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/FrameworkBundle/HttpKernel.php#L143)). This causes weird behavior when embedding actions with forms on a page that is already reached through a POST request (since most forms check if POST was the request method before binding to the request).
Commits
-------
9ed7c03 fixed code coverage raport generation
Discussion
----------
fixed code coverage raport generation
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: no (tests were already broken)
Fixes the following tickets: -
Todo: -
I wanted to run the test coverage for Symfony2.1.
I installed vendors using composer but code coverage script failed (running unit tests failed too).
After installing vendors using vendors.php I got errors about missing classes:
`Class 'Doctrine\Common\DataFixtures\Loader' not found`
and later: `Class 'Monolog\Handler\ChromePHPHandler' not found.`
The changes made it possible to run the code coverage script.
Monolog was already present in autoload.php.dist but was not present in vendors.php script, doctrine fixtures were not included in both.
Commits
-------
4d4ef24 [Console] Stop parsing options after encountering "--" token
Discussion
----------
[Console] Stop parsing options after encountering "--" token
This enables support for arguments with leading dashes (e.g. "-1"), as supported by getopt in other languages.
[![Build Status](https://secure.travis-ci.org/jmikola/symfony.png?branch=double-dash)](http://travis-ci.org/jmikola/symfony)
The test suite currently fails due to 7a54fe41ca. ArgvInputTest passes, and these changes don't appear to break anything else.
![](http://media.giantbomb.com/uploads/2/27528/1061704-mario_kart_double_dash___title_screen_super.jpg)
Aside: This got me thinking about how one would pass an option value of "-1". I suppose for input options with `VALUE_OPTIONAL`, it would be ambiguous if "-1" followed; however, `VALUE_REQUIRED` should probably require that the next token is captured as the option value. In my tests, a required option value with a leading dash was interpreted as another option. The workaround for all of this is to use the space-less syntax (e.g. `-f=-1`).
---------------------------------------------------------------------------
by fabpot at 2012-03-17T08:43:15Z
AFAIK, the `--` should disable both option and argument parsing, no?
---------------------------------------------------------------------------
by jmikola at 2012-03-18T02:13:51Z
If that were the case, what would be the point of using `--` at all? :)
* http://wiki.bash-hackers.org/dict/terms/end_of_options
* http://perldoc.perl.org/Getopt/Long.html#Mixing-command-line-option-with-other-arguments
Commits
-------
8642473 Changed instances of \DateTimeZone::UTC to 'UTC' as the constant is not valid a produces this error when DateTimeZone is instantiated: DateTimeZone::__construct() [<a href='datetimezone.--construct'>datetimezone.--construct</a>]: Unknown or bad timezone (1024)
Discussion
----------
[Locale] DateTimeZone called incorrectly by default
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: no (there were two tests that were failing previously, that still fail)
Fixes the following tickets: none
Todo: none
While running, a warning throws every single time when the code
```php
new \DateTimeZone(\DateTimeZone::UTC);
```
is encountered. It is normally caught as a thrown exception and then corrected here:
```php
// src/Symfony/Component/Locale/Stub/StubIntlDateFormatter.php:442
try {
$this->dateTimeZone = new \DateTimeZone($timeZoneId);
} catch (\Exception $e) {
$this->dateTimeZone = new \DateTimeZone('UTC');
}
```
However in my particular infrastructure, for whatever reason in production only, it causes an error to appear on shutdown in the logs. As ultimately the constant can NEVER pass, it should not be attempted with the constant. Instead, the correct 'UTC' should be passed in (as done in the catch statement).