Commit Graph

24293 Commits

Author SHA1 Message Date
Maxime STEINHAUSSER
46dd3b9acb [Form] Fix UrlType transforms valid protocols 2016-10-30 08:33:18 -07:00
Fabien Potencier
16b29a16de minor #20301 [SecurityBundle] Changed encoder configuration example to bcrypt (jeremyFreeAgent)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #20301).

Discussion
----------

[SecurityBundle] Changed encoder configuration example to bcrypt

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

Simple change in the configuration example to help developers to not use `sha512` as encoder when using `config:dump-reference`.

Commits
-------

a55058f [SecurityBundle] Changed encoder configuration example to bcrypt
2016-10-30 08:29:28 -07:00
Jérémy Romey
a55058f097 [SecurityBundle] Changed encoder configuration example to bcrypt 2016-10-30 08:29:28 -07:00
Fabien Potencier
0572866184 bug #20292 Enhance GAE compat by removing some realpath() (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

Enhance GAE compat by removing some realpath()

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

The remaining ones are in test folders, or in things that don't run/have to run on GAE directly (e.g. commands).

Commits
-------

f2f232d Enhance GAE compat by removing some realpath()
2016-10-27 08:37:53 -07:00
Fabien Potencier
0d545b27a3 bug #20321 Compatibility with Twig 1.27 (xkobal)
This PR was submitted for the 3.1 branch but it was merged into the 2.7 branch instead (closes #20321).

Discussion
----------

Compatibility with Twig 1.27

| Q             | A
| ------------- | ---
| Branch?       | "master" for new features / 2.7, 2.8 or 3.1 for fixes
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | comma-separated list of tickets fixed by the PR, if any
| License       | MIT
| Doc PR        | reference to the documentation PR, if any

In FilesystemLoader::findTemplate(), you must accept a second argument that when set to "false" returns "false" instead of throwing an exception. Not supporting this argument is deprecated since version 1.27.

Commits
-------

77c5395 Compatibility with Twig 1.27
2016-10-27 07:46:29 -07:00
Xavier HAUSHERR
77c5395a79 Compatibility with Twig 1.27 2016-10-27 07:46:29 -07:00
Nicolas Grekas
f2f232d599 Enhance GAE compat by removing some realpath() 2016-10-27 11:13:40 +02:00
Fabien Potencier
ed11f22360 bumped Symfony version to 2.7.21 2016-10-26 19:12:15 -07:00
Fabien Potencier
d22e8e011c Merge pull request #20314 from fabpot/release-2.7.20
released v2.7.20
2016-10-26 18:37:30 -07:00
Fabien Potencier
8beacd2dd8 updated VERSION for 2.7.20 2016-10-26 18:37:19 -07:00
Fabien Potencier
7891a33175 update CONTRIBUTORS for 2.7.20 2016-10-26 18:37:04 -07:00
Fabien Potencier
3dadbe6e2f updated CHANGELOG for 2.7.20 2016-10-26 18:36:58 -07:00
Nicolas Grekas
8d1711a719 minor #20297 [SecurityBundle] Fix twig-bridge lowest dep (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[SecurityBundle] Fix twig-bridge lowest dep

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

To make tests green again on 2.7

Commits
-------

6856faf [SecurityBundle] Fix twig-bridge lowest dep
2016-10-25 15:00:45 +02:00
Nicolas Grekas
6856faf6e5 [SecurityBundle] Fix twig-bridge lowest dep 2016-10-25 14:37:33 +02:00
Fabien Potencier
6bca8afb31 bug #20289 Fix edge case with StreamedResponse where headers are sent twice (Nicofuma)
This PR was merged into the 2.7 branch.

Discussion
----------

Fix edge case with StreamedResponse where headers are sent twice

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

If you have PHPs output buffering enabled (`output_buffering=4096` in your php.ini per example), there is an edge case with the StreamedResponse object where the headers are sent twice. Even if it is harmless most of the time, it can be critical sometimes (per example, if an `Access-Control-Allow-Origin` header is duplicated the browser will block the request).

Explanation: because the streamed response may need the request in order to generate the content, the `StreamedResponseListener` class calls the send method of the `Response` when the event `kernel.response` is fired. To prevent the content from being duplicated, a state has been introduced in the `sendContent()` method and it works fine.

But there is an edge case is the headers of the response. If the content generated by the `sendContent()` method is smaller than the value defined for `output_buffering` in the `php.ini` then the buffer won't be flushed and the `headers_sent()` function will return false.
Therefore when `$response->send()` is called for the second time (in the `app.php` file), the headers will be sent a second time.

Commits
-------

a79991f Fix edge case with StreamedResponse where headers are sent twice
2016-10-24 08:51:37 -07:00
Tristan Darricau
a79991f44a
Fix edge case with StreamedResponse where headers are sent twice 2016-10-24 16:36:35 +02:00
Fabien Potencier
7b56cc0876 removed usage of Twig_Compiler::addIndentation 2016-10-23 22:48:00 -07:00
Fabien Potencier
7f3ce9af83 bug #20278 [DependencyInjection] merge tags instead of completely replacing them (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[DependencyInjection] merge tags instead of completely replacing them

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | yes/no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #20150, #20207
| License       | MIT
| Doc PR        |

In #20207, I missed the `array_merge()` call. Thus, previously set tags of the decorating service would have been discarded by the compiler pass.

Commits
-------

c333eb7 merge tags instead of completely replacing them
2016-10-23 08:03:30 -07:00
Christian Flothmann
c333eb70b6 merge tags instead of completely replacing them 2016-10-23 08:52:28 +02:00
Fabien Potencier
122ac67823 bug #20271 Changes related to Twig 1.27 (fabpot)
This PR was merged into the 2.7 branch.

Discussion
----------

Changes related to Twig 1.27

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

Commits
-------

317d46f [TwigBundle] fixed usage of getSource in tests
b9a4586 [TwigBridge] fixed Twig_Source required argument
2016-10-22 08:17:41 -07:00
Fabien Potencier
317d46f249 [TwigBundle] fixed usage of getSource in tests 2016-10-22 08:04:15 -07:00
Fabien Potencier
0c551b5236 minor #20273 [FrameworkBundle][HttpKernel] move test to the HttpKernel component (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle][HttpKernel] move test to the HttpKernel component

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/19443#discussion_r83414612
| License       | MIT
| Doc PR        |

The moved test case does not test the `AddConsoleCommandPass` class, but ensures certain behavior in the `registerCommands()` method of the `Bundle` class from the HttpKernel component.

Commits
-------

c9ca322 move test to the HttpKernel component
2016-10-22 07:38:20 -07:00
Fabien Potencier
d5d84f6900 bug #20252 Trim constant values in XmlFileLoader (lstrojny)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #20252).

Discussion
----------

Trim constant values in XmlFileLoader

| Q             | A
| ------------- | ---
| Branch?       | 2.7, 2.8, 3.1
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n.A.
| License       | MIT
| Doc PR        | n.A.

When an XML config file gets long, it's nice to put the constant name into the next line like this:
```xml
<parameter key="som_very_very_long_constant_name" type="constant">
    Some\Namespace\That\Is\Sufficiently\Long\To\Require\A\LineBreak::someLongishConstantName
</parameter>
```

If that’s the case, `constant()` will try and find a constant including the spaces. While it is theoretically possible to have a constant in PHP that starts or ends with a space, it’s impossible for class constants and only doable using `define(" FOO ", …);`. So that’s probably an edge case we can ignore.

Commits
-------

f09e621 Trim constant values in XmlFileLoader
2016-10-22 07:36:57 -07:00
Lars Strojny
f09e6218f8 Trim constant values in XmlFileLoader 2016-10-22 07:36:57 -07:00
Christian Flothmann
c9ca322825 move test to the HttpKernel component 2016-10-22 11:18:43 +02:00
Fabien Potencier
b9a4586b24 [TwigBridge] fixed Twig_Source required argument 2016-10-21 18:08:29 -07:00
Fabien Potencier
8974d773a7 bug #20253 [TwigBridge] Use non-deprecated Twig_Node::getTemplateLine() (fabpot)
This PR was merged into the 2.7 branch.

Discussion
----------

[TwigBridge] Use non-deprecated Twig_Node::getTemplateLine()

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

Commits
-------

bb791d0 [TwigBridge] Use non-deprecated Twig_Node::getTemplateLine()
2016-10-19 15:36:59 -07:00
Jáchym Toušek
8a420c554c [Validator] Fix annotation 2016-10-19 15:22:52 -07:00
Fabien Potencier
bb791d0764 [TwigBridge] Use non-deprecated Twig_Node::getTemplateLine() 2016-10-19 15:20:47 -07:00
Fabien Potencier
d55321d832 minor #20240 Fix readme quick tour link (ro0NL)
This PR was merged into the 2.7 branch.

Discussion
----------

Fix readme quick tour link

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | comma-separated list of tickets fixed by the PR, if any
| License       | MIT
| Doc PR        | reference to the documentation PR, if any

Commits
-------

d367cfc Update README.md
2016-10-19 07:12:16 -07:00
Roland Franssen
d367cfc6f2 Update README.md 2016-10-18 19:16:23 +02:00
Nicolas Grekas
8dee4be6b7 bug #20235 [DomCrawler] Allow pipe (|) character in link tags when using Xpath expressions (klausi, nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[DomCrawler] Allow pipe (|) character in link tags when using Xpath expressions

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

@klausi could you please validate this patch? Is it an improvement over yours? (sorry I don't have the proper use case to test.)

Commits
-------

17757d8 [DomCrawler] Optimize DomCrawler::relativize()
5b26e33 [DomCrawler] Allow pipe (|) character in link tags when using Xpath expressions
2016-10-18 17:34:22 +02:00
Nicolas Grekas
17757d8114 [DomCrawler] Optimize DomCrawler::relativize() 2016-10-18 15:42:15 +02:00
Nicolas Grekas
0e8b2a3916 minor #20236 [HttpKernel] Fix source links with latests Twig versions (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpKernel] Fix source links with latests Twig versions

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

Commits
-------

3c21617 [HttpKernel] Fix source links with latests Twig versions
2016-10-18 11:38:25 +02:00
Nicolas Grekas
3c216176e8 [HttpKernel] Fix source links with latests Twig versions 2016-10-18 11:20:54 +02:00
Klaus Purer
5b26e33261 [DomCrawler] Allow pipe (|) character in link tags when using Xpath expressions 2016-10-18 10:27:59 +02:00
Fabien Potencier
ef48f5924a bug #20224 [Twig] removed deprecations added in Twig 1.27 (fabpot)
This PR was merged into the 2.7 branch.

Discussion
----------

[Twig] removed deprecations added in Twig 1.27

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | see twigphp/Twig#2182
| License       | MIT
| Doc PR        | n/a

Commits
-------

f0849d8 [TwigBridge] removed deprecations added in Twig 1.27
2016-10-17 21:24:28 -07:00
Fabien Potencier
f0849d8331 [TwigBridge] removed deprecations added in Twig 1.27 2016-10-17 18:02:36 -07:00
Fabien Potencier
bee50d4ba7 minor #20228 PHP CS Fixer: use php_unit_dedicate_assert (keradus)
This PR was merged into the 2.7 branch.

Discussion
----------

PHP CS Fixer: use php_unit_dedicate_assert

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

appendix for #19121

Commits
-------

b0df3a7 PHP CS Fixer: use php_unit_dedicate_assert
2016-10-16 13:31:14 -07:00
Dariusz Ruminski
b0df3a7eb9 PHP CS Fixer: use php_unit_dedicate_assert 2016-10-16 22:09:53 +02:00
Fabien Potencier
287713fd6a bug #19478 fixed Filesystem:makePathRelative and added 2 more testcases (muhammedeminakbulut)
This PR was submitted for the 2.8 branch but it was merged into the 2.7 branch instead (closes #19478).

Discussion
----------

fixed Filesystem:makePathRelative and added 2 more testcases

| Q             | A
| ------------- | ---
| Branch?       |2.8
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT
The 2 new test cases where broken on the old code. The old testcases and the new one succeed with the given code.

Commits
-------

cd3206c fixed Filesystem:makePathRelative and added 2 more testcases
2016-10-14 07:26:34 -07:00
Muhammed Akbulut
cd3206c5cb fixed Filesystem:makePathRelative and added 2 more testcases 2016-10-14 07:26:34 -07:00
Fabien Potencier
8d218e7f50 bug #20218 [HttpFoundation] no 304 response if method is not cacheable (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpFoundation] no 304 response if method is not cacheable

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

Since #19321 OPTIONS and TRACE are considered safe methods. But both methods should not lead to "304 Not modified" responses.

Commits
-------

3d6b450 no 304 response if method is not cacheable
2016-10-14 07:10:20 -07:00
Fabien Potencier
7e2f24fc6f bug #20207 [DependencyInjection] move tags from decorated to decorating service (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[DependencyInjection] move tags from decorated to decorating service

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

Commits
-------

7def83c move tags from decorated to decorating service
2016-10-14 07:09:04 -07:00
Christian Flothmann
3d6b4502c8 no 304 response if method is not cacheable 2016-10-14 13:10:27 +02:00
Fabien Potencier
f76e77f924 fixed typo 2016-10-13 18:29:00 -07:00
Fabien Potencier
55c3f89ef1 bug #20205 [HttpCache] fix: do not cache OPTIONS request (dmaicher)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpCache] fix: do not cache OPTIONS request

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/20202
| License       | MIT
| Doc PR        | -

The HttpCache should not cache any OPTIONS request as they are by spec not cacheable (mentioned here https://github.com/symfony/symfony/issues/20202#issuecomment-253033144 by @xabbuh).

Commits
-------

c43de7f [HttpCache] fix: do not cache OPTIONS request
2016-10-13 18:28:24 -07:00
David Maicher
c43de7f21a [HttpCache] fix: do not cache OPTIONS request 2016-10-13 22:14:35 +02:00
Fabien Potencier
df138fb636 fixed CS 2016-10-13 07:02:27 -07:00
Fabien Potencier
705a4f7e91 bug #20146 [Validator] Prevent infinite loop in PropertyMetadata (wesleylancel)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #20146).

Discussion
----------

[Validator] Prevent infinite loop in PropertyMetadata

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

This commit fixes a possible infinite loop in PropertyMetadata when the PropertyMetadata class was constructed with an existing property of class and later used (after being serialized and cached) on that same class while that property no longer existing. `get_parent_class` will return false when there is no parent class and `property_existing` will then keeping return false causing the `while` loop to be infinite.

Commits
-------

c1ae7b6 Prevent infinite loop in PropertyMetadata
2016-10-13 07:00:51 -07:00