Commit Graph

11599 Commits

Author SHA1 Message Date
Fabien Potencier 2447757a4e merged branch bschussek/datetimetostringtransformer (PR #6333)
This PR was merged into the 2.1 branch.

Commits
-------

b20c5ca [Form] Fixed reverse transformation of values in DateTimeToStringTransformer

Discussion
----------

[Form] Fixed reverse transformation of values in DateTimeToStringTransformer

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: -

The parts not given in the format are reset to the corresponding values of
the UNIX base timestamp. For example, when parsing with the format "Y-m-d",
parsing

    "2012-05-18"

now results in the date

    "2012-05-18 00:00:00 UTC"

instead of

    "2012-05-18 12:58:27 UTC"

as before, where the time part corresponded to the local server time.

Another example: When parsing with the format "H:i:s", parsing

    "12:58:27"

now results in

    "1970-01-01 12:58:27 UTC"

instead of

    "2012-12-13 12:58:27 UTC"

as before, where again the date part corresponded to the local server time.

This behavior is now consistent with DateTimeToArrayTransformer and
DateTimeToLocalizedStringTransformer.
2012-12-13 21:21:50 +01:00
Bernhard Schussek b20c5ca2ef [Form] Fixed reverse transformation of values in DateTimeToStringTransformer
The parts not given in the format are reset to the corresponding values of
the UNIX base timestamp. For example, when parsing with the format "Y-m-d",
parsing

    "2012-05-18"

now results in the date

    "2012-05-18 00:00:00 UTC"

instead of

    "2012-05-18 12:58:27 UTC"

as before, where the time part corresponded to the local server time.

Another example: When parsing with the format "H:i:s", parsing

    "12:58:27"

now results in

    "1970-01-01 12:58:27 UTC"

instead of

    "2012-12-13 12:58:27 UTC"

as before, where again the date part corresponded to the local server time.

This behavior is now consistent with DateTimeToArrayTransformer and
DateTimeToLocalizedStringTransformer.
2012-12-13 19:30:06 +01:00
Fabien Potencier 521fcb1c8b merged branch Seldaek/consolfix (PR #6330)
This PR was merged into the 2.1 branch.

Commits
-------

d2231d8 [Console] Add support for parsing terminal width/height on localized windows, fixes #5742

Discussion
----------

[Console] Add support for parsing terminal width/height on localized windows

Fixes #5742

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

by pborreli at 2012-12-13T17:44:53Z

thanks
2012-12-13 19:14:26 +01:00
Jordi Boggiano d2231d8cd8 [Console] Add support for parsing terminal width/height on localized windows, fixes #5742 2012-12-13 18:42:00 +01:00
Fabien Potencier 722c19bca5 merged branch bschussek/issue5828 (PR #6321)
This PR was merged into the 2.1 branch.

Commits
-------

03b880f [Form] Fixed treatment of countables and traversables in Form::isEmpty()

Discussion
----------

[Form] Fixed treatment of countables and traversables in Form::isEmpty()

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #5826, #5828
Todo: -
License of the code: MIT
Documentation PR: -
2012-12-13 16:19:02 +01:00
Bernhard Schussek 03b880fed0 [Form] Fixed treatment of countables and traversables in Form::isEmpty() 2012-12-13 15:18:14 +01:00
Fabien Potencier 6e499a368b merged branch Tobion/controllernameparser (PR #6297)
This PR was submitted for the master branch but it was merged into the 2.1 branch instead (closes #6297).

Commits
-------

444fea4 [FrameworkBundle] refactor ControllerNameParser

Discussion
----------

[FrameworkBundle] refactor ControllerNameParser

bc break: no

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

by Tobion at 2012-12-12T16:38:12Z

Maybe merge into 2.1 instead? So master and 2.1 do not drift apart by pure refactorings? It also includes a phpdoc fix.
2012-12-13 15:04:21 +01:00
Tobias Schultze 35e19c76c3 refactor ControllerNameParser 2012-12-13 15:04:21 +01:00
Fabien Potencier a6930a3c45 merged branch bschussek/issue6134 (PR #6319)
This PR was merged into the 2.1 branch.

Commits
-------

21a59ca [Form] Fixed FileType not to throw an exception when bound empty

Discussion
----------

[Form] Fixed FileType not to throw an exception when bound empty

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #6134
Todo: -
License of the code: MIT
Documentation PR: -
2012-12-13 14:52:22 +01:00
Bernhard Schussek 21a59ca04c [Form] Fixed FileType not to throw an exception when bound empty 2012-12-13 14:33:06 +01:00
Fabien Potencier e0cefd7f7e merged branch fabpot/serializer (PR #6302)
This PR was submitted for the master branch but it was merged into the 2.1 branch instead (closes #6302).

Commits
-------

d9b75a3 [Serializer] - Test undefined index #
1a3b985 Maintain array structure
0b9a831 Check if key # is defined in $value

Discussion
----------

[Serializer] - undefined index #

replaces #6293
2012-12-12 18:17:17 +01:00
Eduardo Gulias Davis b4e894a07d - Test undefined index # 2012-12-12 18:17:16 +01:00
Harry Walter b73b87d571 Maintain array structure 2012-12-12 18:17:16 +01:00
Harry Walter eac14b5ef2 Check if key # is defined in $value
If # is undefined in $value use set the attribute value as $value
2012-12-12 18:17:16 +01:00
Fabien Potencier 3caa32edc8 merged branch stloyd/patch-1 (PR #6279)
This PR was merged into the 2.1 branch.

Commits
-------

6a9a8c0 Update src/Symfony/Component/Validator/Resources/translations/validators.pl.xlf

Discussion
----------

[2.1] Fixed polish translation
2012-12-12 14:32:51 +01:00
Joseph Bielawski 6a9a8c024e Update src/Symfony/Component/Validator/Resources/translations/validators.pl.xlf
Fixed polish translation
2012-12-12 14:03:58 +01:00
Fabien Potencier af7f75f79b merged branch bamarni/patch-14 (PR #6273)
This PR was submitted for the master branch but it was merged into the 2.0 branch instead (closes #6273).

Commits
-------

9273b62 [HttpKernel] checked for a potentially missing key

Discussion
----------

[HttpKernel] checked for a potentially missing key
2012-12-12 10:42:27 +01:00
Bilal Amarni 26b8b47221 checked for a potentially missing key
The 'function' key isn't always available in the trace. This was
causing me a notice.
2012-12-12 10:42:27 +01:00
Bilal Amarni a0e2391063 [FrameworkBundle] used the new method for trusted proxies 2012-12-11 17:56:21 +01:00
Fabien Potencier e42ab1da2c merged branch Burgov/patch-2 (PR #6263)
This PR was merged into the 2.0 branch.

Commits
-------

e6bb156 remove realpath call

Discussion
----------

[HttpKernel] remove realpath call

I'm trying to create an executable phar archive from a Symfony application, but when I run the phar, it fails to find any commands because of this php bug/feature:

https://bugs.php.net/bug.php?id=52769

After this change, my archive works just like a normal app/console call
2012-12-11 11:51:02 +01:00
Fabien Potencier 7f3be5c49d fixed CS 2012-12-11 11:40:22 +01:00
Fabien Potencier d2885adffe Merge branch '2.0' into 2.1
* 2.0:
  fixed CS
  removed the Travis icon (as this is not stable enough -- many false positive, closes #6186)
  [Config] Loader::import must return imported data
  [HttpFoundation] fixed a small regression

Conflicts:
	README.md
	src/Symfony/Bridge/Twig/Extension/FormExtension.php
	src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/attributes.html.php
	src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_widget.html.php
	src/Symfony/Bundle/FrameworkBundle/Templating/Helper/FormHelper.php
	src/Symfony/Component/Form/Form.php
	src/Symfony/Component/HttpFoundation/Request.php
	src/Symfony/Component/HttpFoundation/SessionStorage/PdoSessionStorage.php
	tests/Symfony/Tests/Bridge/Doctrine/Logger/DbalLoggerTest.php
2012-12-11 11:33:11 +01:00
Fabien Potencier a7cd5f54ef fixed CS 2012-12-11 11:27:06 +01:00
Bart van den Burg e6bb156f48 remove realpath call
I'm trying to create an executable phar archive from a Symfony application, but when I run the phar, it fails to find any commands because of this php bug/feature:

https://bugs.php.net/bug.php?id=52769

After this change, my archive works just like a normal app/console call
2012-12-11 11:18:21 +01:00
Fabien Potencier d6a402a283 [Security] fixed path info encoding (closes #6040, closes #5695) 2012-12-11 10:40:23 +01:00
Fabien Potencier 47dfb9cb6a [HttpFoundation] added some tests for the previous merge and removed dead code (closes #6037) 2012-12-11 10:29:13 +01:00
Florin Patan 1ab492394c Improved Cache-Control header when no-cache is sent 2012-12-11 10:22:17 +01:00
Fabien Potencier f853fc3906 removed unneeded comment 2012-12-11 09:06:32 +01:00
Fabien Potencier 20dd9d9351 merged branch kaywalker/master (PR #5394)
This PR was submitted for the master branch but it was merged into the 2.1 branch instead (closes #5394).

Commits
-------

08bd95e Fix to allow null values in labels array

Discussion
----------

Fix to allow null values in labels array

Fixed false positives on array key is null

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

by stof at 2012-08-30T19:03:02Z

@kaywalker This is still throwing a notice

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

by bschussek at 2012-08-31T09:13:33Z

Could you please add a test?

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

by fabpot at 2012-10-05T16:52:11Z

@bschussek Is it mergeable now?

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

by bschussek at 2012-10-05T16:58:34Z

The coding conventions in the test are not correct (too much indentation). Also, please reference this PR in a comment to the test. Last, the test should contain assertions to actually check something. Example:

```
    // https://github.com/symfony/symfony/pull/5394
    public function testLabelsContainingNull()
    {
        $this->list = new ChoiceList(
                array($this->obj1, $this->obj2),
                array('A', null)
        );

        $this->assertEquals(array(0 => new ChoiceView($this->obj1, '0', 'A'), 1 => new ChoiceView($this->obj2, '1', null)), $this->list->getRemainingViews());
    }
```

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

by fmeynard at 2012-11-13T17:36:59Z

I just tried the last commit and everything works correctly.
2012-12-11 09:06:04 +01:00
kaywalker 4e909bd016 Fix to allow null values in labels array 2012-12-11 09:06:04 +01:00
Fabien Potencier a22111b913 merged branch le6o/patch-1 (PR #6260)
This PR was merged into the 2.1 branch.

Commits
-------

bae5cff fix date in changelog

Discussion
----------

fix typo with date in changelog
2012-12-10 20:51:05 +01:00
Martin Ledgard bae5cffe7e fix date in changelog 2012-12-10 19:38:43 +00:00
Fabien Potencier 5c15496b5c merged branch hason/config_import (PR #6226)
This PR was merged into the 2.0 branch.

Commits
-------

8bb3208 [Config] Loader::import must return imported data

Discussion
----------

[2.0][2.1][2.2] [Config] Loader::import must return imported data

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

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

by fabpot at 2012-12-07T13:40:58Z

why?

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

by hason at 2012-12-07T20:57:06Z

We should support both approaches to importing. The first case assumes shared object accross all the loaders (loading DI configuration) and the second case requires returning of imported object (merging route collections).

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

by stof at 2012-12-07T21:38:42Z

@fabpot As ``load`` can have a return value, this PR makes sense IMO

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

by fabpot at 2012-12-10T12:44:09Z

This change should be done in master then.

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

by stof at 2012-12-10T14:43:18Z

@fabpot I would consider it as a bugfix. The routing loaders are simply broken (as of 2.0) if the loader does not extend from FileLoader (which overwrites the ``import`` method and takes care to return the value). the routing loaders expect to receive the loaded data when importing instead of loosing the imported data entirely: https://github.com/symfony/Routing/blob/2.0/Loader/XmlFileLoader.php#L80
2012-12-10 15:59:31 +01:00
Fabien Potencier c68dd37c0e removed the Travis icon (as this is not stable enough -- many false positive, closes #6186) 2012-12-10 14:50:56 +01:00
Fabien Potencier a1734ddf72 Revert "merged branch gajdaw/finder_splfileinfo_fpassthu (PR #4751)" (closes #6224)
This reverts commit 5608c0c3ee, reversing
changes made to 38c30b71bd.

Conflicts:
	src/Symfony/Component/Finder/SplFileInfo.php
2012-12-10 13:46:54 +01:00
Fabien Potencier 947a48dbf6 merged branch DenisGorbachev/patch-2 (PR #6240)
This PR was submitted for the master branch but it was merged into the 2.1 branch instead (closes #6240).

Commits
-------

0f6d534 Fixed a typo

Discussion
----------

Fixed a typo
2012-12-10 13:42:21 +01:00
Denis Gorbachev 9cf1d142b2 Fixed a typo 2012-12-10 13:42:21 +01:00
Fabien Potencier 33cfd02f1f merged branch patrickallaert/HeaderBag/QuotedZeroNotParsedCorrectly (PR #6252)
This PR was submitted for the master branch but it was merged into the 2.1 branch instead (closes #6252).

Commits
-------

97d9bf0 Fixed: HeaderBag::parseCacheControl() not parsing quoted zero correctly

Discussion
----------

Fixed: HeaderBag::parseCacheControl() not parsing quoted zero correctly

When having a Cache-Control header like:

    max-age="0"

```isset($match[2])``` is true but ```$match[2]``` containing: ```"0"```, it is evaluated
as ```false```. The result is that ```true``` will be set to "max-age" entry instead of ```"0"```.
2012-12-10 13:41:09 +01:00
Patrick Allaert 9e4681963d Fixed: HeaderBag::parseCacheControl() not parsing quoted zero correctly
When having a Cache-Control header like:

    max-age="0"

isset($match[2]) is true but $match[2] containing: "0", it is evaluated
as false and 'true' will be set to "max-age" entry instead of "0".
2012-12-10 13:41:09 +01:00
Fabien Potencier d451933ca1 merged branch franmomu/fix_const_in_anonymous_function (PR #6244)
This PR was merged into the 2.1 branch.

Commits
-------

a37e5e3 [Form] Fix const inside an anonymous function

Discussion
----------

[Form] Fix const inside an anonymous function for PHP5.3

Related with the comment in #6217

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

by lsmith77 at 2012-12-10T09:14:20Z

+1 .. would be good to get this merged ASAP // @fabpot @bschussek
2012-12-10 10:16:44 +01:00
Fran Moreno a37e5e323b [Form] Fix const inside an anonymous function 2012-12-09 23:59:18 +01:00
Fabien Potencier 74c8b0150a merged branch bschussek/issue6141_2 (PR #6217)
This PR was merged into the 2.1 branch.

Commits
-------

6e7e08f [Form] Fixed the default value of "format" in DateType to DateType::DEFAULT_FORMAT if "widget" is not "single_text"

Discussion
----------

[Form] Fixed the "format" option in DateType

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #6141
Todo: -
License of the code: MIT
Documentation PR: -

This PR fixes a regression introduced in #4839. To quote that PR:

> This PR changes DateType and DateTimeType to support HTML5 by default when setting the option "widget" to "single_text".

In reality, the "format" option now defaults to the HTML5 format always, not just when "widget" is "single_text". This is fixed here.

The second commit in this PR removes special characters between select/text fields. What, with German locale, was

```
<day input>.<month input>.<year input>
```

before is now

```
<day input><month input><year input>
```

This is the way date fields are represented on the majority of websites. If you *need* separators, you can have them by setting the "format" option to a custom value:

```php
$builder->add('myDate', 'date', array(
    'format' => 'dd.MM.yyyy',
));
```

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

by fabpot at 2012-12-07T08:52:21Z

The second commit should probably be done on master and it changes the behavior.

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

by bschussek at 2012-12-07T12:23:22Z

Ok, I removed the second commit now and removed the entries from the CHANGELOG.
2012-12-07 14:34:54 +01:00
Martin Hasoň 8bb3208ab8 [Config] Loader::import must return imported data 2012-12-07 14:24:02 +01:00
Fabien Potencier 992707ea6c merged branch bschussek/issue6190 (PR #6216)
This PR was merged into the 2.1 branch.

Commits
-------

ca5d9ac [DoctrineBridge] Fixed caching in DoctrineType when "choices" or "preferred_choices" is passed

Discussion
----------

[DoctrineBridge] Fixed caching in DoctrineType when "choices" or "preferred_choices" is passed

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #6190
Todo: -
License of the code: MIT
Documentation PR: n/a

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

by craue at 2012-12-06T18:31:43Z

👍

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

by lstrojny at 2012-12-06T18:35:04Z

What about a test?

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

by bschussek at 2012-12-07T12:39:51Z

Removed CHANGELOG entries and added tests.

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

by craue at 2012-12-07T13:14:02Z

I'm not sure if @fabpot is objected to the changelog entry entirely or just the version number. What is the segfault about for PHP 5.4 in Travis?
2012-12-07 14:19:21 +01:00
Bernhard Schussek ca5d9acb19 [DoctrineBridge] Fixed caching in DoctrineType when "choices" or "preferred_choices" is passed 2012-12-07 13:39:00 +01:00
Bernhard Schussek 6e7e08f8c4 [Form] Fixed the default value of "format" in DateType to DateType::DEFAULT_FORMAT if "widget" is not "single_text" 2012-12-07 13:22:37 +01:00
Fabien Potencier aad8136cd1 [HttpFoundation] fixed a small regression 2012-12-07 10:39:50 +01:00
Fabien Potencier 864cc8598f Merge branch '2.0' into 2.1
* 2.0:
  [HttpFoundation] changed UploadedFile::move() to use move_uploaded_file() when possible (closes #5878, closes #6185)
  [HttpFoundation] added a check for the host header value

Conflicts:
	src/Symfony/Component/HttpFoundation/File/File.php
	src/Symfony/Component/HttpFoundation/Request.php
	src/Symfony/Component/HttpFoundation/Tests/RequestTest.php
2012-12-07 10:29:55 +01:00
Fabien Potencier a12c685e3c merged branch fabpot/move-uploaded-file-2_0 (PR #6221)
This PR was merged into the 2.0 branch.

Commits
-------

447ff91 [HttpFoundation] changed UploadedFile::move() to use move_uploaded_file() when possible (closes #5878, closes #6185)

Discussion
----------

[HttpFoundation] changed UploadedFile::move() to use move_uploaded_file() when possible (closes #5878, closes #6185)

An alternative for #5878 and it fixes #6185.
2012-12-07 10:27:52 +01:00
Fabien Potencier 447ff915df [HttpFoundation] changed UploadedFile::move() to use move_uploaded_file() when possible (closes #5878, closes #6185) 2012-12-07 10:25:55 +01:00