Commit Graph

28144 Commits

Author SHA1 Message Date
Fabien Potencier
eb64e32f7d minor #27849 [DomCrawler] Fix ChoiceFormField::select() PHPDoc (dunglas)
This PR was merged into the 2.8 branch.

Discussion
----------

[DomCrawler] Fix ChoiceFormField::select() PHPDoc

| 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

It's allowed by `setValue`, it works, and it makes sense for `<select multiple>` fields.

Commits
-------

154ce9c170 [DomCrawler] Fix ChoiceFormField::select() PHPDoc
2018-07-05 09:30:45 +02:00
Fabien Potencier
46a32f1e59 bug #27758 [WebProfilerBundle] Prevent toolbar links color override by css (alcalyn)
This PR was merged into the 2.8 branch.

Discussion
----------

[WebProfilerBundle] Prevent toolbar links color override by css

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

Fixes this issue: https://github.com/symfony/symfony/issues/27658#issuecomment-401008659

Links color in toolbar can be easily override by application css. As this could happens sometimes, this PR set links color with a stronger CSS precedence.

Commits
-------

e12e217f2b  Prevent toolbar links color override by css
2018-07-05 09:19:04 +02:00
Kévin Dunglas
154ce9c170
[DomCrawler] Fix ChoiceFormField::select() PHPDoc 2018-07-04 23:33:50 +02:00
Nicolas Grekas
1de685a2b5 minor #27836 [HttpFoundation] add tests for FlashBagInterface::setAll() (sir-kain)
This PR was squashed before being merged into the 2.8 branch (closes #27836).

Discussion
----------

[HttpFoundation] add tests for FlashBagInterface::setAll()

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

Adding documentation for the `FlashBagInterface::setAll()` function

Commits
-------

af96475e2a [HttpFoundation] add tests for FlashBagInterface::setAll()
2018-07-04 17:36:33 +02:00
Sir Kane
af96475e2a [HttpFoundation] add tests for FlashBagInterface::setAll() 2018-07-04 17:36:27 +02:00
Nicolas Grekas
db5dd7bdd3 bug #27831 Check for Hyper terminal on all operating systems. (azjezz)
This PR was squashed before being merged into the 2.8 branch (closes #27831).

Discussion
----------

 Check for Hyper terminal on all operating systems.

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

return true if the terminal is Hyper.is on all operating systems not limited to windows.

Commits
-------

196e708b68  Check for Hyper terminal on all operating systems.
2018-07-04 17:34:59 +02:00
Saif Eddin Gmati
196e708b68 Check for Hyper terminal on all operating systems. 2018-07-04 17:34:47 +02:00
Fabien Potencier
7f3aae010b minor #27813 [Doctrine Bridge] Fixed usage of wrong variable when tagged subscriber is invalid (stloyd)
This PR was merged into the 2.8 branch.

Discussion
----------

[Doctrine Bridge] Fixed usage of wrong variable when tagged subscriber is invalid

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

This change prevents error when invalid subscriber is being used.

Expected result:
```
The Doctrine connection "root" referenced in service "stof_doctrine_extensions.listener.sluggable" does not exist. Available connections names: default
```

Actual error:
```
Notice: Array to string conversion
```

Commits
-------

cf1bc66464 [Doctrine Bridge] Fixed usage of wrong variable when tagged subscriber is invalid
2018-07-03 12:50:43 +02:00
Fabien Potencier
ae0a69a767 bug #27794 Add color support for Hyper terminal . (azjezz)
This PR was submitted for the master branch but it was merged into the 2.8 branch instead (closes #27794).

Discussion
----------

Add color support for Hyper terminal .

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

Added color support for [Hyper terminal](https://hyper.is), also shade characters support for progress bar.

![image](https://user-images.githubusercontent.com/29315886/42135797-6edb8492-7d50-11e8-968b-2dd19981dcdd.png)

Commits
-------

2ab7bcf797 Add color support for Hyper terminal .
2018-07-03 09:19:37 +02:00
AzJezz
2ab7bcf797 Add color support for Hyper terminal . 2018-07-03 09:19:32 +02:00
Fabien Potencier
be8feaf6e3 bug #27809 [HttpFoundation] Fix tests: new message for status 425 (dunglas)
This PR was squashed before being merged into the 2.8 branch (closes #27809).

Discussion
----------

[HttpFoundation] Fix tests: new message for status 425

| Q             | A
| ------------- | ---
| Branch?       | 2.8
| Bug fix?      | yes
| 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   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | n/a

Makes tests green.
The new meaning of 425 is defined here: https://datatracker.ietf.org/doc/draft-ietf-httpbis-replay/?include_text=1

Commits
-------

8e37d77145 [HttpFoundation] Fix tests: new message for status 425
2018-07-03 09:16:35 +02:00
Kévin Dunglas
8e37d77145 [HttpFoundation] Fix tests: new message for status 425 2018-07-03 09:16:27 +02:00
Joseph Bielawski
cf1bc66464
[Doctrine Bridge] Fixed usage of wrong variable when tagged subscriber is invalid 2018-07-03 08:45:41 +02:00
Julien Maulny
e12e217f2b Prevent toolbar links color override by css 2018-07-02 11:10:37 +02:00
Nicolas Grekas
1da4252262 minor #27765 [HttpFoundation] update phpdoc of FlashBagInterface::add() (sir-kain)
This PR was squashed before being merged into the 2.8 branch (closes #27765).

Discussion
----------

[HttpFoundation] update phpdoc of FlashBagInterface::add()

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

**Reason why I propose to change the docblock like this: **
The `FlashBagInterface::add()` function does not work only with the `string` type in second parameter

Commits
-------

9135e18ded [HttpFoundation] update phpdoc of FlashBagInterface::add()
2018-06-29 18:24:44 +02:00
Sir Kane
9135e18ded [HttpFoundation] update phpdoc of FlashBagInterface::add() 2018-06-29 18:24:38 +02:00
Nicolas Grekas
6e5c15d8aa bug #27701 [SecurityBundle] Dont throw if "security.http_utils" is not found (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[SecurityBundle] Dont throw if "security.http_utils" is not found

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

The comment + test were misleading, the actual important thing is wiring `AddSessionDomainConstraintPass` before removing passes, which is already the case already.

Commits
-------

db88330448 [SecurityBundle] Dont throw if "security.http_utils" is not found
2018-06-29 15:22:49 +02:00
Nicolas Grekas
410a58b41c minor #27757 [Validator] Fix the namespace of RegexTest (dunglas)
This PR was merged into the 2.8 branch.

Discussion
----------

[Validator] Fix the namespace of RegexTest

| 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  <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | n/a <!-- 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
-------

fe7fc44085 [Validator] Fix the namespace of RegexTest
2018-06-28 15:08:17 +02:00
Kévin Dunglas
fe7fc44085
[Validator] Fix the namespace of RegexTest 2018-06-28 13:49:38 +02:00
Nicolas Grekas
476ef19b41 Bump ext-mongodb to 1.5 on Travis 2018-06-27 23:01:14 +02:00
Nicolas Grekas
1371b8f05a bug #27716 [DI] fix dumping deprecated service in yaml (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[DI] fix dumping deprecated service in yaml

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

Commits
-------

411be25aba [DI] fix dumping deprecated service in yaml
2018-06-26 10:20:55 +02:00
Nicolas Grekas
411be25aba [DI] fix dumping deprecated service in yaml 2018-06-26 10:00:00 +02:00
Fabien Potencier
d59f210d43 bumped Symfony version to 2.8.43 2018-06-25 14:28:20 +02:00
Fabien Potencier
0084ec5bb6
Merge pull request #27703 from fabpot/release-2.8.42
released v2.8.42
2018-06-25 14:02:18 +02:00
Fabien Potencier
c821f1ae50 updated VERSION for 2.8.42 2018-06-25 14:01:56 +02:00
Fabien Potencier
c02d62b181 update CONTRIBUTORS for 2.8.42 2018-06-25 14:01:37 +02:00
Fabien Potencier
c5f8d71215 updated CHANGELOG for 2.8.42 2018-06-25 14:01:04 +02:00
Fabien Potencier
b9da7a6fd6 minor #27560 Add note about changed form processing when using PUT requests (fnagel)
This PR was merged into the 2.8 branch.

Discussion
----------

Add note about changed form processing when using PUT requests

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

Added a note about changed form processing when using PUT requests as people still struggling with this change. Documenting it should help people to quickly fix this without struggling why some of their forms won't work any more after upgrading.

See https://github.com/symfony/symfony/issues/8261

Commits
-------

140b6c2101 Add note about changed form processing when using PUT requests
2018-06-25 13:05:14 +02:00
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