Commit Graph

28166 Commits

Author SHA1 Message Date
Felix Nagel
140b6c2101 Add note about changed form processing when using PUT requests
See https://github.com/symfony/symfony/issues/8261
2018-06-25 13:00:16 +02:00
Fabien Potencier
abe49ef9f4 minor #27679 [Intl] Update ICU data to 62.1 (jakzal)
This PR was merged into the 2.8 branch.

Discussion
----------

[Intl] Update ICU data to 62.1

| Q             | A
| ------------- | ---
| Branch?       | 2.8
| Bug fix?      | no
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

It's this time of the year again to update ICU data. http://site.icu-project.org/download/62

Not many actual changes this time. Few new scripts added and some metadata for the VEF currency.

Commits
-------

5f2e6c2f12 [Intl] Update ICU data to 62.1
2018-06-25 09:09:10 +02:00
Nicolas Grekas
b02a8b015d minor #27686 [Debug] Fixed remark about debug class loader in docblock of Debug::enable() (derrabus)
This PR was merged into the 2.8 branch.

Discussion
----------

[Debug] Fixed remark about debug class loader in docblock of Debug::enable()

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

The docblock of the `Debug::enable()` method states that "a special class loader" is registered if the ClassLoader component is available. In fact, that class loader has been moved to the Debug component a long time ago, which is why it is always loaded.

The docblock is clearly lying and I thought we should fix that. ☝️🤓

Commits
-------

d1f41601f4 The debug class loader is always loaded by Debug::enable().
2018-06-23 09:15:15 +02:00
Alexander M. Turek
d1f41601f4 The debug class loader is always loaded by Debug::enable(). 2018-06-22 17:01:26 +02:00
Jakub Zalas
5f2e6c2f12
[Intl] Update ICU data to 62.1 2018-06-22 07:57:03 +01:00
Fabien Potencier
9f6af974fa minor #27663 [Serializer] Updates DocBlock to a mixed param type (andrewnclark)
This PR was merged into the 2.8 branch.

Discussion
----------

[Serializer] Updates DocBlock to a mixed param type

| Q             | A
| ------------- | ---
| Branch?       | 4.1
| Bug fix?      |  Yes
| New feature?  |  No
| BC breaks?    | No
| Deprecations? | Non added.
| Tests pass?   | Yes , no new tests added.
| Fixed tickets | #27457
| License       | MIT

<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
 - Bug fixes must be submitted against the lowest branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too).
 - Features and deprecations must be submitted against the master branch.
-->

The JSON serializers make use of the JsonSerializable interface and return arrays to the NormalizerInterface. This PR updates the DocBlock to reflect that.

Moving towards PHP 7.2 and the use of object type-hints would require changes to the [JsonSerializableNormalizer@L41](92c37b9711/src/Symfony/Component/Serializer/Normalizer/JsonSerializableNormalizer.php (L41)) at a minimum.

Truly not much of a PR I'm afraid!

Commits
-------

dca9ff529a [Serializer] Updates DocBlock to a mixed param type
2018-06-21 18:45:44 +02:00
Nicolas Grekas
f63579d360 bug #27669 [Filesystem] fix file lock on SunOS (fritzmg)
This PR was merged into the 2.8 branch.

Discussion
----------

[Filesystem] fix file lock on SunOS

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

See https://github.com/symfony/symfony/pull/27668

Commits
-------

