Commit Graph

7647 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
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
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
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
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
Martin Hasoň
8bb3208ab8 [Config] Loader::import must return imported data 2012-12-07 14:24:02 +01:00
Fabien Potencier
aad8136cd1 [HttpFoundation] fixed a small regression 2012-12-07 10:39:50 +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
Fabien Potencier
e277258e91 merged branch fabpot/host-check (PR #6209)
This PR was merged into the 2.0 branch.

Commits
-------

0489799 [HttpFoundation] added a check for the host header value

Discussion
----------

[HttpFoundation] added a check for the host header value

alternative for #3865
2012-12-07 10:18:13 +01:00
Fabien Potencier
048979993e [HttpFoundation] added a check for the host header value 2012-12-07 10:14:56 +01:00
Fabien Potencier
874ea1c029 merged branch hason/tests_2_0 (PR #6197)
This PR was merged into the 2.0 branch.

Commits
-------

5fe58bf [Locale] fixed tests
500cc3c [Config] Fixed tests on Windows

Discussion
----------

[2.0] Fixed tests

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

by fabpot at 2012-12-05T15:25:23Z

Is it a backport of some commits that were merged in 2.1/master?

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

by hason at 2012-12-05T22:17:15Z

I backported 65281fb56c and modified 90d6dc3791
2012-12-06 08:45:04 +01:00
Martin Hasoň
5fe58bffc5 [Locale] fixed tests 2012-12-05 14:13:56 +01:00
Martin Hasoň
500cc3c4d7 [Config] Fixed tests on Windows 2012-12-05 13:56:40 +01:00
Fabien Potencier
04f51ff89e merged branch hason/twigbundle_test (PR #6187)
This PR was merged into the 2.0 branch.

Commits
-------

acf1f86 [TwigBundle] Fixed tests

Discussion
----------

[2.0][2.1][TwigBundle] Fixed tests
2012-12-04 15:15:11 +01:00
Martin Hasoň
acf1f86611 [TwigBundle] Fixed tests 2012-12-04 14:39:39 +01:00
Christophe Coevoet
ae3d531737 [TwigBundle] Moved the registration of the app global to the environment
This makes the app global variable available also when accessing the Twig
environment directly instead of using the TwigEngine.

Conflicts:
	src/Symfony/Bridge/Twig/CHANGELOG.md
	src/Symfony/Bundle/TwigBundle/Resources/config/twig.xml
	src/Symfony/Bundle/TwigBundle/TwigEngine.php
2012-12-03 14:25:44 +01:00
Fabien Potencier
9be270e13b merged branch Tobion/patch-4 (PR #6175)
This PR was merged into the 2.0 branch.

Commits
-------

eec7885 needs to use simpleContent in xsd to allow empty elements

Discussion
----------

needs to use simpleContent in xsd to allow empty elements
2012-12-03 13:48:05 +01:00
Tobias Schultze
eec788571f needs to use simpleContent in xsd to allow empty elements 2012-12-03 13:35:11 +01:00
Fabien Potencier
90e910f5ab merged branch Tobion/patch-2 (PR #6166)
This PR was merged into the 2.0 branch.

Commits
-------

57edf56 removed wrong routing xsd statement `mixed="true"`

Discussion
----------

removed wrong routing xsd statement `mixed="true"`

mixed="true" means that the element could contain both text and other elements, e.g.
`<requirement key="_locale">text <subelement /></requirement>`
But this wrong and such a definition would not even validate against the scheme as the xsd does not define which elements would be expected inside.
2012-12-02 19:02:32 +01:00
Fabien Potencier
afdd08b3ef merged branch Tobion/patch-1 (PR #6164)
This PR was merged into the 2.0 branch.

Commits
-------

d5623b4 removed unused attribute from routing.xsd

Discussion
----------

removed unused attribute from routing.xsd
2012-12-02 19:02:05 +01:00
Fabien Potencier
3495fa61ab bumped Symfony version to 2.0.19-DEV 2012-12-02 18:59:42 +01:00
Tobias Schultze
57edf568a2 removed wrong routing xsd statement mixed="true"
mixed="true" means that the element could contain both text and other elements, e.g.
`<requirement key="_locale">text <subelement /></requirement>`
But this wrong and such a definition would not even validate against the scheme as the xsd does not define which elements would be expected inside.
2012-12-01 22:40:50 +01:00
Tobias Schultze
d5623b46d8 removed unused attribute from routing.xsd 2012-12-01 22:16:05 +01:00
Fabien Potencier
cdb3eccd5b updated VERSION for 2.0.19 2012-11-29 12:36:26 +01:00
Fabien Potencier
fa0336831c update CONTRIBUTORS for 2.0.19 2012-11-29 12:35:34 +01:00
Fabien Potencier
8e72d4611a updated CHANGELOG for 2.0.19 2012-11-29 12:35:10 +01:00
Fabien Potencier
9ce892cf43 [HttpFoundation] reverted variable rename 2012-11-29 12:31:26 +01:00
Fabien Potencier
e5536f0fe1 replaced magic strings by proper constants 2012-11-29 12:23:09 +01:00
Fabien Potencier
f5d8cca25d refactored tests for Request 2012-11-29 12:23:09 +01:00
Fabien Potencier
6a3ba52858 fixed the logic in Request::isSecure() (if the information comes from a source that we trust, don't check other ones) 2012-11-29 12:23:09 +01:00
Fabien Potencier
67e12f3ecb added a way to configure the X-Forwarded-XXX header names and a way to disable trusting them 2012-11-29 12:23:09 +01:00
Fabien Potencier
b45873a3f6 fixed algorithm used to determine the trusted client IP 2012-11-29 12:23:09 +01:00
Fabien Potencier
254b11062e removed the non-standard Client-IP HTTP header 2012-11-29 12:23:09 +01:00
Fabien Potencier
fc89d6b643 [DependencyInjection] fixed composer.json 2012-11-27 09:54:37 +01:00
Fabien Potencier
fc7a39ccd4 merged branch bschussek/icu-check-update (PR #6107)
This PR was merged into the 2.0 branch.

Commits
-------

ac77c5b [Form] Updated checks for the ICU version from 4.5+ to 4.7+ due to test failures with ICU 4.6

Discussion
----------

[Form] Updated checks for the ICU version from 4.5+ to 4.7+

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: -
2012-11-25 11:47:37 +01:00
Bernhard Schussek
ac77c5b2d8 [Form] Updated checks for the ICU version from 4.5+ to 4.7+ due to test failures with ICU 4.6 2012-11-24 14:53:14 +01:00
Fabien Potencier
6831a3d1c5 merged branch sterrien/patch-1 (PR #5842)
This PR was merged into the 2.0 branch.

Commits
-------

2d9a6fc Use Norm Data instead of Data

Discussion
----------

[Form] Use Norm Data instead of App Data

This listener is triggered when normalized data are binded.

We have to use $event->getForm()->getNormData() instead of $event->getForm()->getData().

I have made a new FormType having 'entity' as parent and having a NormTransformer. I encountered a problem in MergeCollectionListener when the request is binded.

My commit fix it.
2012-11-24 12:53:16 +01:00
Fabien Potencier
c20efc7c78 fixed CS 2012-11-24 12:10:50 +01:00
Fabien Potencier
5acbddbdd7 merged branch Tobion/patch-8 (PR #6071)
This PR was merged into the 2.0 branch.

Commits
-------

29bfa13 small fix of #5984 when the container param is not set

Discussion
----------

small fix of #5984 when the container param is not set

 this can happen when the config for the router is unset, but this method does not need to depend on routing. reading an unset config would raise an exception.

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

by Tobion at 2012-11-19T20:44:31Z

Ops, I guess it's wrong. Travis will probably confirm this in a moment.
I will correct that.

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

by flojon at 2012-11-20T22:40:07Z

Yeah you changed the logic...

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

by Tobion at 2012-11-21T14:42:48Z

ok it's fixed.
2012-11-24 12:10:27 +01:00
Tobias Schultze
29bfa13ff0 small fix of #5984 when the container param is not set
this can happen when the config for the router is unset, but this method
does not need to depend on routing. reading an unset config would raise an exception.
2012-11-21 15:35:19 +01:00