Commit Graph

43362 Commits

Author SHA1 Message Date
Nicolas Grekas
22b4586c01 bug #33547 [HttpClient] Re-enable Server Push support (dunglas)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient] Re-enable Server Push support

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | n/a <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | n/a

 #33444 disabled Server Push support for the CURL implementation, but `HttpClient::create()` has been forgotten and override this parameter, consequently for most users Server Push wasn't disabled at all. The root issue affecting the tests are actually a misconfiguration of Akamai servers (we need our own test infrastructure).

According to my testing, Server Push support works very smoothly. Also, it can cause problems only if the server actually pushes responses (which is still rare).

So I propose to re-enable Push Support everywhere.

Commits
-------

8483842888 Re-enable push support for HttpClient
2019-09-11 10:32:37 +02:00
Kévin Dunglas
8483842888
Re-enable push support for HttpClient 2019-09-11 09:53:13 +02:00
Thomas Calvet
6612e9a939 [DependencyInjection] Accept existing interfaces as valid named args 2019-09-11 09:42:51 +02:00
Fabien Potencier
27383a5ca8 bug #33521 Fixed incompatibility between ServiceSubscriberTrait and classes with protected $container property (a-menshchikov)
This PR was squashed before being merged into the 4.3 branch (closes #33521).

Discussion
----------

Fixed incompatibility between ServiceSubscriberTrait and classes with protected $container property

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

Commits
-------

954dad44a1 Fixed incompatibility between ServiceSubscriberTrait and classes with protected $container property
2019-09-11 07:04:03 +02:00
Zmey
954dad44a1 Fixed incompatibility between ServiceSubscriberTrait and classes with protected $container property 2019-09-11 07:03:51 +02:00
Nicolas Grekas
13ff9f94c5 Merge branch '3.4' into 4.3
* 3.4:
  Update GitHub PR template
  don't dump a scalar tag value on its own line
2019-09-10 18:53:00 +02:00
Nicolas Grekas
ac7df04fd6 minor #33537 Update GitHub PR template (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

Update GitHub PR template

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

Commits
-------

0d034817b0 Update GitHub PR template
2019-09-10 18:34:27 +02:00
Nicolas Grekas
0d034817b0 Update GitHub PR template 2019-09-10 18:21:23 +02:00
Fabien Potencier
f7130e332f bug #33518 [Yaml] don't dump a scalar tag value on its own line (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Yaml] don't dump a scalar tag value on its own line

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

This commit fine tunes the bugfix made in #33377 with the feedback provided in https://github.com/symfony/symfony/issues/33464#issuecomment-528290985.

Commits
-------

a549069a49 don't dump a scalar tag value on its own line
2019-09-10 13:35:27 +02:00
Fabien Potencier
1517d1682f Remove Google references when not needed 2019-09-10 13:27:19 +02:00
Fabien Potencier
6f459b9419 Merge branch '3.4' into 4.3
* 3.4:
  Remove Google references when not needed
2019-09-10 13:25:17 +02:00
Fabien Potencier
2c87f69fee minor #33527 Dirname simplification (fabpot)
This PR was merged into the 4.3 branch.

Discussion
----------

Dirname simplification

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please 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

<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/roadmap):
 - Bug fixes must be submitted against the lowest maintained 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 branch 4.4.
 - Legacy code removals go to the master branch.
-->

Commits
-------

c4d44eb089 Simplify usage of dirname()
2019-09-10 13:24:14 +02:00
Fabien Potencier
c4d44eb089 Simplify usage of dirname() 2019-09-10 13:22:25 +02:00
Fabien Potencier
f436cc80f1 minor #33530 Remove Google references when not needed (fabpot)
This PR was merged into the 3.4 branch.

Discussion
----------

Remove Google references when not needed

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please 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

No need to promote Google.

Commits
-------

9665d7633d Remove Google references when not needed
2019-09-10 13:21:38 +02:00
Christian Flothmann
a549069a49 don't dump a scalar tag value on its own line 2019-09-10 12:38:46 +02:00
Fabien Potencier
9665d7633d Remove Google references when not needed 2019-09-10 12:13:59 +02:00
Nicolas Grekas
5a06f94c08 Merge branch '3.4' into 4.3
* 3.4:
  SCA: minor code tweaks
  [HttpKernel] Fix Apache mod_expires Session Cache-Control issue
  Fix getFileLinkFormat() to avoid returning the wrong URL in Profiler