7adb641d7c fix file lock on SunOS
2018-06-21 13:08:28 +02:00
Nicolas Grekas
749410a224 [HttpKernel] fix test compat with PHP 5.3 2018-06-21 13:07:36 +02:00
Andrew Clark
dca9ff529a [Serializer] Updates DocBlock to a mixed param type 2018-06-21 12:57:13 +02:00
fritzmg
7adb641d7c fix file lock on SunOS 2018-06-21 11:24:14 +02:00
Fabien Potencier
00b6f53a55 minor #27657 [ExpressionLanguage] change evaluate() docblock return type from string to mixed (jspee)
This PR was submitted for the 4.1 branch but it was merged into the 2.8 branch instead (closes #27657).

Discussion
----------

[ExpressionLanguage] change `evaluate()` docblock return type from string to mixed

Issue: https://github.com/symfony/symfony/issues/27652

Commits
-------

2d26a556fd change `evaluate()` docblock return type from string to mixed
2018-06-20 19:39:13 +02:00
jspee
2d26a556fd change evaluate() docblock return type from string to mixed 2018-06-20 19:39:05 +02:00
Nicolas Grekas
e5059a0d7e minor #27637 Set serialize_precision explicitly to avoid fancy float rounding (Majkl578)
This PR was merged into the 2.8 branch.

Discussion
----------

Set serialize_precision explicitly to avoid fancy float rounding

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

This is fixing some of the test failures I was seeing locally due to increased `serialize_precision` INI setting:
```
2) Symfony\Component\HttpFoundation\Tests\JsonResponseTest::testConstructorWithSimpleTypes
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'0.1'
+'0.10000000000000001'

/www/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/JsonResponseTest.php:46

3) Symfony\Component\HttpFoundation\Tests\JsonResponseTest::testStaticCreateWithSimpleTypes
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'0.1'
+'0.10000000000000001'
```

The test assertions should not depend on externally configured PHP configuration.

Also default value for this option was changed multiple times: http://php.net/manual/en/ini.core.php#ini.serialize-precision
For compatibility reasons (with PHP <7.x) `-1` can't be used.

https://3v4l.org/HBNsT

HHVM doesn't seem to support this though, how to handle this?

Commits
-------

b5ee7c3ccd Set serialize_precision explicitly to avoid fancy float rounding
2018-06-20 14:43:58 +02:00
Nicolas Grekas
0f2b752138 [HttpKernel] fix PHP 5.4 compat 2018-06-19 22:37:28 +02:00
Michael Moravec
b5ee7c3ccd
Set serialize_precision explicitly to avoid fancy float rounding 2018-06-19 16:38:49 +02:00
Nicolas Grekas
3fc2200134 bug #27309 Fix surrogate not using original request (Toflar)
This PR was submitted for the 3.4 branch but it was squashed and merged into the 2.8 branch instead (closes #27309).

Discussion
----------

Fix surrogate not using original request

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

Warning: This might need some close attention. It took me hours to wrap my head around that issue :-)

So the problem is that `HttpCache::forward()` (or essentially any part in your application) can modify the `$request` that is passed to the `HttpCache::handle()` and the surrogate can never access the original request using `HttpCache::getRequest()` anymore.

Example:

* Main request (GET `/foobar`)
* It's not in the cache, so `HttpCache::forward()` modifies `REMOTE_ADDR` to `127.0.0.1` and adds the `X-Forwarded-For` header.
* The request is sent to the application and any e.g. `kernel.request` listener might modify the `$request` further.
* Now the `/foobar` route returns `text/html` that contains some `<esi src="=/fragment_path"` tag.
* `HttpCache` has an instance of `SurrogateInterface` so (in our case `Esi`) will be asked to `process()` and then later on `handle()` the `/fragment_path` request. For that, `Esi` (or in fact `AbstractSurrogate` uses the following line to create a subrequest and pass it on to the application again:

```php
$subRequest = Request::create($uri, Request::METHOD_GET, array(), $cache->getRequest()->cookies->all(), array(), $cache->getRequest()->server->all());
```

What you can see here, is that it uses `$cache->getRequest()`. And here follows the problem:
We did not duplicate (clone) the original request so essentially `$cache->getRequest()` is a reference to the current request that `HttpKernel::forward()` modified and probably any other part of the application did so too. So for example the original `REMOTE_ADDR` (client IP) got lost.

What we should do instead is duplicate the original request so the surrogates can actually behave like a real reverse proxy such as Varnish would by keeping all the original request attributes.

Commits
-------

ab86f43d78 Fix surrogate not using original request
2018-06-19 15:13:23 +02:00
Yanick Witschi
ab86f43d78 Fix surrogate not using original request 2018-06-19 15:13:16 +02:00
Nicolas Grekas
9f1d1d82fb minor #27508 [Finder] Update RealIteratorTestCase (flip111)
This PR was submitted for the master branch but it was squashed and merged into the 2.8 branch instead (closes #27508).

Discussion
----------

[Finder] Update RealIteratorTestCase

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

Makes the entire test directory empty instead of trying to delete particular files and directories. The old method failed when trying to remove a directory which was not empty.

Commits
-------

7d0ebd41ab [Finder] Update RealIteratorTestCase
2018-06-19 13:07:17 +02:00
flip111
7d0ebd41ab [Finder] Update RealIteratorTestCase 2018-06-19 13:04:56 +02:00
Nicolas Grekas
ec6b941738 [Routing] remove unneeded dev dep on doctrine/common 2018-06-19 11:52:17 +02:00
Nicolas Grekas
ea53fb01ad bug #27630 [Validator][Form] Remove BOM in some xlf files (gautierderuette)
This PR was submitted for the 3.4 branch but it was merged into the 2.8 branch instead (closes #27630).

Discussion
----------

[Validator][Form] Remove BOM in some xlf files

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

I removed first blank space from some xml files

It caused this error during cache:clear
[ERROR 4] Start tag expected, '<' not found (in n/a - line 1, column 1)

Commits
-------

0bc53d66c0 [Validator] Remove BOM in some xlf files
2018-06-19 10:02:23 +02:00
Gautier Deuette
0bc53d66c0 [Validator] Remove BOM in some xlf files 2018-06-19 10:02:14 +02:00
Nicolas Grekas
2627c16d0b bug #27591 [VarDumper] Fix dumping ArrayObject and ArrayIterator instances (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[VarDumper] Fix dumping ArrayObject and ArrayIterator instances

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

Properties added on child classes of `ArrayObject` and `ArrayIterator`, or dynamic properties added on instances of them were now properly dumped. This fixes it.

![image](https://user-images.githubusercontent.com/243674/41349429-2660cbc6-6f10-11e8-8015-a3d6ad8b0c9c.png)

Commits
-------

3ecabfc36e [VarDumper] Fix dumping ArrayObject and ArrayIterator instances
2018-06-15 08:50:57 +02:00
Nicolas Grekas
3ecabfc36e [VarDumper] Fix dumping ArrayObject and ArrayIterator instances 2018-06-15 08:44:46 +02:00
Robin Chalas
2643ec87d5 bug #27581 Fix bad method call with guard authentication + session migration (weaverryan)
This PR was squashed before being merged into the 2.8 branch (closes #27581).

Discussion
----------

Fix bad method call with guard authentication + session migration

| Q             | A
| ------------- | ---
| Branch?       | 2.8
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no (but there needs to be on master)
| Tests pass?   | yes
| Fixed tickets | #27577
| License       | MIT
| Doc PR        | n/a

I messed up #27452 :/. Guard is the one class where the session migration is not on the listener, it's on the handler. The tricky part is that there is only ONE handler (unlike listeners where there is 1 listener per firewall). That means that implementing a session migration strategy that avoids stateless firewalls was a bit more tricky: I could only think to inject a map into `GuardAuthenticationHandler`. On the bright side, this also fixes session migration (not happening) when people call the `authenticateUserAndHandleSuccess()` method directly.

On master, we'll need to add a deprecation to make the 3rd argument of `authenticateWithToken()` required - it's optional now for BC. We may also need to re-order the constructor args.

I DID test this in a real 2.8 project, to make sure that things were properly wired up. Apologies for not doing that for the other PR.

Cheers!

Commits
-------

2c0ac93 Fix bad method call with guard authentication + session migration
2018-06-12 15:18:03 +02:00
Ryan Weaver
2c0ac93e25 Fix bad method call with guard authentication + session migration 2018-06-12 15:17:58 +02:00
Fabien Potencier
5c2b2bb2ce fixed CS 2018-06-10 12:30:11 +02:00
Fabien Potencier
d2757de3b9 bug #27452 Avoid migration on stateless firewalls (weaverryan)
This PR was squashed before being merged into the 2.8 branch (closes #27452).

Discussion
----------

Avoid migration on stateless firewalls

| Q             | A
| ------------- | ---
| Branch?       | 2.8
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | Related to #27395
| License       | MIT
| Doc PR        | symfony/symfony-docs#9860

This is a proof-of-concept. Once we agree / are happy, I need to add this to all of the other authentication mechanisms that recently got the session migration code & add tests.

Basically, this avoids migrating the session if the firewall is stateless. There were 2 options to do this:

A) Make the `SessionAuthenticationStrategy` aware of all stateless firewalls. **This is the current approach**
or
B) Make each individual authentication listener aware whether or not *its* firewall is stateless.

Commits
-------

cca73bb564 Avoid migration on stateless firewalls
2018-06-10 12:27:47 +02:00
Ryan Weaver
cca73bb564 Avoid migration on stateless firewalls 2018-06-10 12:27:33 +02:00
Nicolas Grekas
637963d224 minor #27553 [Finder] revert #27545 (xabbuh)
This PR was merged into the 2.8 branch.

Discussion
----------

[Finder] revert #27545

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

The SplFileInfo class indeed [does exist](https://github.com/symfony/symfony/blob/2.8/src/Symfony/Component/Finder/SplFileInfo.php) in the Symfony\Component\Finder namespace.

Commits
-------

8fd4b441c4 revert #27545
2018-06-08 10:34:53 +02:00
Christian Flothmann
8fd4b441c4 revert #27545
The SplFileInfo class indeed does exist in the Symfony\Component\Finder
namespace.
2018-06-08 09:55:24 +02:00
Fabien Potencier
e2effa3141 minor #27532 Fix security-core cross-dependencies, fixes #27507 (stephank)
This PR was merged into the 2.8 branch.

Discussion
----------

Fix security-core cross-dependencies, fixes #27507

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

Based on earlier changes in #27295

Commits
-------

725d774a16 Fix security-core cross-dependencies, fixes #27507
2018-06-08 08:37:32 +02:00
Nicolas Grekas
39bd755d29 minor #27545 Update Finder.php (tarlepp)
This PR was submitted for the master branch but it was merged into the 2.8 branch instead (closes #27545).

Discussion
----------

Update Finder.php

Corrected return type which causes following error with [psalm](https://getpsalm.org/)
```
ERROR: PossiblyInvalidArgument - src/Command/Utils/CheckVendorDependencies.php:170:62 - Argument 1 of iterator_to_array expects Traversable, possibly different type array<mixed, Symfony\Component\Finder\SplFileInfo>|Iterator provided $directories = array_map($closure, iterator_to_array($finder->getIterator()));
```

| Q             | A
| ------------- | ---
| Branch?       | 4.1 <!-- see below -->
| Bug fix?      | yes (just docblock bug - nothing serious)
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | -  <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | - <!-- required for new features -->

<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
 - Bug fixes must be submitted against the lowest branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too).
 - Features and deprecations must be submitted against the master branch.
-->

Commits
-------

a74ee8d594 Update Finder.php
2018-06-07 23:32:35 +02:00
Tarmo Leppänen
a74ee8d594 Update Finder.php
Corrected return type which causes following error with (psalm)[https://getpsalm.org/]
```
ERROR: PossiblyInvalidArgument - src/Command/Utils/CheckVendorDependencies.php:170:62 - Argument 1 of iterator_to_array expects Traversable, possibly different type array<mixed, Symfony\Component\Finder\SplFileInfo>|Iterator provided $directories = array_map($closure, iterator_to_array($finder->getIterator()));
```
2018-06-07 23:32:28 +02:00
Stéphan Kochen
725d774a16 Fix security-core cross-dependencies, fixes #27507 2018-06-07 10:54:04 +02:00
Fabien Potencier
ae30a80f77 bug #27514 [Debug] Pass previous exception to FatalErrorException (pmontoya)
This PR was merged into the 2.8 branch.

Discussion
----------

[Debug] Pass previous exception to FatalErrorException

| Q             | A
| ------------- | ---
| Branch?       | 2.8
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #27483
| License       | MIT

Add a previous parameter to FatalErrorException.
Call \ErrorException with this parameter.
Update parent::__constructor for inherited classes with default parameters and the new one

Commits
-------

7f9780b5df Pass previous exception to FatalErrorException
2018-06-06 15:30:44 +02:00
Pascal Montoya
7f9780b5df
Pass previous exception to FatalErrorException 2018-06-06 10:34:52 +02:00
Fabien Potencier
7d2d60ffc3 minor #27502 Remove mentions of "beta" in composer.json files (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

Remove mentions of "beta" in composer.json files

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

There are more to clean up when merging up to master.

Commits
-------

6a0b75fb9b Remove mentions of "beta" in composer.json files
2018-06-06 10:12:31 +02:00
Nicolas Grekas
6a0b75fb9b Remove mentions of "beta" in composer.json files 2018-06-05 10:24:18 +02:00
Nicolas Grekas
efe9beb186 [HttpKernel] Fix restoring trusted proxies in tests 2018-05-31 12:02:37 +02:00
Fabien Potencier
b1f60216a4 minor #27414 CODEOWNERS: some more rules (dunglas)
This PR was merged into the 2.8 branch.

Discussion
----------

CODEOWNERS: some more rules

| Q             | A
| ------------- | ---
| Branch?       | 2.8
| Bug fix?      | no
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

I missed #27079. It'll help me to deal with GitHub notifications...

Commits
-------

8c62ecfad2 CODEOWNERS: some more rules
2018-05-30 07:45:17 +02:00
Kévin Dunglas
8c62ecfad2
CODEOWNERS: some more rules 2018-05-30 07:26:26 +02:00
Fabien Potencier
fa7bec4816 minor #27418 Remove unneeded comments in tests (fabpot)
This PR was merged into the 2.8 branch.

Discussion
----------

Remove unneeded comments in tests

| Q             | A
| ------------- | ---
| Branch?       | 2.8
| Bug fix?      | no
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| License       | MIT

<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
 - Bug fixes must be submitted against the lowest branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too).
 - Features and deprecations must be submitted against the master branch.
-->

Commits
-------

09c660d454 removed unneeded comments in tests
2018-05-30 06:20:36 +02:00
Fabien Potencier
09c660d454 removed unneeded comments in tests 2018-05-30 06:18:42 +02:00
Fabien Potencier
785b4319ad minor #27402 [HttpFoundation] Change PHPDoc in ResponseHeaderBag::getCookies() to help IDEs (dborsatto)
This PR was merged into the 2.8 branch.

Discussion
----------

[HttpFoundation] Change PHPDoc in ResponseHeaderBag::getCookies() to help IDEs

| Q             | A
| ------------- | ---
| Branch?       | master <!-- see below -->
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | none
| License       | MIT
| Doc PR        | none

Hello,

I'm proposing a very small change to `ResponseHeaderBag` in the HttpFoundation component. The change involves changing the PHPDoc return type of `getCookies()` from a simple `array` to `Cookie[]`. This way, IDEs will play nicely and understand that the returned value is in fact an array of Cookie objects. This is the current behavior:

![Before PR](https://user-images.githubusercontent.com/94651/40648899-d6690f84-632f-11e8-8e43-e09d71b9ccec.png)

whereas with the proposed change, the IDE correctly understands the type:

![After PR](https://user-images.githubusercontent.com/94651/40648980-109621c4-6330-11e8-8ead-f176307e5bda.png)

Commits
-------

479aa9074b Change PHPDoc in ResponseHeaderBag::getCookies() to help IDEs
2018-05-29 13:31:42 +02:00
Davide Borsatto
479aa9074b Change PHPDoc in ResponseHeaderBag::getCookies() to help IDEs 2018-05-29 13:28:37 +02:00
Fabien Potencier
518ec864e9 bug #26973 [HttpKernel] Set first trusted proxy as REMOTE_ADDR in InlineFragmentRenderer. (kmadejski)
This PR was squashed before being merged into the 2.8 branch (closes #26973).

Discussion
----------

[HttpKernel] Set first trusted proxy as REMOTE_ADDR in InlineFragmentRenderer.

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

SubRequest used in `InlineFragmentRendered` explicitly sets `$server['REMOTE_ADDR']` to `127.0.0.1`. Therefore, it's required to configure `127.0.0.1` address in TRUSTED_PROXIES environment variable. Without that, `Request::isFromTrustedProxy()` will return false.
The current behavior might be a little bit problematic, for instance, in case where images are rendered through subrequests. These might end-up with an incorrect schema in URL (`http` instead of `https`).

Commits
-------

18f55feef8 [HttpKernel] Set first trusted proxy as REMOTE_ADDR in InlineFragmentRenderer.
2018-05-27 09:44:41 +02:00
Kamil Madejski
18f55feef8 [HttpKernel] Set first trusted proxy as REMOTE_ADDR in InlineFragmentRenderer. 2018-05-27 09:44:31 +02:00
Fabien Potencier
dc0ac87b89 bug #27303 [Process] Consider "executable" suffixes first on Windows (sanmai)
This PR was squashed before being merged into the 2.8 branch (closes #27303).

Discussion
----------

[Process] Consider "executable" suffixes first on Windows

| 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        | n/a

Executable finder should consider "executable" suffixes first on Windows because we basically ignore executability on Windows (on the lines below changed), which leads, for example, to finding usually-non-executable `phpunit` file first where both `phpunit` and `phpunit.bat` are present.

I may miss something here, so please tell me if this makes any sense.

Same change against master: #27301

Commits
-------

9372e7a813 [Process] Consider \"executable\" suffixes first on Windows
2018-05-27 09:40:52 +02:00
Alexey Kopytko
9372e7a813 [Process] Consider \"executable\" suffixes first on Windows 2018-05-27 09:40:41 +02:00