Commit Graph

7450 Commits

Author SHA1 Message Date
Victor Berchet
6465a6987a [Routing] Fixes to handle spaces in route pattern
- 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
2012-04-10 17:29:34 +02:00
Fabien Potencier
667f8fd474 merged branch brikou/typehint_fix (PR #3853)
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
2012-04-10 11:43:16 +02:00
Brikou CARRE
6486e25a38 fixed used statements 2012-04-10 11:28:30 +02:00
Brikou CARRE
353085857b fixed typehints in docblocks (IDE completion works now) 2012-04-10 11:04:07 +02:00
Fabien Potencier
d8652785cf merged branch eriksencosta/locale (PR #3840)
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.
2012-04-09 15:05:51 +02:00
Eriksen Costa
31dde144ff [Locale] updated StubIntlDateFormatter::format() behavior for PHP >= 5.3.4 2012-04-08 19:21:28 -03:00
Fabien Potencier
da0eaa63cc merged branch Seldaek/at_op (PR #3837)
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.
2012-04-08 20:00:30 +02:00
Jordi Boggiano
f3408ccf2c [Finder] Avoid unnecessary use of the @ operator 2012-04-08 19:39:04 +02:00
Fabien Potencier
27c41f1e8e merged branch stloyd/crawler_phpdoc (PR #3834)
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
2012-04-08 14:03:25 +02:00
Joseph Bielawski
292364ad70 [DomCrawler] Added some docbocks into DomCrawler classes. Closes #3832 2012-04-08 13:35:35 +02:00
Fabien Potencier
38e17c2e87 merged branch Seldaek/termwidth (PR #3805)
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).
2012-04-06 19:14:31 +02:00
Jordi Boggiano
7ce22f0cef [Console] Add docblocks 2012-04-06 18:25:51 +02:00
Jordi Boggiano
8a2b115824 [Console] Mock terminal size to prevent formatting errors on small terminals 2012-04-06 18:24:40 +02:00
Fabien Potencier
1387415ec3 merged branch hhamon/route_collection_better_exception_message (PR #3801)
Commits
-------

04ae7cc [Routing] fixed exception message.
f7647f9 [Routing] improved exception message when giving an invalid route name.

Discussion
----------

Route collection better exception message

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
2012-04-06 14:22:10 +02:00
Fabien Potencier
f2398f61a6 merged branch Seldaek/console_ex_20 (PR #3802)
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.
2012-04-06 14:15:48 +02:00
Fabien Potencier
c140386957 merged branch ruimarinho/http_digest (PR #3781)
Commits
-------

fc41d4f [Security] [HttpDigest] Fixes a configuration error caused by an invalid 'key' child node configuration

Discussion
----------

[Security] [HttpDigest] Fixes a configuration error caused by an invalid "key" child node configuration

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: ![Build status](https://secure.travis-ci.org/ruimarinho/symfony.png?branch=http_digest)
2012-04-06 14:14:53 +02:00
Jordi Boggiano
595cc11251 [Console] Wrap exception messages to the terminal width to avoid ugly output 2012-04-06 13:54:54 +02:00
Jordi Boggiano
97f7b29783 [Console] Avoid outputing \r's in exception messages 2012-04-06 13:51:32 +02:00
Hugo Hamon
04ae7cc605 [Routing] fixed exception message. 2012-04-06 11:45:36 +02:00
Hugo Hamon
f7647f9325 [Routing] improved exception message when giving an invalid route name. 2012-04-06 10:49:41 +02:00
Johannes
0024ddce9c Fix for using route name as check_path. 2012-04-05 12:20:11 +03:00
Rui Marinho
fc41d4f223 [Security] [HttpDigest] Fixes a configuration error caused by an invalid 'key' child node configuration 2012-04-04 14:28:24 +01:00
Fabien Potencier
e4ebffb01b Revert "merged branch ruimarinho/http_digest (PR #3778)"
This reverts commit eb6a26f572, reversing
changes made to a10fee16c1.
2012-04-04 13:13:39 +02:00
Fabien Potencier
eb6a26f572 merged branch ruimarinho/http_digest (PR #3778)
Commits
-------

fd1ea69 [Security] [HttpDigest] Fixes a configuration error caused by an invalid key child node configuration

Discussion
----------

[Security] [HttpDigest] Fixes a configuration error caused by an invalid "key" child node configuration

```
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
```
2012-04-04 12:56:30 +02:00
Rui Marinho
fd1ea69b78 [Security] [HttpDigest] Fixes a configuration error caused by an invalid key child node configuration 2012-04-04 11:36:25 +01:00
Fabien Potencier
a10fee16c1 merged branch igorw/dic-yaml-without-args (PR #3747)
Commits
-------

24a0d0a [DependencyInjection] Support Yaml calls without arguments

Discussion
----------

[DependencyInjection] Support Yaml calls without arguments
2012-04-01 10:27:21 +02:00
Igor Wiedler
24a0d0a2dc [DependencyInjection] Support Yaml calls without arguments 2012-03-31 21:11:13 +02:00
Fabien Potencier
d12e398cbe merged branch clemens-tolboom/2.0 (PR #3725)
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.
2012-03-29 14:54:23 +02:00
Clemens Tolboom
e4f3fd9a72 Fixed example code. 2012-03-29 14:32:59 +02:00
Fabien Potencier
51eac4b5fc merged branch jalliot/header-bag (PR #3702)
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: -
2012-03-27 08:01:31 +02:00
Jordan Alliot
15dd17e9bd Simplified CONTENT_ headers retrieval 2012-03-26 23:58:48 +02:00
Fabien Potencier
42b8c7aba9 merged branch Seldaek/redirect (PR #3693)
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`.
2012-03-26 09:31:42 +02:00
Jordi Boggiano
86a3512bd4 [FrameworkBundle] Add support for full URLs to redirect controller 2012-03-25 20:43:23 +02:00
Fabien Potencier
5ede11199e merged branch pminnieur/2.0 (PR #3537)
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.
2012-03-23 13:49:58 +01:00
Fabien Potencier
971c71f11e merged branch aubx/croatian_validator_translation_2_0 (PR #3676)
Commits
-------

d42ae47 Added Croatian validator translation for 2.0

Discussion
----------

[FrameworkBundle][translations]Croatian validator translation
2012-03-22 20:16:01 +01:00
aubx
d42ae470ec Added Croatian validator translation for 2.0 2012-03-22 19:57:58 +01:00
Fabien Potencier
c761d0cebb merged branch lencioni/fix-clean-output-buffering (PR #3667)
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.
2012-03-22 14:11:08 +01:00
Joe Lencioni
068e859f3d [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.
2012-03-21 15:25:48 -05:00
Fabien Potencier
efa807aa7b [HttpKernel] fixed sub-request which should be always a GET (refs #3657) 2012-03-21 00:31:28 +01:00
Fabien Potencier
0eddc4a507 merged branch asm89/subrequest-request-method (PR #3657)
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).
2012-03-21 00:29:58 +01:00
Alexander
c1206c33c2 [FrameworkBundle] Subrequests should always use GET method 2012-03-20 23:59:34 +01:00
Fabien Potencier
f11f7fcbe0 bumped Symfony version to 2.0.13-DEV 2012-03-19 01:27:26 +01:00
Fabien Potencier
0ab776227a updated VERSION for 2.0.12 2012-03-19 00:57:46 +01:00
Fabien Potencier
b7d0a4bd41 update CONTRIBUTORS for 2.0.12 2012-03-19 00:57:27 +01:00
Fabien Potencier
a3d9ed136d updated CHANGELOG for 2.0.12 2012-03-19 00:56:33 +01:00
Fabien Potencier
66267bf8d0 updated vendors for 2.0.12 2012-03-19 00:53:37 +01:00
Fabien Potencier
65a83dcba0 merged branch nodrew/2.0 (PR #3625)
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).
2012-03-17 09:45:14 +01:00
Fabien Potencier
aad7d6e758 merged branch pulzarraider/webprofiler_serch_ipv6_fix (PR #3626)
Commits
-------

54b2413 Webprofiler ipv6 search fix

Discussion
----------

[WebProfilerBundle] ipv6 search fix

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
2012-03-17 09:41:12 +01:00
Andrej Hudec
54b24134e8 Webprofiler ipv6 search fix 2012-03-16 22:52:43 +01:00
Drew Butler
8642473185 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) 2012-03-16 17:19:53 -04:00