Commit Graph

50935 Commits

Author SHA1 Message Date
Fabien Potencier
24af7dfb08 Fix CHANGELOG 2020-08-22 08:38:27 +02:00
Fabien Potencier
c281867227 feature #37734 [HttpFoundation] add support for X_FORWARDED_PREFIX header (jeff1985)
This PR was squashed before being merged into the 5.2-dev branch.

Discussion
----------

[HttpFoundation] add support for X_FORWARDED_PREFIX header

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | Fix #36809
| License       | MIT

Add support for `X-Forwarded-Prefix` header added by the popular Traefik HTTP LoadBalancer and Reverse Proxy. This ensures that the links rendered by symfony application deployed behind LB are valid even if the application is deployed via prefix URL.

Example routing setup:
route `/admin/(.*)` => symfony backend `/$1`
in this case links rendered by symfony backend must start with `/admin/`

To accept traefik prefix in your symfony app, you must modify index.php to allow accepting this header:

    Request::setTrustedProxies(explode(',', $trustedProxies), Request::HEADER_X_FORWARDED_TRAEFIK ^ Request::HEADER_X_FORWARDED_HOST );`

Commits
-------

109e0a9f1a [HttpFoundation] add support for X_FORWARDED_PREFIX header
2020-08-22 08:37:35 +02:00
Evgeny Anisiforov
109e0a9f1a [HttpFoundation] add support for X_FORWARDED_PREFIX header 2020-08-22 08:37:28 +02:00
Fabien Potencier
f1d1514793 feature #37897 [Mailer] Support Amazon SES ConfigurationSetName (cvmiert)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[Mailer] Support Amazon SES ConfigurationSetName

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | N/A
| License       | MIT
| Doc PR        | N/A

In Amazon SES a Configuration Set can be used to monitor email sending
events (delivery, bounces, complaints etc.). In order to use this
feature the ConfigurationSetName needs to be sent along with the email.

Setting the `X-SES-CONFIGURATION-SET` header should accomplish this for
all SES Transports now.

Ref: https://docs.aws.amazon.com/ses/latest/DeveloperGuide/using-configuration-sets-in-email.html

Commits
-------

a36fec3204 [Mailer] Support Amazon SES ConfigurationSetName
2020-08-22 08:28:39 +02:00
Fabien Potencier
86310deed2 minor #37911 [Cache] fix expected exception message on PHP 8 (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Cache] fix expected exception message on PHP 8

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

Commits
-------

2c9af570a2 fix expected exception messages on PHP 8
2020-08-22 08:24:01 +02:00
Fabien Potencier
d4c8be7b32 feature #37915 Improve link script with rollback when using symlink (noniagriconomie)
This PR was merged into the 5.2-dev branch.

Discussion
----------

Improve link script with rollback when using symlink

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | Improve when dev `symfony/symfony` with local project
| License       | MIT
| Doc PR        | .

Hi, this just `rollback` the local project state when finishing testing via `symlink` (default)

Commits
-------

abf40ceb40 Improve link script with rollback when using symlink
2020-08-22 08:21:32 +02:00
Fabien Potencier
374a0b2eb5 Merge branch '5.1'
* 5.1:
  fix passing arguments to call_user_func_array() on PHP 8
  allow Doctrine DBAL 3
  [Filesystem] fix test on PHP 8
2020-08-21 19:20:41 +02:00
Fabien Potencier
0611b6331c Merge branch '4.4' into 5.1
* 4.4:
  fix passing arguments to call_user_func_array() on PHP 8
  allow Doctrine DBAL 3
  [Filesystem] fix test on PHP 8
2020-08-21 19:19:47 +02:00
Fabien Potencier
4da3ece1b5 Merge branch '3.4' into 4.4
* 3.4:
  fix passing arguments to call_user_func_array() on PHP 8
  [Filesystem] fix test on PHP 8
2020-08-21 19:19:37 +02:00
noniagriconomie
abf40ceb40 Improve link script with rollback when using symlink 2020-08-21 19:05:22 +02:00
Fabien Potencier
2abf876260 bug #37912 [ExpressionLanguage] fix passing arguments to call_user_func_array() on PHP 8 (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[ExpressionLanguage] fix passing arguments to call_user_func_array() on PHP 8

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

Commits
-------

a55ce7c8bb fix passing arguments to call_user_func_array() on PHP 8
2020-08-21 18:53:32 +02:00
Christian Flothmann
2c9af570a2 fix expected exception messages on PHP 8 2020-08-21 16:26:21 +02:00
Christian Flothmann
a55ce7c8bb fix passing arguments to call_user_func_array() on PHP 8 2020-08-21 16:15:51 +02:00
Clara van Miert
a36fec3204
[Mailer] Support Amazon SES ConfigurationSetName
In Amazon SES a Configuration Set can be used to monitor email sending
events (delivery, bounces, complaints etc.). In order to use this
feature the ConfigurationSetName needs to be sent along with the email.

Setting the `X-SES-CONFIGURATION-SET` header should accomplish this for
all SES Transports now.

Ref: https://docs.aws.amazon.com/ses/latest/DeveloperGuide/using-configuration-sets-in-email.html
2020-08-21 15:49:13 +02:00
Fabien Potencier
12706c4ff0 minor #37910 [Filesystem] fix test on PHP 8 (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Filesystem] fix test on PHP 8

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

Commits
-------

c08178978a [Filesystem] fix test on PHP 8
2020-08-21 15:37:43 +02:00
Fabien Potencier
e08c59514c minor #37908 allow Doctrine DBAL 3 (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

allow Doctrine DBAL 3

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

Commits
-------

967331e63a allow Doctrine DBAL 3
2020-08-21 15:33:39 +02:00
Christian Flothmann
967331e63a allow Doctrine DBAL 3 2020-08-21 14:55:23 +02:00
Christian Flothmann
c08178978a [Filesystem] fix test on PHP 8 2020-08-21 14:53:49 +02:00
Christian Flothmann
1f77f32d78 Merge branch '5.1'
* 5.1:
  fix merge
  stop using the deprecated schema synchronizer API
2020-08-21 14:11:42 +02:00
Christian Flothmann
60ce71e593 fix merge 2020-08-21 14:10:32 +02:00
Christian Flothmann
ffd707cf9d Merge branch '4.4' into 5.1
* 4.4:
  stop using the deprecated schema synchronizer API
2020-08-21 13:51:31 +02:00
Fabien Potencier
28ede1f468 bug #37906 [FrameworkBundle] properly choose the best mailer message logger listener (xabbuh)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[FrameworkBundle] properly choose the best mailer message logger listener

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

Properly merge the changes from #37729 and #37728.

Commits
-------

6cffc79de6 properly choose the best mailer message logger listener
2020-08-21 12:17:53 +02:00
Fabien Potencier
8f64d70c10 bug #37907 [Messenger] stop using the deprecated schema synchronizer API (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[Messenger] stop using the deprecated schema synchronizer API

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

see the failing tests and doctrine/dbal#4213

Commits
-------

40129d6239 stop using the deprecated schema synchronizer API
2020-08-21 12:14:49 +02:00
Christian Flothmann
40129d6239 stop using the deprecated schema synchronizer API 2020-08-21 11:51:29 +02:00
Fabien Potencier
2ac2aaab23 Merge branch '5.1'
* 5.1:
  Fix CS
  [Mailer] Fixed mandrill api header structure
  [Mailer] Support reply-to in SesApiAsyncAwsTransport
  [HttpClient][ResponseTrait] Fix typo
  Fix CS
  [Notifier] Fixed base_uri while call auth/time API
  [Mailer] Reorder headers used to determine Sender
  [Validator] Add Lithuanian translation for ISIN constraint
2020-08-21 11:48:30 +02:00
Fabien Potencier
eec66a26de Merge branch '4.4' into 5.1
* 4.4:
  [Mailer] Fixed mandrill api header structure
  [HttpClient][ResponseTrait] Fix typo
  [Mailer] Reorder headers used to determine Sender
  [Validator] Add Lithuanian translation for ISIN constraint
2020-08-21 11:48:22 +02:00
Fabien Potencier
9ab652d60c Merge branch '3.4' into 4.4
* 3.4:
  [Validator] Add Lithuanian translation for ISIN constraint
2020-08-21 11:47:32 +02:00
Christian Flothmann
6cffc79de6 properly choose the best mailer message logger listener 2020-08-21 11:20:36 +02:00
Fabien Potencier
a80dbc5309 feature #37889 Toolbar toggler accessibility (Chi-teck)
This PR was squashed before being merged into the 5.2-dev branch.

Discussion
----------

Toolbar toggler accessibility

| Q             | A
| ------------- | ---
| Branch       | master
| Bug fix      | yes
| New feature  | no
| Deprecations |no
| Tickets       | Fix #37739
| License       | MIT

Commits
-------

4333dd0ac9 Toolbar toggler accessibility
2020-08-21 08:53:22 +02:00
Chi-teck
4333dd0ac9 Toolbar toggler accessibility 2020-08-21 08:53:16 +02:00
Fabien Potencier
c3ce47e669 Fixed CS 2020-08-21 08:52:49 +02:00
Fabien Potencier
e98fdc7073 feature #36515 [HttpKernel] Add $kernel->getBuildDir() to separate it from the cache directory (mnapoli)
This PR was squashed before being merged into the 5.2-dev branch.

Discussion
----------

[HttpKernel] Add `$kernel->getBuildDir()` to separate it from the cache directory

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no
| Tickets       | Fix #23354
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->
<!--
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/releases):
 - Always add tests and ensure they pass.
 - Never break backward compatibility (see https://symfony.com/bc).
 - 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 master.
-->

In order to support deploying on read-only filesystems (e.g. AWS Lambda in my case), I have started implementing #23354.

This introduces `$kernel->getBuildDir()`:

- `$kernel->getBuildDir()`: for cache that can be warmed and deployed as read-only (compiled container, annotations, etc.)
- `$kernel->getCacheDir()`: for cache that can be written at runtime (e.g. cache pools, session, profiler, etc.)

I have probably missed some places or some behavior of Symfony that I don't know. Don't consider this PR perfect, but rather I want to help move things forward :)

TODO:

- [ ] Changelog
- [ ] Upgrade guide
- [ ] Documentation

Commits
-------

ec945f10d8 [HttpKernel] Add `$kernel->getBuildDir()` to separate it from the cache directory
2020-08-21 08:43:41 +02:00
Matthieu Napoli
ec945f10d8 [HttpKernel] Add $kernel->getBuildDir() to separate it from the cache directory 2020-08-21 08:43:34 +02:00
Fabien Potencier
91dc9c7083 Fix CS 2020-08-21 08:40:21 +02:00
Fabien Potencier
af91bf849a bug #37899 [Mailer] Support reply-to in SesApiAsyncAwsTransport (cvmiert)
This PR was merged into the 5.1 branch.

Discussion
----------

[Mailer] Support reply-to in SesApiAsyncAwsTransport

| Q             | A
| ------------- | ---
| Branch?       | 5.1
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | N/A
| License       | MIT
| Doc PR        | N/A

Enable sending `SendEmailRequest`s with reply-to addresses with `SesApiAsyncAwsTransport`.

Commits
-------

163e961b44 [Mailer] Support reply-to in SesApiAsyncAwsTransport
2020-08-21 08:36:53 +02:00
Fabien Potencier
1f4c61683e bug #37900 [Mailer] Fixed mandrill api header structure (wulff)
This PR was submitted for the 5.1 branch but it was squashed and merged into the 4.4 branch instead.

Discussion
----------

[Mailer] Fixed mandrill api header structure

| Q             | A
| ------------- | ---
| Branch?       | 5.1
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| License       | MIT

When using the Mandrill API transport, it is not possible to set a reply-to address.

**How to reproduce**
Create a new email and add a reply-to address:

```php
$email = (new Email())
    ->from('from@example.com')
    ->to('to@example.com')
    ->replyTo('replyto@example.com')
    ->subject('subject')
    ->text('text');
