Commit Graph

7626 Commits

Author SHA1 Message Date
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
Fabien Potencier
3ed8979448 merged branch arnapou/2.0 (PR #3610)
Commits
-------

fbed9ff Update src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php

Discussion
----------

Branch 2.0 - Correct bad HttpCache behaviour when waiting for unlock.

I read the class Symfony\Component\HttpKernel\HttpCache\HttpCache and I found something which looks like a bug lines 518-520 (in lock method) :
$wait = 0;
while (is_file($lock) && $wait < 5000000) {
usleep($wait += 50000);
}
This code can wait at maximum 50000+100000+150000+.... 4950000 µs = more than 250 seconds !

I corrected like that :
$wait = 0;
while (is_file($lock) && $wait < 5000000) {
usleep(50000);
$wait += 50000
}

This code will wait 5 sec maximum.

This is more coherent if we read the following lines of this method.

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

by arnapou at 2012-03-15T20:09:13Z

Hope I succeded to do a correct PR.
One hour of manipulation in Github for 2 lines of code let me a bitter taste on the tongue...
I was closed to tell you "Do It Yourself" ... what a waste of time...
This interface is not obvious, even if we had already worked on svn/git on *nix.
2012-03-15 21:22:42 +01:00
Arnaud Buathier
fbed9ff8de Update src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php 2012-03-15 20:27:40 +01:00
Fabien Potencier
5840d05f13 merged branch vicb/twig_cfg/2.0 (PR #3545)
Commits
-------

eee5065 [TwigBundle] Workaround a flaw in the design of the configuration (normalization)

Discussion
----------

[TwigBundle] Workaround a flaw in the design of the configuration (norma...

...lization)

see #2823

@Seldaek please comment.

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

by Seldaek at 2012-03-09T20:52:47Z

It seems fine at first glance. I don't have time to look at it in detail right now sorry.
2012-03-15 16:42:06 +01:00
Fabien Potencier
de5e80b65c merged branch xavierbriand/pr-datetime-type (PR #3604)
Commits
-------

1b395f5 Revert "Throw exception when "date_widget" option is not equal to "time_widget""

Discussion
----------

Reverts commit 3c2539 to remove exception when DateTypeType has differents date and time widgets

see https://github.com/symfony/symfony/pull/1419
2012-03-15 15:43:43 +01:00
Xavier Briand
1b395f5351 Revert "Throw exception when "date_widget" option is not equal to "time_widget""
This reverts commit 3c2539fccb.

Conflicts:

	tests/Symfony/Tests/Component/Form/Extension/Core/Type/DateTimeTypeTest.php
2012-03-15 15:32:52 +01:00
Fabien Potencier
8a574ad078 merged branch fixe/patch-3 (PR #3597)
Commits
-------

ed218bb Fixed an "Array to string conversion" warning when using PHP 5.4. Also affects Symfony2 master.

Discussion
----------

[Config] Fixed an "Array to string conversion" warning when using PHP 5.4

This also affects Symfony2 master
2012-03-15 13:45:40 +01:00
Tiago Ribeiro
ed218bb1b2 Fixed an "Array to string conversion" warning when using PHP 5.4. Also affects Symfony2 master. 2012-03-14 18:05:51 +00:00
Fabien Potencier
07d2d2e94a merged branch alan0101c/datatransformer-tz-fix (PR #3589)
Commits
-------

17c3482 fixed timezone bug in DateTimeToTimestampTransformer

Discussion
----------

[FIX]fixed timezone bug in DateTimeToTimestampTransformer

After several trials, I found out that the original code

```php
$dateTime = new \DateTime(sprintf("@%s %s", $value, $this->outputTimezone));
```
would create a DateTime object with timezone being '0000', even though $this->outputTimezone is set to my local timezone.

so I expanded the code a bit and it's working now.

PHP Test code,

```PHP
$d = new DateTime("@1234567890 Asia/Tokyo");
echo date_format($d, 'Y/m/d H:i:s')."\n";
echo $d->getTimezone()->getName()."\n";

$d = new DateTime("now Asia/Hong_Kong");
echo date_format($d, 'Y/m/d H:i:s')."\n";
echo $d->getTimezone()->getName()."\n";
```

The output is as followed:
2009/02/13 23:31:30
+00:00
2012/03/13 03:35:55
Asia/Hong_Kong

This could be a bug of PHP,

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

by stealth35 at 2012-03-13T15:54:31Z

👍
2012-03-14 13:07:13 +01:00
Fabien Potencier
d4057aed08 merged branch Spea/2.0 (PR #3590)
Commits
-------

50cb486 Fixed proxy generation in the DoctrineBundle when using Doctrine >= 2.2.0

Discussion
----------

[DoctrineBundle] Fixed proxy generation with Doctrine >= 2.2.0

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes

The issue here was, that the name of the generated Proxy files have changed in Doctrine 2.2.0, thus the autoloader in the DoctrineBundle stoped working.

This PR fixes this issue by applying different string manipulations to the given class name depending on the currently used Doctrine version.

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

by fabpot at 2012-03-14T07:13:23Z

Can you squash your commits before I merge? Thanks.

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

by Spea at 2012-03-14T09:33:10Z

Should I open a new PR when squashed the commits? Because I don't know what happens when I force the remote repository to push my squashed commits.

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

by stloyd at 2012-03-14T09:48:05Z

First you should rebase (normally), then squash and push with `--force`, then GH will automaticaly update this PR (if you push into same branch on which bases this PR).

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

by Spea at 2012-03-14T10:04:30Z

Yeah I knew about the ```--force``` option. I just wasn't sure what happens when I do it. Thank you!

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

by Spea at 2012-03-14T10:14:23Z

Squashed commits.
2012-03-14 12:53:37 +01:00
Martin Parsiegla
50cb486b67 Fixed proxy generation in the DoctrineBundle when using Doctrine >= 2.2.0 2012-03-14 11:40:15 +01:00
Fabien Potencier
92c5785fe4 merged branch vicb/validator/race_2.0 (PR #3587)
Commits
-------

93cc9ef [Validator] Remove a race condition in the ClassMetaDataFactory (fix #3217)

Discussion
----------

[Validator] Remove a race condition (fix #3217)

#3581 for 2.0
2012-03-13 11:33:55 +01:00
Victor Berchet
93cc9efb8a [Validator] Remove a race condition in the ClassMetaDataFactory (fix #3217) 2012-03-13 10:54:33 +01:00
Fabien Potencier
e335fa208c merged branch stof/doctrine_autoload (PR #3584)
Commits
-------

878c239 Fixed autoloader leakage in tests

Discussion
----------

Doctrine autoload

The autoloader for proxies is now unregistered on shutdown to avoid
having several instances registered at the same time in tests.
2012-03-13 10:26:39 +01:00
Christophe Coevoet
878c2399f1 Fixed autoloader leakage in tests
The autoloader for proxies is now unregistered on shutdown to avoid
having several instances registered at the same time in tests.
2012-03-13 10:01:34 +01:00
Alan Chen
17c3482309 fixed timezone bug in DateTimeToTimestampTransformer 2012-03-12 22:51:14 +08:00
Fabien Potencier
b062cc78d4 merged branch iambrosi/issue2653 (PR #3564)
Commits
-------

aa53b88 Sets _format attribute only if it wasn't set previously by the user

Discussion
----------

Sets _format attribute only if it wasn't set previously by the user.

Fixes #2653
2012-03-12 09:34:46 +01:00
Fabien Potencier
d338c762c2 merged branch meandmymonkey/xml-output-fix (PR #3569)
Commits
-------

705e460 provided unmerged definition for correct help generation
45bbb5b added getNativeDefinition() to allow specifying an alternate InputDefinition for help generation

Discussion
----------

[Console] Xml output fix

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #2667
Todo: add specific test

As per my comment [here](https://github.com/symfony/symfony/issues/2667#issuecomment-4431944), added the ability to provide an InputDefinition that will not be changed by merging with the Application InputDefinition..
2012-03-12 09:18:38 +01:00
Andreas Hucks
705e46018e provided unmerged definition for correct help generation 2012-03-12 01:11:44 +01:00
Andreas Hucks
45bbb5be01 added getNativeDefinition() to allow specifying an alternate InputDefinition for help generation 2012-03-12 01:10:54 +01:00
Ismael Ambrosi
aa53b887d1 Sets _format attribute only if it wasn't set previously by the user 2012-03-11 16:56:20 -03:00
Fabien Potencier
0d89f13560 fixed CS 2012-03-11 17:59:42 +01:00
Fabien Potencier
a82737528c [CssSelector] fixed CssSelector::toXPath() when the CSS selector is an empty string 2012-03-11 10:18:25 +01:00
Fabien Potencier
1b9b42893f merged branch stof/composer_deps (PR #3553)
Commits
-------

f26c1ce Fixed constraint requirements for Doctrine Common
011791d [Form] Moved the Validator component to the suggest section

Discussion
----------

Composer deps

There is no hard dependency to the Validator component in the Form, as said on Twitter when @harikt tried to use it. I kept the Locale component as a requirement as it is used by the LanguageTyep, CountryType and LocaleType which will be registered when using the CoreExtension.

The constraints for Doctrine deps are fixed too: adding an upper bound everywhere as we don't know the future to guarantee the compatibility (and for instance, 2.0.9 and lower were not compatible with ORM 2.2 as we had to fix the bundle), and the bridge is compatible with Common 2.2 too, not only with 2.1.

I found 2 other places where the dependencies should be discussed:

- the Validator component marks a hard dependency to Doctrine Common for its annotation reader. There is a dependency only when using annotation so it should not be a hard requirement IMO but a suggestion. the issue is that the [ValidatorFactory](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Validator/ValidatorFactory.php) (not used by the framework itself) will add an annotation loader when relying on the default value of the arguments, which means that people that don't take care will need Common. Would it make sense to change the default so that Common is needed only when the user explicitly asks to use annotations ? Moving Common from require to suggest would make it easier for people using the Validator component standalone if they don't use annotations
- the Security component suggests the Finder and ClassLoader components. But these ones are only used by the [dev script](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Security/Acl/Resources/bin/generateSql.php) used to generate the SQL schema shipped in the component. Does it really make sense to list them as people cloning the component should probably never use this script (which alters the files in the component) ?

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

by fabpot at 2012-03-11T08:14:46Z

+1 for removing Doctrine Common as a required dependency for the Validator component.

+1 for removing ClassLoader and Finder from the Security suggestions.
2012-03-11 09:15:23 +01:00
Christophe Coevoet
f26c1ce98d Fixed constraint requirements for Doctrine Common 2012-03-11 02:47:07 +01:00