- The route compiler does not add extra space or line-feed,
- The generated regex does not use the 'x' modified any more,
- The PHP and apache matchers do not need to strip any chars (vs space and line feed before),
- The space characters are escaped according to the apache format
Commits
-------
6486e25 fixed used statements
3530858 fixed typehints in docblocks (IDE completion works now)
Discussion
----------
Typehint fix
---------------------------------------------------------------------------
by fabpot at 2012-04-10T09:12:51Z
For type hint in PHPDoc, we are using the class name and not the full namespace (of course, we need the associated use statement).
---------------------------------------------------------------------------
by brikou at 2012-04-10T09:29:39Z
@fabpot ok fabien, i've added the use statements and (for both entityRepository and manager) cheer
Commits
-------
31dde14 [Locale] updated StubIntlDateFormatter::format() behavior for PHP >= 5.3.4
Discussion
----------
[Locale] updated StubIntlDateFormatter::format() behavior for PHP >= 5.3.4
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
[![Build Status](https://secure.travis-ci.org/eriksencosta/symfony.png?branch=locale)](http://travis-ci.org/eriksencosta/symfony)
---------------------------------------------------------------------------
by drak at 2012-04-08T23:20:20Z
This looks like a feature addition as opposed to a bug fix and if so, should probably go in the master branch rather than 2.0.
---------------------------------------------------------------------------
by stof at 2012-04-08T23:30:25Z
@drak it is a bug fix as the stub is meant to have the same behavior than the real intl
---------------------------------------------------------------------------
by drak at 2012-04-08T23:36:08Z
ok, thanks for the clarification, I wasnt sure.
---------------------------------------------------------------------------
by eriksencosta at 2012-04-08T23:44:22Z
@stof is right. I myself fixed it in master and then remembered that bug fixes should be made in 2.0.
Commits
-------
f3408cc [Finder] Avoid unnecessary use of the @ operator
Discussion
----------
[Finder] Avoid unnecessary use of the @ operator
Tests are passing
---------------------------------------------------------------------------
by stof at 2012-04-08T17:42:01Z
Does PHP really throw an exception on failure or is it only the case when an error handler converts a warning to an exception ? It would be weird given the small amount of cases where PHP uses exceptions.
---------------------------------------------------------------------------
by Seldaek at 2012-04-08T17:43:51Z
```
$ php -r 'new DateTime("foo");'
Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (foo) at
position 0 (f): The timezone could not be found in the database' in Command line code on line 1
```
---------------------------------------------------------------------------
by Seldaek at 2012-04-08T17:45:09Z
In a constructor it's pretty hard to return false, so it has to throw an exception. The php.net docs also say it so I'm fairly sure it's nothing specific to my setup.
Commits
-------
292364a [DomCrawler] Added some docbocks into DomCrawler classes. Closes#3832
Discussion
----------
[DomCrawler] Added some docbocks into DomCrawler classes, reordered func...
...tions to follow Symfony 2 CS. Closes#3832
---------------------------------------------------------------------------
by fabpot at 2012-04-08T10:38:39Z
Can you revert the code move as it makes merges between 2.0 and master much more complex. Thanks.
---------------------------------------------------------------------------
by stloyd at 2012-04-08T11:36:53Z
Reverted and changed commit message.
@fabpot Should I make PR for `master` according to CS ?
---------------------------------------------------------------------------
by stof at 2012-04-08T11:40:58Z
@stloyd this can be considered as a bugfix as you are fixing the phpdoc. So 2.0 is fine
Commits
-------
7ce22f0 [Console] Add docblocks
8a2b115 [Console] Mock terminal size to prevent formatting errors on small terminals
Discussion
----------
[Console] Fixes terminal width in tests
This fixes the [tests that broke on travis-ci](http://travis-ci.org/#!/symfony/symfony/jobs/1031109) (which seems to advertise a terminal width of ~34, not sure why).
Commits
-------
595cc11 [Console] Wrap exception messages to the terminal width to avoid ugly output
97f7b29 [Console] Avoid outputing \r's in exception messages
Discussion
----------
[Console] Exception rendering fixes
This fixes two things:
- `\r`'s in exception messages were output (in case of `\r\n` newlines), creating really weird results on windows.
- long exception messages were wrapping and then the "red" block was completely messed up, with half black/half red lines, now it's wrapped before output if the terminal width can be detected.
If you don't care about merging this for 2.0, you can also merge the `console_ex` branch which applies on master. Due to moving tests and renaming of some normalize stuff in the tests, the two test patches are kind of different.
RFC: I am really not sure where to put those getTerminalWidth/Height methods. I guess this is not the best place.
Commits
-------
24a0d0a [DependencyInjection] Support Yaml calls without arguments
Discussion
----------
[DependencyInjection] Support Yaml calls without arguments
Commits
-------
e4f3fd9 Fixed example code.
Discussion
----------
[Translation] example code did not work.
The example code for Translation did not compile. And the trans() result was void.
Commits
-------
15dd17e Simplified CONTENT_ headers retrieval
Discussion
----------
Header bag
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes (actually no but I think this has nothing to do with this PR...)
Fixes the following tickets: -
Todo: -
Commits
-------
86a3512 [FrameworkBundle] Add support for full URLs to redirect controller
Discussion
----------
[FrameworkBundle] Add support for full URLs to redirect controller
I'd consider this a bugfix since at the moment using an URL just redirects to `/current/pathhttp://example.org`.
Commits
-------
0c9b2d4 use SecurityContextInterface instead of SecurityContext
Discussion
----------
[2.0][Security] use SecurityContextInterface instead of SecurityContext
see https://github.com/symfony/symfony/pull/3522 (this is a fix for the 2.0 branch)
---------------------------------------------------------------------------
by pminnieur at 2012-03-21T13:25:59Z
*ping* it still missed the 2.0.12 release ...
---------------------------------------------------------------------------
by stof at 2012-03-21T16:41:28Z
@pminnieur you PR has been merged into master, not into 2.0, so it will only be in 2.1
---------------------------------------------------------------------------
by pminnieur at 2012-03-21T16:43:02Z
I know, and this is a second PR for 2.0 branch.
Commits
-------
068e859 [TwigBundle] Changed getAndCleanOutputBuffering() handling of systems where ob_get_level() never returns 0
Discussion
----------
[TwigBundle] Changed getAndCleanOutputBuffering() handling of systems where ob_get_level() never returns 0
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: [![Build Status](https://secure.travis-ci.org/lencioni/symfony.png)](http://travis-ci.org/lencioni/symfony)
Fixes the following tickets: -
Todo: -
Relying on decrementing a counter has two problems. First, and most importantly, if the output buffering nesting level is greater than the counter, the function does not perform the expected task. Secondly, on systems where the counter is needed, a lot of unnecessary extra loops would potentially occur.
This approach checks to see if the level has stayed the same from the previous iteration and if it has it stops looping.
---------------------------------------------------------------------------
by fabpot at 2012-03-21T21:29:50Z
Have you encounter this problem to confirm that your approach works?
---------------------------------------------------------------------------
by vicb at 2012-03-21T21:35:39Z
@lencioni could you also provide an answer from my question in the former version of this PR ?
---------------------------------------------------------------------------
by lencioni at 2012-03-21T21:56:06Z
@fabpot I have not encountered this problem personally, but the code I submitted is [similar to an approach I use in SLIR](https://github.com/lencioni/SLIR/blob/master/core/slir.class.php#L462), which has been successful for people who have encountered it.
@vicb You are referring to [this question](https://github.com/symfony/symfony/pull/3666#issuecomment-4626105), right?
>It was possible than the body of the while loop was never executed before, it is no more. Is this expected ?
I think you may have misinterpreted the change I submitted. In the original code, there were two conditions being checked in the while loop. The first condition has not changed in my code and could still prevent the body of the while loop from being never executed. The second condition in the original code would always evaluate to 99 on the first iteration, which would not prevent the loop from running.
---------------------------------------------------------------------------
by vicb at 2012-03-21T22:00:01Z
oops my mistake, sorry.
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: [![Build Status](https://secure.travis-ci.org/lencioni/symfony.png)](http://travis-ci.org/lencioni/symfony)
Fixes the following tickets: -
Todo: -
Relying on decrementing a counter has two problems. First, and most importantly, if the output buffering nesting level is greater than the counter, the function does not perform the expected task. Secondly, on systems where the counter is needed, a lot of unnecessary extra loops would potentially occur.
This approach checks to see if the level has stayed the same from the previous iteration and if it has it stops looping.
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
-------
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).