$mailer->send($email);
```

The expected result is a payload which contains the following headers:

```
"headers": {
    "reply-to": "replyto@example.com"
}
```

But instead, the `getPayload()` method produces these headers:

```
"headers": [
    "reply-to: replyto@example.com"
]
```

**Additional context**
See https://mandrillapp.com/api/docs/messages.html.

Commits
-------

aeb4c5e6c7 [Mailer] Fixed mandrill api header structure
2020-08-21 08:31:54 +02:00
wulff
aeb4c5e6c7 [Mailer] Fixed mandrill api header structure 2020-08-21 08:31:47 +02:00
Clara van Miert
163e961b44
[Mailer] Support reply-to in SesApiAsyncAwsTransport
Enable sending `SendEmailRequest`s with reply-to addresses with
`SesApiAsyncAwsTransport`.
2020-08-20 19:12:17 +02:00
Fabien Potencier
f1437be944 minor #37895 [HttpClient][ResponseTrait] Fix typo (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient][ResponseTrait] Fix typo

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

Commits
-------

cbd8ca0625 [HttpClient][ResponseTrait] Fix typo
2020-08-20 15:33:51 +02:00
Fabien Potencier
890f8f0c78 bug #37891 [Mailer] Mailjet - properly format Cc and Bcc for API (tcheymol)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[Mailer] Mailjet - properly format Cc and Bcc for API

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

Fix Cc and Bcc not being set properly
I will submit another PR with unit test before the end of next week

Commits
-------

e038605dca [Mailer] Mailjet - properly format Cc and Bcc for API
2020-08-20 15:32:51 +02:00
Thomas Calvet
cbd8ca0625 [HttpClient][ResponseTrait] Fix typo 2020-08-20 14:25:15 +02:00
Thibaut Cheymol
e038605dca [Mailer] Mailjet - properly format Cc and Bcc for API 2020-08-20 09:40:34 +02:00
Fabien Potencier
5a9180370e Fix CS 2020-08-20 07:29:43 +02:00
Fabien Potencier
dd190565dc bug #37890 [Notifier] Fixed base_uri while call auth/time API (leblanc-simon)
This PR was squashed before being merged into the 5.1 branch.

Discussion
----------

[Notifier] Fixed base_uri while call auth/time API

This patch fixed the base_uri missing while we call the auth/time OVH
API.

* Without this patch, the API call failed because the URL is wrong :
eu.api.ovh.com/auth/time

* With this patch, the API call successed, URL is :
https://eu.api.ovh.com/1.0/auth/time

| Q             | A
| ------------- | ---
| Branch?       | 5.1
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fixed base_uri while call auth/time API
| License       | MIT

Commits
-------

2f91485c40 [Notifier] Fixed base_uri while call auth/time API
2020-08-20 07:28:57 +02:00
Simon Leblanc
2f91485c40 [Notifier] Fixed base_uri while call auth/time API 2020-08-20 07:28:49 +02:00
Maxime Steinhausser
fc2133087d
Fixed PropertyInfo entry in UPGRADE-5.2 file 2020-08-19 19:29:39 +02:00
Fabien Potencier
3c270fbb1f bug #37888 [Mailer] Reorder headers used to determine Sender (cvmiert)
This PR was submitted for the master branch but it was merged into the 4.4 branch instead.

Discussion
----------

[Mailer] Reorder headers used to determine Sender

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | N/A
| License       | MIT
| Doc PR        | N/A

Use the `Return-Path` header as the last candidate to determine the Envelope's sender address.

The `Return-Path` is usually configured _in addition_ to the `Sender` and/or `From` header: it allows for email bounces and complaints to be sent to a dedicated email address. It should therefor not be used as the first candidate header to determine the sender.

Commits
-------

7e60a8f8c9 [Mailer] Reorder headers used to determine Sender
2020-08-19 19:15:16 +02:00
Fabien Potencier
d6980e5f38 feature #32133 [PropertyAccess] Allow to disable magic __get & __set (ogizanagi)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[PropertyAccess] Allow to disable magic __get & __set

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

Working with some legacy code having annoying `__get` & `__set` methods, this would have been useful the same way `__call` can be enabled/disabled.

Commits
-------

11b7bf316e [PropertyAccess] Allow to disable magic __get & __set
2020-08-19 19:12:12 +02:00
Clara van Miert
7e60a8f8c9
[Mailer] Reorder headers used to determine Sender
Use the `Return-Path` header as the last candidate to determine the
Envelope's sender address.

The `Return-Path` is usually configured _in addition_ to the `Sender`
and/or `From` header: it allows for email bounces and complaints to be
sent to a dedicated email address. It should therefore not be used as
the first candidate header to determine the sender.
2020-08-19 19:05:08 +02:00
Maxime Steinhausser
6288449f61 [Validator] Remove duplicated require 2020-08-19 15:55:42 +02:00