Commit Graph

13236 Commits

Author SHA1 Message Date
Fabien Potencier 1c783f6038 Merge branch '2.2'
* 2.2: (22 commits)
  [Process] Fix regression introduced in #6620 / 880da01c49, fixes #7082
  [HttpKernel] added a unit for the previous commit (closes #7025)
  [HttpFoundation] fixed, overwritten CONTENT_TYPE
  [BrowserKit] fixed test added in the previous merge (refs #7059)
  [FrameworkBundle] tweaked reference dumper command (see #7093)
  Remove unnecessary comment and change test name
  [Config] tweaked dumper to indent multi-line info
  [HttpKernel] added some tests for previous merge
  Fix REMOTE_ADDR for cached subrequests
  [FrameworkBundle] CSRF should be on by default
  [WebProfilerBundle] removed dependency on FrameworkBundle (closes #6949)
  [HttpKernel] added error display suppression when using the ErrorHandler (if not, errors are displayed twice, refs #6254)
  [HttpFoundation] tweaked previous merge
  [HttpFoundation] Added getter for httpMethodParameterOverride state
  Create validators.lv.xlf
  [Process] Warn user with a useful message when tmpfile() failed
  [BrowserKit] added a test to make sure HTTP authentication is preserved when submitting a form
  Remove array type hint from GetResponseForControllerResultEvent::setControllerResult()
  bumped Symfony version to 2.2.0-DEV
  Revert "merged branch povilas/issue_6101 (PR #6708)"
  ...
2013-02-18 22:28:20 +01:00
Fabien Potencier 95a8aa5af2 Merge branch '2.1' into 2.2
* 2.1:
  [Process] Fix regression introduced in #6620 / 880da01c49, fixes #7082
2013-02-18 22:28:10 +01:00
Fabien Potencier 6fb7904ba0 Merge branch '2.0' into 2.1
* 2.0:
  [Process] Fix regression introduced in #6620 / 880da01c49, fixes #7082
2013-02-18 22:27:57 +01:00
Fabien Potencier 06e6c105b8 merged branch Seldaek/regressionfix (PR #7102)
This PR was merged into the 2.0 branch.

Commits
-------

179cd58 [Process] Fix regression introduced in #6620 / 880da01c49, fixes #7082

Discussion
----------

[Process][2.0] getcwd failure fix

Fix regression introduced in #6620
Fixes #7082

For reference, here is the current behavior I saw:

PHP 5.4.11, windows:

```
5.4.11\php.exe -r "chdir('c:\\'); var_dump(getcwd()); $p = proc_open('pwd', [['pipe', 'r'], ['pipe', 'w'], ['pipe', 'w']], $pipes, null); var_dump(stream_get_contents($pipes[1]));"
string(3) "C:\\"
string(14) "/c/Users/seld\n"
```

(I use pwd which is a unix util so it dumps a funny path, but don't look at that)

PHP 5.5alpha4, windows (seems fixed):

```
5.5.0a4\php.exe  -r "chdir('c:\\'); var_dump(getcwd()); $p = proc_open('pwd', [['pipe', 'r'], ['pipe', 'w'], ['pipe', 'w']], $pipes, null); var_dump(stream_get_contents($pipes[1]));"
string(3) "C:\"
string(3) "/c\n"
```

PHP 5.3.10, ubuntu:

```
php -r "chdir('/'); var_dump(getcwd()); \$p = proc_open('pwd', array(array('pipe', 'r'), array('p
ipe', 'w'), array('pipe', 'w')), \$pipes, null); var_dump(stream_get_contents(\$pipes[1]));"
string(1) "/"
string(2) "/\n"
```

Since the permission issue that #6620 originally was fixing is most likely not gonna happen on windows, this seems like a safe enough compromise. Ideally a check for PHP<5.5 should be introduced, but I would like to be sure it's been fixed and is not just a lucky coincidence (/cc @PierreJoye)

I would recommend merging fast and maybe adding the version check later, since it breaks composer create-project on windows. The workaround being: cd in the dir and run `composer install` again to finalize the project setup.

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

by vicb at 2013-02-17T20:12:17Z

Thanks @Seldaek !

Would you mind creating an issue for the version check so that it doesn't get lost ?

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

by Seldaek at 2013-02-18T10:43:56Z

@vicb done.

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

by vicb at 2013-02-18T11:45:16Z

thanks !
2013-02-18 22:26:24 +01:00
Jordi Boggiano 179cd58646 [Process] Fix regression introduced in #6620 / 880da01c49, fixes #7082 2013-02-17 20:36:49 +01:00
Fabien Potencier ae2f424da7 merged branch fabpot/hinclude-tweak (PR #7096)
This PR was merged into the 2.2 branch.

Commits
-------

a313188 added a proper setter for the templating servicein HInclude

Discussion
----------

added a proper setter for the templating servicein HInclude

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

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

by stof at 2013-02-17T12:44:40Z

👍
2013-02-17 16:28:01 +01:00
Fabien Potencier fc73d9f049 merged branch fabpot/request-create-fix (PR #7098)
This PR was merged into the 2.2 branch.

Commits
-------

738de9a [HttpKernel] added a unit for the previous commit (closes #7025)
d0e4b76 [HttpFoundation] fixed, overwritten CONTENT_TYPE

Discussion
----------

Fixed content type when passed as a server value

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #7025
| License       | MIT
| Doc PR        | n/a

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

by stof at 2013-02-17T14:51:35Z

👍
2013-02-17 16:27:25 +01:00
Fabien Potencier 738de9a246 [HttpKernel] added a unit for the previous commit (closes #7025) 2013-02-17 14:09:02 +01:00
Fabien Potencier 0de369ae38 Merge branch '2.1' into 2.2
* 2.1:
  [FrameworkBundle] tweaked reference dumper command (see #7093)
  [HttpKernel] added some tests for previous merge
  Fix REMOTE_ADDR for cached subrequests
  [Process] Warn user with a useful message when tmpfile() failed

Conflicts:
	src/Symfony/Bundle/FrameworkBundle/Command/ConfigDumpReferenceCommand.php
2013-02-17 14:00:38 +01:00
Fabien Potencier 75c61944a3 merged branch 1ed/ref-dumper-tweak-2.1 (PR #7097)
This PR was merged into the 2.1 branch.

Commits
-------

18b139d [FrameworkBundle] tweaked reference dumper command (see #7093)

Discussion
----------

[FrameworkBundle] tweaked reference dumper command (see #7093)

The same as #7093 just for 2.1.
2013-02-17 13:59:26 +01:00
Martijn Evers d0e4b7639c [HttpFoundation] fixed, overwritten CONTENT_TYPE 2013-02-17 13:55:26 +01:00
Fabien Potencier 5bf6d7e1b8 [BrowserKit] fixed test added in the previous merge (refs #7059) 2013-02-17 13:53:31 +01:00
Fabien Potencier fc695f506f merged branch sstok/browserkit-client-http-auth (PR #7059)
This PR was merged into the 2.2 branch.

Commits
-------

b240d1f [BrowserKit] added a test to make sure HTTP authentication is preserved when submitting a form

Discussion
----------

[WIP]BrowserKit] added a test to make sure HTTP authentication is preserved

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | no
| Fixed tickets |
| License       | MIT
| Doc PR        |

Since #6995 BrowseKit no longer seems to preserve the HTTP authentication when submitting a form. This PR adds a test to demonstrate the failure.

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

by vicb at 2013-02-13T12:49:16Z

Thanks. Could you add a "[WIP]" prefix to the PR tittle and set "bug fix" to "no" for now ?

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

by sstok at 2013-02-13T13:59:42Z

done 👍

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

by fabpot at 2013-02-17T12:49:35Z

This cannot be related to #6995 as your test does not involve any HttpFoundation classes.
2013-02-17 13:52:54 +01:00
Gábor Egyed 18b139d41c [FrameworkBundle] tweaked reference dumper command (see #7093) 2013-02-17 13:49:11 +01:00
Fabien Potencier 7d4d1f8829 merged branch newicz/form_remove_test_comment (PR #7054)
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #7054).

Commits
-------

26b5b60 [Form] Remove unnecessary comment and change test name

Discussion
----------

[Form] Remove unnecessary comment and change test name

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | none
| License       | MIT
| Doc PR        | none
2013-02-17 13:47:51 +01:00
Grzegorz Łukaszewicz 22aa8a6f66 Remove unnecessary comment and change test name 2013-02-17 13:47:50 +01:00
Fabien Potencier 9f0beabdd7 merged branch fabpot/profiler-fix (PR #7079)
This PR was merged into the 2.2 branch.

Commits
-------

a9f60f7 [WebProfilerBundle] removed dependency on FrameworkBundle (closes #6949)

Discussion
----------

[WebProfilerBundle] removed dependency on FrameworkBundle (closes #6949)

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #6949
| License       | MIT
| Doc PR        | n/a
2013-02-17 13:29:29 +01:00
Fabien Potencier 8f570285d2 merged branch fabpot/error-handler (PR #7080)
This PR was merged into the 2.2 branch.

Commits
-------

cb319ac [HttpKernel] added error display suppression when using the ErrorHandler (if not, errors are displayed twice, refs #6254)

Discussion
----------

[HttpKernel] added error display suppression when using the ErrorHandler (if not, errors are displayed twice, refs #6254)

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

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

by bamarni at 2013-02-15T10:15:29Z

Are you sure this fixes the twice displaying issue? This is already done here : https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpKernel/Kernel.php#L99

Fatal errors are displayed twice in some situations because this handler gets registered twice, and it registers 2 times the same shutdown callback, a few lines below your change.

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

by fabpot at 2013-02-15T10:21:39Z

No, I've closed this #6254 as this is an Assetic issue, not a Symfony one.
2013-02-17 13:29:13 +01:00
Fabien Potencier 437f4c4ecb merged branch 1ed/ref-dumper-tweak (PR #7093)
This PR was squashed before being merged into the 2.2 branch (closes #7093).

Commits
-------

609636e [Config] tweaked dumper to indent multi-line info

Discussion
----------

[Config] tweaked dumper to indent multi-line info

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Little cosmetic tweak.

before:
```yaml
    # router configuration
    router:
        resource:             ~ # Required
        type:                 ~
        http_port:            80
        https_port:           443

        # set to true to throw an exception when a parameter does not match the requirements
set to false to disable exceptions when a parameter does not match the requirements (and return null instead)
set to null to disable parameter checks against requirements
'true' is the preferred configuration in development mode, while 'false' or 'null' might be preferred in production
        strict_requirements:  true

    # session configuration
    session:
```
after:
```yaml
    # router configuration
    router:
        resource:             ~ # Required
        type:                 ~
        http_port:            80
        https_port:           443

        # set to true to throw an exception when a parameter does not match the requirements
        # set to false to disable exceptions when a parameter does not match the requirements (and return null instead)
        # set to null to disable parameter checks against requirements
        # 'true' is the preferred configuration in development mode, while 'false' or 'null' might be preferred in production
        strict_requirements:  true

    # session configuration
```

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

by stof at 2013-02-17T01:49:27Z

could you add a testcase ?

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

by 1ed at 2013-02-17T05:15:10Z

This class had no tests at all, so I thought it's not important... I added one but I have not much experience in writing tests. Is it adequate?

I realized that the new numeric node type not supperted by the dumper at all.

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

by stof at 2013-02-17T11:27:43Z

looks good to me. However, you should edit the PR description: this is a bugfix

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

by 1ed at 2013-02-17T11:32:07Z

@stof done. Thanks!

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

by stof at 2013-02-17T11:41:44Z

@fabpot this should even go into 2.1 as it is a bugfix

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

by 1ed at 2013-02-17T11:44:08Z

@stof there is no ReferenceDumper class in 2.1

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

by stof at 2013-02-17T12:23:44Z

ah, it was directly in the command in 2.1. But the bug should still be fixed IMO
2013-02-17 13:27:42 +01:00
Gábor Egyed 609636e95e [Config] tweaked dumper to indent multi-line info 2013-02-17 13:27:42 +01:00
Fabien Potencier 98d57500f2 [HttpKernel] added some tests for previous merge 2013-02-17 12:42:57 +01:00
Fabien Potencier 8fc69c3199 merged branch mweimerskirch/patch-12 (PR #7092)
This PR was submitted for the 2.2 branch but it was merged into the 2.1 branch instead (closes #7092).

Commits
-------

187645f Fix REMOTE_ADDR for cached subrequests

Discussion
----------

[HttpKernel/HttpCache] Fix "REMOTE_ADDR" for cached subrequests

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | none that I know of
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | 7091
| License       | MIT

I moved the code that modifies the REMOTE_ADDR variable further up the chain so that cached subrequests also receive the local IP address. Before, only new subrequests received the local IP address and cached ones received the original IP, which made "validateRequest" in FragmentListener fail.

Please review. I'm not sure about side-effects of this patch, including possible security issues.

Fixes #7091

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

by bamarni at 2013-02-16T11:49:27Z

@fabpot rejected setting this on the master request, so you should do it on the ```forward()``` method instead.

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

by mweimerskirch at 2013-02-16T12:13:46Z

@bamarni @fabpot done
2013-02-17 12:37:52 +01:00
Michel Weimerskirch 0eff68f8c8 Fix REMOTE_ADDR for cached subrequests
Fixes #7091
2013-02-17 12:37:52 +01:00
Gordon Franke b0bca01ce3 add status text to web profiler response panel 2013-02-17 11:09:31 +01:00
Tobias Schultze 54d7d258c1 [HttpKernel] hinclude fragment renderer must escape URIs properly to return valid html 2013-02-15 22:21:39 +01:00
Fabien Potencier 83fc5ed98f merged branch vicb/csrffix (PR #7060)
This PR was squashed before being merged into the 2.2 branch (closes #7060).

Commits
-------

f842ae6 [FrameworkBundle] CSRF should be on by default

Discussion
----------

[FrameworkBundle] CSRF should be on by default

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

by stof at 2013-02-13T11:27:32Z

👍

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

by vicb at 2013-02-15T08:54:39Z

Oops seems like a file is missing... will update

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

by vicb at 2013-02-15T09:04:13Z

@fabpot the fix is fixed, ready to be merged !

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

by stloyd at 2013-02-15T09:05:24Z

Shouldn't this be noted in upgrade/changelog file? It's kinda of BC break...

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

by vicb at 2013-02-15T09:13:18Z

don't fix so, this is something I did break a few weeks ago, just reverting to how it is supposed to work.

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

by fabpot at 2013-02-15T09:49:21Z

If you broke CSRF configuration, I suppose that you also broke form, ESI, framgents, translator, validator, and profiler configuration, no (see fde7585)?

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

by vicb at 2013-02-15T09:51:51Z

Hey @fabpot I am not that BAD :)

"form, ESI, framgents, translator, validator, and profiler" are off by default. Only CSRF should be on by default.
2013-02-15 10:56:14 +01:00
Victor f842ae6d99 [FrameworkBundle] CSRF should be on by default 2013-02-15 10:56:14 +01:00
Fabien Potencier a9f60f70a6 [WebProfilerBundle] removed dependency on FrameworkBundle (closes #6949) 2013-02-15 10:53:40 +01:00
Fabien Potencier cb319acb11 [HttpKernel] added error display suppression when using the ErrorHandler (if not, errors are displayed twice, refs #6254) 2013-02-15 08:54:09 +01:00
Fabien Potencier 5276a096a6 [HttpFoundation] tweaked previous merge 2013-02-15 08:36:52 +01:00
Fabien Potencier d0e964a1ae merged branch dlsniper/small-http-foundation-enhancement (PR #6999)
This PR was squashed before being merged into the 2.2 branch (closes #6999).

Commits
-------

de0f7b7 [HttpFoundation] Added getter for httpMethodParameterOverride state

Discussion
----------

[HttpFoundation] Added getter for httpMethodParameterOverride state

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #6984
| License       | MIT
| Doc PR        | ~
2013-02-15 08:33:56 +01:00
Florin Patan de0f7b759f [HttpFoundation] Added getter for httpMethodParameterOverride state 2013-02-15 08:33:55 +01:00
Fabien Potencier 3d564ee823 merged branch Pendrokar/patch-1 (PR #7073)
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #7073).

Commits
-------

3bc0567 Create validators.lv.xlf

Discussion
----------

Create validators.lv.xlf, latvian translation

Latvian translation of validators
2013-02-14 19:46:14 +01:00
Jānis Lukss 3473fc7ae4 Create validators.lv.xlf
Latvian translation of validators
2013-02-14 19:46:13 +01:00
Fabien Potencier 7d143aac42 merged branch Seldaek/proctemp (PR #7066)
This PR was merged into the 2.1 branch.

Commits
-------

5e8d844 [Process] Warn user with a useful message when tmpfile() failed

Discussion
----------

[Process] Warn user with a useful message when tmpfile() failed

Simple warning so users know what's going on instead of getting a proc_open error, see composer/composer#1581.

Can't get the PR template since ~~symfony.com~~ my dns resolver is dead :)
2013-02-14 12:20:33 +01:00
Jordi Boggiano 5e8d844678 [Process] Warn user with a useful message when tmpfile() failed 2013-02-14 12:14:27 +01:00
Henrik Bjørnskov 439b8bcdf3 [WebProfilerBundle] Draw retina canvas if devicePixelRatio is bigger than 1 2013-02-14 11:49:47 +01:00
Sebastiaan Stok b240d1f807 [BrowserKit] added a test to make sure HTTP authentication is preserved when submitting a form 2013-02-13 12:36:22 +01:00
Fabien Potencier b38ab51271 merged branch igorw/view-event-typehint (PR #7057)
This PR was merged into the 2.2 branch.

Commits
-------

06c26dc Remove array type hint from GetResponseForControllerResultEvent::setControllerResult()

Discussion
----------

Remove array type hint from GetResponseForControllerResultEvent::setControllerResult()

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT

I don't see a good reason to limit responses to arrays. The method was introduced in 2.2, so there is no real BC break.

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

by stof at 2013-02-13T03:18:35Z

Indeed. SensioFrameworkExtraBundle handles the case where the result is an array, but in the case of FOSRestBundle, it is an object
2013-02-13 08:21:16 +01:00
Igor Wiedler 06c26dc7ed Remove array type hint from GetResponseForControllerResultEvent::setControllerResult() 2013-02-13 02:35:51 +01:00
Fabien Potencier a4ac5e6374 bumped Symfony version to 2.2.0-DEV 2013-02-11 16:24:43 +01:00
Fabien Potencier f410931dd8 Revert "merged branch povilas/issue_6101 (PR #6708)"
This reverts commit b2bcbbbd19, reversing
changes made to c5fcf0d0cc.
2013-02-11 13:46:49 +01:00
Fabien Potencier 95ba9449e2 Merge branch '2.1' into 2.2
* 2.1:
  [DependencyInjection] fixed tests (refs #7017)
2013-02-11 12:43:49 +01:00
Fabien Potencier 0209eb6c47 Merge branch '2.0' into 2.1
* 2.0:
  [DependencyInjection] fixed tests (refs #7017)
2013-02-11 12:42:49 +01:00
Fabien Potencier d41fc8bb2d [DependencyInjection] fixed tests (refs #7017) 2013-02-11 12:41:22 +01:00
Fabien Potencier f66e109d14 Merge branch '2.2'
* 2.2:
  Fixed XmlFileLoaderTest::testLoadThrowsExceptionWithInvalidFileEvenWithoutSchemaValidation
  moved file hash calculation to own method
  [Validator] Add check for existing metadata on property
  added support for the X-Forwarded-For header (closes #6982, closes #7000)
  fixed the IP address in HttpCache when calling the backend
  [EventDispatcher] Added assertion.
  [EventDispathcer] Fix removeListener
  [DependencyInjection] Add clone for resources which were introduced in 2.1
  [DependencyInjection] Allow frozen containers to be dumped to graphviz
  Fix 'undefined index' error, when entering scope recursively
  [Security] fixed session creation on login (closes #7011)
  replaced usage of the deprecated pattern routing key (replaced with path)
  Add dot character `.` to legal mime subtype regular expression
  [HttpFoundation] fixed the creation of sub-requests under some circumstancies (closes #6923, closes #6936)
2013-02-11 12:27:01 +01:00
Fabien Potencier 743612bbbd Merge branch '2.1' into 2.2
* 2.1:
  added support for the X-Forwarded-For header (closes #6982, closes #7000)
  fixed the IP address in HttpCache when calling the backend
  [EventDispatcher] Added assertion.
  [EventDispathcer] Fix removeListener
  [DependencyInjection] Add clone for resources which were introduced in 2.1
  [DependencyInjection] Allow frozen containers to be dumped to graphviz
  Fix 'undefined index' error, when entering scope recursively
  [Security] fixed session creation on login (closes #7011)
  Add dot character `.` to legal mime subtype regular expression
  [HttpFoundation] fixed the creation of sub-requests under some circumstancies (closes #6923, closes #6936)
2013-02-11 12:26:43 +01:00
Fabien Potencier 33aca01611 Merge branch '2.0' into 2.1
* 2.0:
  [EventDispatcher] Added assertion.
  [EventDispathcer] Fix removeListener

Conflicts:
	src/Symfony/Component/EventDispatcher/Tests/EventDispatcherTest.php
2013-02-11 12:26:14 +01:00
Fabien Potencier 95afd69a0e merged branch hason/bc_xml (PR #6393)
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #6393).

Commits
-------

697d53d [Router] Fixed XmlFileLoaderTest::testLoadThrowsExceptionWithInvalidFileEvenWithoutSchemaValidation

Discussion
----------

[Router] Fixed test
2013-02-11 12:24:47 +01:00
Martin Hasoň f0afc2c009 Fixed XmlFileLoaderTest::testLoadThrowsExceptionWithInvalidFileEvenWithoutSchemaValidation 2013-02-11 12:24:47 +01:00