2019-09-08 22:39:53 +02:00
Fabien Potencier
4d10d9e0c6 bug #33505 [HttpClient] fallbackto CURLMOPT_MAXCONNECTS when CURLMOPT_MAX_HOST_CONNECTIONS is not available (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient] fallbackto CURLMOPT_MAXCONNECTS when CURLMOPT_MAX_HOST_CONNECTIONS is not available

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

Commits
-------

0aae1d7c0a [HttpClient] fallbackto CURLMOPT_MAXCONNECTS when CURLMOPT_MAX_HOST_CONNECTIONS is not available
2019-09-08 19:52:35 +02:00
Fabien Potencier
6f332ce0e0 minor #33504 SCA: minor code tweaks (kalessil)
This PR was squashed before being merged into the 3.4 branch (closes #33504).

Discussion
----------

SCA: minor code tweaks

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

Minor code tweaks: disabled sorting in glob (the order is not important there), used implode() negative index support in order to drop an array_pop() call.

Commits
-------

32ea449679 SCA: minor code tweaks
2019-09-08 19:26:35 +02:00
Vladimir Reznichenko
32ea449679 SCA: minor code tweaks 2019-09-08 19:26:24 +02:00
Nicolas Grekas
0aae1d7c0a [HttpClient] fallbackto CURLMOPT_MAXCONNECTS when CURLMOPT_MAX_HOST_CONNECTIONS is not available 2019-09-08 18:59:44 +02:00
Fabien Potencier
47a87849c0 bug #32818 [HttpKernel] Fix getFileLinkFormat() to avoid returning the wrong URL in Profiler (Arman-Hosseini)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpKernel] Fix getFileLinkFormat() to avoid returning the wrong URL in Profiler

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

I had this problem and I noticed that an issue had already been registered.
So I registered the pull request.

Commits
-------

9ed5f03b98 Fix getFileLinkFormat() to avoid returning the wrong URL in Profiler
2019-09-08 09:16:45 +02:00
Fabien Potencier
1bfbaeb894 fixed typo 2019-09-08 09:09:18 +02:00
Fabien Potencier
206ad498c1 bug #33487 [HttpKernel] Fix Apache mod_expires Session Cache-Control issue (pbowyer)
This PR was squashed before being merged into the 3.4 branch (closes #33487).

Discussion
----------

[HttpKernel] Fix Apache mod_expires Session Cache-Control issue

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

Apaches's [mod_expires](https://httpd.apache.org/docs/current/mod/mod_expires.html) is a widely used module to set HTTP caching headers. It allows you to set a default cache lifetime as well as lifetimes by mime_type.

When an application server has set a `Cache-Control` header, mod_expires ignores this and sets its own, resulting in duplicate `Cache-Control` headers and conflicting information. It does this _unless_ the application server sets an `Expires` header, in which case mod_expires does nothing. This is documented on the link above:

> When the `Expires` header is already part of the response generated by the server, for example when generated by a CGI script or proxied from an origin server, this module does not change or add an `Expires` or `Cache-Control` header.

Symfony automatically sets a `Cache-Control` header if a session exists. This patch adds an `Expires` header to ensure it's respected by mod_expires.

## Example 1
With the following Apache config:
```apache
<IfModule mod_expires.c>
    ExpiresActive on
    ExpiresDefault                                      "access plus 1 month"
</IfModule>
```
The HTTP response headers are:
### Without the patch
```
HTTP/1.1 200 OK
Date: Fri, 06 Sep 2019 08:02:02 GMT
Server: Apache/2.4.37 (Ubuntu)
Cache-Control: max-age=0, must-revalidate, private
Cache-Control: max-age=2592000
Expires: Sun, 06 Oct 2019 08:02:00 GMT
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 13099
Connection: close
Content-Type: text/html; charset=UTF-8
```
### With the patch
```
HTTP/1.1 200 OK
Date: Fri, 06 Sep 2019 08:21:34 GMT
Server: Apache/2.4.37 (Ubuntu)
Cache-Control: max-age=0, must-revalidate, private
Expires: Fri, 06 Sep 2019 08:21:34 GMT
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 13098
Connection: close
Content-Type: text/html; charset=UTF-8
```

## Example 2
With the following Apache config:
```apache
<IfModule mod_expires.c>
    ExpiresActive on
    ExpiresDefault                                      "access plus 1 month"
    ExpiresByType text/html                             "access plus 0 seconds"
</IfModule>
```
### Without the patch
```
HTTP/1.1 200 OK
Date: Fri, 06 Sep 2019 08:18:40 GMT
Server: Apache/2.4.37 (Ubuntu)
Cache-Control: max-age=0, must-revalidate, private
Cache-Control: max-age=0
Expires: Fri, 06 Sep 2019 08:18:39 GMT
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 13099
Connection: close
Content-Type: text/html; charset=UTF-8
```
### With the patch
```
HTTP/1.1 200 OK
Date: Fri, 06 Sep 2019 08:20:40 GMT
Server: Apache/2.4.37 (Ubuntu)
Cache-Control: max-age=0, must-revalidate, private
Expires: Fri, 06 Sep 2019 08:20:40 GMT
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 13100
Connection: close
Content-Type: text/html; charset=UTF-8
```

Commits
-------

9e942768c9 [HttpKernel] Fix Apache mod_expires Session Cache-Control issue
2019-09-08 08:51:05 +02:00
Peter Bowyer
9e942768c9 [HttpKernel] Fix Apache mod_expires Session Cache-Control issue 2019-09-08 08:50:59 +02:00
Nicolas Grekas
87ec83c00f Merge branch '3.4' into 4.3
* 3.4:
  cs fix
2019-09-06 16:50:57 +02:00
Nicolas Grekas
fbeef96d66 cs fix 2019-09-06 16:49:07 +02:00
Fabien Potencier
c81fc3a079 bug #33469 [FrameworkBundle] Fixed suggested package for missing server:dump command (lyrixx)
This PR was merged into the 4.3 branch.

Discussion
----------

[FrameworkBundle] Fixed suggested package for missing server:dump command

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

Commits
-------

4017477eed [FrameworkBundle] Fixed suggested package for missing server:dump command
2019-09-06 14:26:40 +02:00
Grégoire Pineau
4017477eed [FrameworkBundle] Fixed suggested package for missing server:dump command 2019-09-06 14:20:26 +02:00
Fabien Potencier
255cc7f24b minor #33477 Add BC break note to UPGRADE-4.2.md (umpirsky)
This PR was merged into the 4.3 branch.

Discussion
----------

Add BC break note to UPGRADE-4.2.md

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

Added a note about upgrade consequences. See #33473

Commits
-------

89f7d77ea0 Add BC break note to UPGRADE-4.2.md
2019-09-06 13:02:23 +02:00
Nicolas Grekas
7ba77ecc0d typos bis 2019-09-06 12:24:45 +02:00
Nicolas Grekas
7d1286884b typos 2019-09-06 12:15:48 +02:00
Nicolas Grekas
54a514fc1d bug #31964 [Router] routing cache crash when using generator_class (dFayet)
This PR was merged into the 4.3 branch.

Discussion
----------

[Router] routing cache crash when using generator_class

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

Since #28865 the Router use, by default, new generator, matcher, and dumpers.
This leads to crash when the Router use a custom generator, or matcher based on the old ones.

Commits
-------

a5b46e5390 Fix routing cache broken when using generator_class
2019-09-06 12:00:20 +02:00
Nicolas Grekas
1b835d1249 minor #33484 Fix test fixtures with deprecated method signatures (derrabus, nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

Fix test fixtures with deprecated method signatures

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #33483 (partly)
| License       | MIT
| Doc PR        | N/A

This PR upgrades two fixtures that implemented deprecated method signatures. As far as I can tell, they are used in tests that do not specifically test legacy behavior, so the fixtures should be up to date. Currently, these fixtures cause failing tests on the 4.4 branch.

Commits
-------

cc3e3d54ea Fix more bad tests
592aacff6f Fix test fixtures with deprecated method signatures.
2019-09-06 11:53:27 +02:00
Nicolas Grekas
2feae7bebb minor #33479 [SecurityBundle] Fix 4.3 tests forward compat (yceruto)
This PR was merged into the 4.3 branch.

Discussion
----------

[SecurityBundle] Fix 4.3 tests forward compat

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

Commits
-------

f092331eb1 Fix 4.3 tests forward compat
2019-09-06 11:49:53 +02:00
Nicolas Grekas
d081f1689b bug #33481 [Messenger] fix empty amqp body returned as false (Tobion)
This PR was merged into the 4.3 branch.

Discussion
----------

[Messenger] fix empty amqp body returned as false

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please 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        |

Having `false` in the body breaks typehints in the serializer and is not consistent with other transports like doctrine. See https://github.com/pdezwart/php-amqp/issues/351

Commits
-------

ee5cbe3658 [Messenger] fix empty amqp body returned as false
2019-09-06 11:42:14 +02:00
Nicolas Grekas
cc3e3d54ea Fix more bad tests 2019-09-06 11:34:03 +02:00
Saša Stamenković
89f7d77ea0 Add BC break note to UPGRADE-4.2.md 2019-09-06 11:27:22 +02:00
Alexander M. Turek
592aacff6f Fix test fixtures with deprecated method signatures. 2019-09-06 00:33:19 +02:00
Yonel Ceruto
f092331eb1 Fix 4.3 tests forward compat 2019-09-05 14:00:30 -04:00
Tobias Schultze
ee5cbe3658 [Messenger] fix empty amqp body returned as false 2019-09-05 18:44:17 +02:00
Fabien Potencier
828e5a4ae3 bug #33387 [Mailer] maintain sender/recipient name in SMTP envelopes (xabbuh)
This PR was merged into the 4.3 branch.

Discussion
----------

[Mailer] maintain sender/recipient name in SMTP envelopes

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

Commits
-------

46ed0e84cd maintain sender/recipient name in SMTP envelopes
2019-09-04 12:04:48 +02:00
Christian Flothmann
46ed0e84cd maintain sender/recipient name in SMTP envelopes 2019-09-04 11:58:50 +02:00
Fabien Potencier
9407c6b6b0 bug #33449 Fix gmail relay (Beno!t POLASZEK)
This PR was merged into the 4.3 branch.

Discussion
----------

Fix gmail relay

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

This tiny PR fixes #32148 by removing the emission of a notice which prevented a `TransportException` to be thrown when something wrong occured.

Commits
-------

6c90e08368 Fix #32148 TransportException was not thrown
2019-09-04 08:06:43 +02:00
Nicolas Grekas
29355c059c bug #33391 [HttpClient] fix support for 103 Early Hints and other informational status codes (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient] fix support for 103 Early Hints and other informational status codes

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

I learned quite recently how 1xx status codes work in HTTP 1.1 when I discovered the [103 Early Hint](https://evertpot.com/http/103-early-hints) status code from [RFC8297](https://tools.ietf.org/html/rfc8297)

This PR fixes support for them by adding a new `getInformationalStatus()` method on `ChunkInterface`. This means that you can now know about 1xx status code by using the `$client->stream()` method:

```php

$response = $client->request('GET', '...');

foreach ($client->stream($response) as $chunk) {
    [$code, $headers] = $chunk->getInformationalStatus();
    if (103 === $code) {
        // $headers['link'] contains the early hints defined in RFC8297
    }

    // ...
}
```

Commits
-------

34275bba1c [HttpClient] fix support for 103 Early Hints and other informational status codes
2019-09-03 23:38:33 +02:00
Nicolas Grekas
200281db40 Merge branch '3.4' into 4.3
* 3.4:
  [Validator] Add ConstraintValidator::formatValue() tests
  [Validator] Sync string to date behavior and throw a better exception
  Check phpunit configuration for listeners
2019-09-03 23:37:38 +02:00
Nicolas Grekas
a99a4801a2 minor #33452 [HttpClient] Fix a bug preventing Server Pushes to be handled properly (dunglas)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient] Fix a bug preventing Server Pushes to be handled properly

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please 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

Follows https://github.com/symfony/symfony/pull/33444.

Commits
-------

e1fbaeb65c [HttpClient] Fix a bug preventing Server Pushes to be handled properly
2019-09-03 23:34:18 +02:00
Kévin Dunglas
e1fbaeb65c
[HttpClient] Fix a bug preventing Server Pushes to be handled properly 2019-09-03 23:26:51 +02:00
Nicolas Grekas
34275bba1c [HttpClient] fix support for 103 Early Hints and other informational status codes 2019-09-03 23:21:26 +02:00
Beno!t POLASZEK
6c90e08368 Fix #32148 TransportException was not thrown 2019-09-03 22:05:27 +02:00