Commit Graph

11621 Commits

Author SHA1 Message Date
Fabien Potencier
c0fc33df44 merged branch bamarni/2.0 (PR #6154)
This PR was merged into the 2.0 branch.

Commits
-------

f0743b1 Merge pull request #1 from pylebecq/2.0
555e777 [FrameworkBundle] Added tests for trusted_proxies configuration.
a0e2391 [FrameworkBundle] used the new method for trusted proxies

Discussion
----------

[FrameworkBundle] used the new method for trusted proxies

This makes the framework bundle using the new method from the request class.

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

by fabpot at 2012-12-05T10:38:20Z

As this is a sensitive issue, can you add some tests? Thanks.

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

by bamarni at 2012-12-06T13:00:24Z

Well I don't know why it fails on travis, I can't run the full test suite locally because of a segfault but ```phpunit src/Symfony/Bundle/``` marks all the tests as passing.

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

by fabpot at 2012-12-06T13:08:11Z

But it looks like the failing tests come from what you've changed.

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

by bamarni at 2012-12-06T13:29:33Z

Yes, I'm not saying it's not my fault but I can't reproduce this as locally it tells me they pass, I'll try to fix this this evening.

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

by bamarni at 2012-12-06T17:49:28Z

Apparently it fails only when running the whole testsuite, looking at other travis builds I can see this one on 2.0 : https://travis-ci.org/symfony/symfony/jobs/3495511 which fails in a similar way than here (https://travis-ci.org/symfony/symfony/jobs/3530928). Because of a place trying to access an undefined $_SERVER key : ```PHP Notice:  Undefined index: SCRIPT_NAME ...``` but I can't find where, and the stack trace references some phpunit classes.

I'd be happy if someone could give me some pointers in here as I don't have any clue about how to fix this..

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

by bamarni at 2012-12-06T18:00:57Z

As a consulsion I'd say I can't run the whole testsuite locally (it fails even when I revert my commit), so there is no reliable way for me to fix this, if anyone is up for continuing this feel free.

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

by fabpot at 2012-12-11T09:47:48Z

@bamarni Can you just update this PR with the code change and no tests at all? I will then finish the PR. Thanks.

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

by bamarni at 2012-12-11T16:58:17Z

@fabpot: thanks for helping me out on this, hope you won't run into the same issue!
2012-12-15 17:43:45 +01:00
Fabien Potencier
021de7270a merged branch drak/frameworktestsession (PR #6369)
This PR was merged into the 2.1 branch.

Commits
-------

54d3f81 [FrameworkBundle] Fixed logic under test environment.

Discussion
----------

[FrameworkBundle] Fixed logic under test environment.

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

Please note the travis build failed on some Forms stuff which is nothing to do with this PR.
2012-12-15 17:25:40 +01:00
Drak
54d3f814ec [FrameworkBundle] Fixed logic under test environment. 2012-12-15 15:16:34 +00:00
Fabien Potencier
c67ddb27b3 merged branch baldurrensch/testlistener_fix (PR #6362)
This PR was merged into the 2.1 branch.

Commits
-------

098b593 [Session] Added exception to save method
6b9ee87 [Session] Fixed a bug with the TestListener

Discussion
----------

[Session] Fixed bug with TestListener

Fixed a bug where an unstarted mock session would be emptied with a save. Here are the steps to reproduce:

Use the test client from Symfony\Bundle\FrameworkBundle\Test\WebTestCase::createClient(), and add something to its session. (I actually had it authenticate against a firewall).
Take the cookies of this first test client and add them to a second test client
Have the second test client request a URL that results in a 404
Since the 404 does not need to start the session, hence when save is called (automatically), the mock session is overwritten with an empty array. This does not happen with the other session handlers.
The added unit test in this PR shows this problem. If this PR gets accepted, will it also get merged into the 2.1.x-dev branch?

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes (The broken test seems to be unrelated to this change)
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: -

This is a follow up PR since my original one (https://github.com/symfony/symfony/pull/6342) was against the wrong upstream branch.
2012-12-15 13:27:56 +01:00
Tobias Schultze
8b2c17f803 fix double-decoding in the routing system 2012-12-14 23:08:21 +01:00
Baldur Rensch
098b593591 [Session] Added exception to save method
A RuntimeException is thrown if there is an attempt to save the session
without it being started, or if it has already been closed.
2012-12-14 13:03:29 -08:00
Fabien Potencier
563b20825f merged branch bschussek/bugfix (PR #6353)
This PR was merged into the 2.1 branch.

Commits
-------

ad29df5 [Form] Fixed DateTimeToStringTransformer parsing on PHP < 5.3.8

Discussion
----------

[Form] Fixed DateTimeToStringTransformer parsing on PHP < 5.3.8

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #6351, see comments in b20c5ca2ef
Todo: -
License of the code: MIT
Documentation PR: -
2012-12-14 21:05:05 +01:00
Baldur Rensch
6b9ee87b62 [Session] Fixed a bug with the TestListener
When the session is not started, the test listener would still save the
session causing the session data to be emptied.
2012-12-14 11:26:41 -08:00
Bernhard Schussek
ad29df5efd [Form] Fixed DateTimeToStringTransformer parsing on PHP < 5.3.8 2012-12-14 19:18:27 +01:00
Fabien Potencier
da98371c35 merged branch francisbesset/check_mime_type (PR #6345)
This PR was merged into the 2.0 branch.

Commits
-------

d3f5f3a Added comment
773d818 [FrameworkBundle] Added a check on file mime type for CodeHelper::fileExcerpt()

Discussion
----------

[FrameworkBundle] Added a check on file mime type for CodeHelper::fileExcerpt()

Fixed a bug on `CodeHelper::fileExcerpt()`.

I add a check on the file mime type because I use a phar of phpunit and when a exception throwed in a test, Symfony build a page with the stack trace of the exception.

The phpunit.phar path is in the stack trace and Symfony call `highlight_file()` function on this file path.
`highlight_file()` cannot parse the phar file and warnings are displayed.

This PR add a check on the file mime type.
**This PR can be applied on 2.0, 2.1 and master branches.**

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes (The broken test seems to be unrelated to this change)
Fixes the following tickets: -
License of the code: MIT
2012-12-14 12:58:39 +01:00
Bilal Amarni
f0743b10aa Merge pull request #1 from pylebecq/2.0
[FrameworkBundle] Added tests for trusted_proxies configuration.
2012-12-14 03:35:09 -08:00
Francis Besset
d3f5f3a44f Added comment 2012-12-14 12:28:48 +01:00
Pierre-Yves LEBECQ
555e777b0c [FrameworkBundle] Added tests for trusted_proxies configuration. 2012-12-14 12:05:15 +01:00
Francis Besset
773d818d6b [FrameworkBundle] Added a check on file mime type for CodeHelper::fileExcerpt() 2012-12-14 11:53:52 +01:00
Fabien Potencier
c6bd807726 merged branch jmikola/2.1-mongoclient (PR #6338)
This PR was merged into the 2.1 branch.

Commits
-------

f24e3d7 [HttpKernel] Revise MongoDbProfilerStorage::write() return value
78c5273 [Session] Document Mongo|MongoClient argument type instead of "object"
de19a81 [HttpKernel] Support MongoClient and Mongo connection classes
b28af77 [Session] Support MongoClient and Mongo connection classes
20e93bf [Session] Utilize MongoDB::selectCollection()

Discussion
----------

[2.1] Support PHP MongoDB driver 1.3.0+ in profiler/session classes

> Bug fix: yes
> Feature addition: yes
> Backwards compatibility break: no
> Symfony2 tests pass: yes
> Fixes the following tickets: #6130
> License of the code: MIT

I don't believe this is a BC break, but just to confirm:  the MongoDbSessionHandler constructor signature changed, as I removed the `Mongo` type hint.

Bug fix entails allowing MongoClient to be used by default if the new driver is available, since the original Mongo class is deprecated. I also removed the assumption about `MongoCollection::update()`'s return value, since it may be a status array now.

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

by jmikola at 2012-12-13T22:04:47Z

Lots of test failures, but they appear to be unrelated.
2012-12-14 08:19:02 +01:00
Fabien Potencier
422ad836fb merged branch igorw/patch-3 (PR #6341)
This PR was merged into the 2.1 branch.

Commits
-------

a5530c5 [Propel1Bridge] Fix "and => &&" CS in ModelChoiceList

Discussion
----------

[Propel1Bridge] Fix "and => &&" CS in ModelChoiceList

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

by willdurand at 2012-12-13T22:52:45Z

👍
2012-12-14 08:05:49 +01:00
Igor Wiedler
a5530c5d54 [Propel1Bridge] Fix "and => &&" CS in ModelChoiceList 2012-12-13 23:51:22 +01:00
Jeremy Mikola
f24e3d79ea [HttpKernel] Revise MongoDbProfilerStorage::write() return value
This should be functionally equivalent, but will be more robust if update() ever returns a falsey value.
2012-12-13 16:41:47 -05:00
Jeremy Mikola
78c5273913 [Session] Document Mongo|MongoClient argument type instead of "object" 2012-12-13 16:21:49 -05:00
Jeremy Mikola
de19a81107 [HttpKernel] Support MongoClient and Mongo connection classes
MongoClient defaults its write concern to w=1 (i.e. "safe" writes), which means update() may return an array instead of boolean true. Check for this before returning from write().
2012-12-13 16:20:39 -05:00
Jeremy Mikola
b28af77101 [Session] Support MongoClient and Mongo connection classes
This provides compatibility with pre-1.3.0 and newer PHP MongoDB drivers.
2012-12-13 15:48:37 -05:00
Jeremy Mikola
20e93bf1a4 [Session] Utilize MongoDB::selectCollection() 2012-12-13 15:46:59 -05:00
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