Commit Graph

43844 Commits

Author SHA1 Message Date
Nicolas Grekas a9ace36389 bug #33241 [Monolog] Fixed ElasticsearchLogstashHandler with monolog 2+ (lyrixx)
This PR was merged into the 4.4 branch.

Discussion
----------

[Monolog] Fixed ElasticsearchLogstashHandler with monolog 2+

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

Commits
-------

1f4ca61408 [Monolog] Fixed ElasticsearchLogstashHandler with monolog 2+
2019-08-19 21:49:26 +02:00
Fabien Potencier b681e935ad minor #33242 [DI] add return-types to generated containers (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[DI] add return-types to generated containers

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

A chunk of #33236 ready for 4.4

Commits
-------

917091955c [DI] add return-types to generated containers
2019-08-19 17:58:03 +02:00
Fabien Potencier c098374d21 bug #33239 [Ldap] Make LdapUser implement EquatableInterface (chalasr)
This PR was merged into the 4.4 branch.

Discussion
----------

[Ldap] Make LdapUser implement EquatableInterface

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

Bugfix because it is required for password migrations https://github.com/symfony/symfony/blob/4.4/src/Symfony/Component/Ldap/Security/LdapUserProvider.php#L128

Commits
-------

ae255095ea [Ldap] Make LdapUser implement EquatableInterface
2019-08-19 17:56:55 +02:00
Grégoire Pineau 1f4ca61408 [Monolog] Fixed ElasticsearchLogstashHandler with monolog 2+ 2019-08-19 17:50:03 +02:00
Nicolas Grekas 917091955c [DI] add return-types to generated containers 2019-08-19 16:04:49 +02:00
Robin Chalas 54b6eb112d minor #33240 Typo - Fix bad classnames in Exceptions docblocks (Mathieudewet)
This PR was squashed before being merged into the 4.4 branch (closes #33240).

Discussion
----------

Typo - Fix bad classnames in Exceptions docblocks

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

Set right classname in some Exceptions docblocks.

Commits
-------

7d1fefe8b8 Typo - Fix bad classnames in Exceptions docblocks
2019-08-19 15:54:29 +02:00
Mdewet 7d1fefe8b8 Typo - Fix bad classnames in Exceptions docblocks 2019-08-19 15:54:22 +02:00
Robin Chalas ae255095ea [Ldap] Make LdapUser implement EquatableInterface 2019-08-19 14:33:50 +02:00
Fabien Potencier ce372672d0 feature #33237 [Mailer] Remove the auth mode DSN option and support in the eSMTP transport (fabpot)
This PR was merged into the 4.4 branch.

Discussion
----------

[Mailer] Remove the auth mode DSN option and support in the eSMTP transport

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | yes     <!-- 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        | -

The authentication mode can be automatically negotiated between the Mailer and the SMTP server. There is an option to force it to a given auth mode, but I don't see any valid use case. So, let's remove that feature.

Commits
-------

34cbda53c4 [Mailer] removed the auth mode DSN option and support in the eSMTP transport
2019-08-19 14:19:32 +02:00
Nicolas Grekas 034c06e181 [Mailer] conflict with symfony/sendgrid-mailer < 4.4 2019-08-19 13:44:21 +02:00
Nicolas Grekas a0c1570915 [Mailer] fix tests 2019-08-19 13:34:47 +02:00
Nicolas Grekas 3cd20c993d Merge branch '4.3' into 4.4
* 4.3:
  [Routing] Add a param annotation for $annot.
  [DI] fix docblock
  [Console] fix docblock
  Add missing translations for Armenian locale
  [Process] Added missing return type.
  [Process] Doc block backport.
  Added doc block for Registry::supports().
  [Cache] Fix predis test
  Don't duplicate addresses in Sendgrid Transport
  Remove unnecessary statement
  Fix some docblocks.
  [Messenger] make delay exchange and queues durable like the normal ones by default
  Cancel delayed message if handler fails
  Added tests for #32370
2019-08-19 13:17:23 +02:00
Nicolas Grekas 3aa4537ef8 Merge branch '3.4' into 4.3
* 3.4:
  [Routing] Add a param annotation for $annot.
  [DI] fix docblock
  Add missing translations for Armenian locale
  [Process] Doc block backport.
  Fix some docblocks.
2019-08-19 13:14:47 +02:00
Fabien Potencier 34cbda53c4 [Mailer] removed the auth mode DSN option and support in the eSMTP transport 2019-08-19 13:04:31 +02:00
Nicolas Grekas ca2869bdba minor #33234 [Routing] Add a param annotation for $annot (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

[Routing] Add a param annotation for $annot

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| 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 PR addresses https://github.com/symfony/symfony/pull/33191/files#r314998032

Commits
-------

5d26f4c72e [Routing] Add a param annotation for $annot.
2019-08-19 13:02:21 +02:00
Fabien Potencier 7bdeff0f84 feature #33233 [Mailer] Simplify the way TLS/SSL/STARTTLS work (fabpot)
This PR was merged into the 4.4 branch.

Discussion
----------

[Mailer] Simplify the way TLS/SSL/STARTTLS work

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | yes
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | -

The way TLS/SSL/STARTTLS is handled is not easy to understand. It's inherited from Swiftmailer and today, I've spent some time to see if we could improve it.

First, the current way: `setEncryption()` takes a string, either `ssl` or `tls`:

 * `ssl`: to enable TLS support on the connection
 * `tls`: to enable `STARTTLS` (upgrade the connection)

There is also a `isTLS()` method which is really confusing due to the fact that both configuration are about TLS anyway.

So, this PR changes things radically:

 * The `setEncryption` method and the `encryption` option on the DSN are gone.

 * TLS is used by default and you can disable it via `disableTls()`. Being secure by default is probably a good idea anyway (like using HTTPS by default instead of HTTP).

 * A new "protocol" SMTPS is supported now and is a way to say that you want TLS; so use `smtps://localhost` to set TLS instead of `smtp://localhost?encryption=ssl`. Note that using `smtp://localhost:465` does the same. All third-party providers now supports both `smtp` and `smtps` protocol even if that does the exact same thing for them (TLS is always enabled).

 * The port is automatically determined based on the TLS setting (if not set explicitly). So 465 for TLS and falls back to 25.

 * There is no more way to enable `STARTTLS`. If you don't configure TLS on the connection and if the server supports `STARTTLS`, then we will enable it automatically.

Great document about all of this: https://www.fastmail.com/help/technical/ssltlsstarttls.html

Commits
-------

5b8c4676d0 [Mailer] simplified the way TLS/SSL/StartTls work
2019-08-19 12:47:43 +02:00
Fabien Potencier 5b8c4676d0 [Mailer] simplified the way TLS/SSL/StartTls work 2019-08-19 11:19:02 +02:00
Alexander M. Turek 5d26f4c72e [Routing] Add a param annotation for $annot. 2019-08-19 11:00:11 +02:00
Nicolas Grekas a8842072a5 [DI] fix docblock 2019-08-18 22:04:16 +02:00
Nicolas Grekas 2ae6e0c14e [Console] fix docblock 2019-08-18 21:32:16 +02:00
Fabien Potencier bc79cfe003 feature #32360 [Monolog] Added ElasticsearchLogstashHandler (lyrixx)
This PR was merged into the 4.4 branch.

Discussion
----------

[Monolog] Added ElasticsearchLogstashHandler

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

This PR was initially [submitted on Monolog](https://github.com/Seldaek/monolog/pull/1334).
It has been refused , but Jordi suggested to add it to the symfony bridge. So here we go :)

---

ATM, there are few options to push log to Elastic Stack in order to play with them:

* install logstash and use a Gelf handler. It works but you have to install logstash and configure it. Not an easy task. More over, it need an extra PHP package
* use the ES handler: It does not play well with context and extra: Kibana is not able to filter on nested object. And this handler is tightly coupled to the ElasticaFormatter formater. More over, it need an extra PHP package
* use something to parse file logs. This is really a bad idea since it involves a parsing... More over a daemon is needed to do that (file beat / logstash / you name it)

This is why I'm introducing a new Handler.

* There is not need to install anything (expect ES, of course)
* It play very well with Kibana, as it uses the Logstash format
* It requires symfony/http-client, but in a modern PHP application (SF 4.3) this dependency is already present
* It slow down a bit the application since it trigger an HTTP request for each logs. But symfony/http-client is non-blocking. If you want to use it in production, I recommend to wrap this handler in a buffer handler or a cross-finger handle to have only one HTTP call.

---

Some performance consideration en a prod env with a buffer handler + this one

* with push to ES: https://blackfire.io/profiles/f94ccf35-9f9d-4df1-bfc5-7fa75a535628/graph
* with push to ES commented: https://blackfire.io/profiles/6b66bc18-6b90-4341-963f-797f7a7a689c/graph

As you can see, as requests are made synchronously, there is no penalty on `AppKernel::Handler()` 😍! But the PHP worker has more work to do, and it's busy much more time (about X2)

I explained everything in the PHP Doc Block

---

This is what you can expect **out of the box**
![image](https://user-images.githubusercontent.com/408368/59916122-9b7b7580-941e-11e9-9a22-f56bc1d1a288.png)

Commits
-------

1587e9a4e2 [Monolog] Added ElasticsearchLogstashHandler
2019-08-18 21:27:18 +02:00
Fabien Potencier 63272d61d0 minor #33212 [VarDumper] Add test dump image (ismail1432)
This PR was squashed before being merged into the 4.4 branch (closes #33212).

Discussion
----------

[VarDumper] Add test dump image

| Q             | A
| ------------- | ---
| Branch?       | 4.4 <!-- see below -->
| 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?   |     <!-- please add some, will be required by reviewers -->
| Fixed tickets | #33107.   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        |  <!-- 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/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
-------

8393a9b5c1 [VarDumper] Add test dump image
2019-08-18 21:21:12 +02:00
Smaine Milianni 8393a9b5c1 [VarDumper] Add test dump image 2019-08-18 21:20:46 +02:00
Fabien Potencier 2a1647a351 minor #33198 Add types to private and final methods (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

Add types to private and final methods

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

Backports from #33154.

Commits
-------

1b880677d4 Add types to private and final methods.
2019-08-18 20:07:05 +02:00
Fabien Potencier aa53a71e03 minor #33204 [Workflow] Added doc block for Registry::supports() (derrabus)
This PR was merged into the 4.3 branch.

Discussion
----------

[Workflow] Added doc block for Registry::supports()

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

Follows #33197, prepares #33198.

Commits
-------

c76fd13848 Added doc block for Registry::supports().
2019-08-18 20:04:08 +02:00
Fabien Potencier 8eef7a7417 minor #33221 [Process] Doc block backport (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

[Process] Doc block backport

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| 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 PR addresses https://github.com/symfony/symfony/pull/33154/files#r314600658

Commits
-------

fed395de4e [Process] Doc block backport.
2019-08-18 19:35:43 +02:00
Fabien Potencier acb1373ac2 minor #33222 [Process] Added missing return type (derrabus)
This PR was merged into the 4.3 branch.

Discussion
----------

[Process] Added missing return type

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| 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
-------

20ff512269 [Process] Added missing return type.
2019-08-18 19:18:45 +02:00
Fabien Potencier 3596948231 feature #32489 [Messenger] Allow exchange type headers binding (CedrickOka)
This PR was merged into the 4.4 branch.

Discussion
----------

[Messenger] Allow exchange type headers binding

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

Taken over #29983, as a feature for 4.4. [Apparently useful](https://www.cloudamqp.com/blog/2015-09-03-part4-rabbitmq-for-beginners-exchanges-routing-keys-bindings.html).

Commits
-------

3211caa5b5 Allow exchange type headers binding
2019-08-18 19:17:21 +02:00
Fabien Potencier d1d0943f80 bug #32497 [Messenger] DispatchAfterCurrentBusMiddleware does not cancel messages from delayed handlers (Nyholm, BastienClement)
This PR was merged into the 4.3 branch.

Discussion
----------

[Messenger] DispatchAfterCurrentBusMiddleware does not cancel messages from delayed handlers

| Q             | A
| ------------- | ---
| Branch?       | 4.3 for bug fixes
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? |no
| Tests pass?   | yes  (thanks @Nyholm)
| Fixed tickets | #32370
| License       | MIT
| Doc PR        | -

This is a fix for #32370. There is no need for anything sophisticated. There is no recursion or fancy stuff going on, just a queue of message handled sequentially. A simple variable is enough to keep track of the queue state.

Thanks @Nyholm for the test, it would clearly have been the hardest part of the job.

Commits
-------

1f5c8a6790 Cancel delayed message if handler fails
35c76a385d Added tests for #32370
2019-08-18 19:13:21 +02:00
Fabien Potencier 546b7e6959 minor #33226 Add missing translations for Armenian locale (DevAly)
This PR was merged into the 3.4 branch.

Discussion
----------

Add missing translations for Armenian locale

| 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?   |  <!-- please add some, will be required by reviewers -->
| Fixed tickets | #30169   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | <!-- 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/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
-------

f6623c11bd Add missing translations for Armenian locale
2019-08-18 19:11:18 +02:00
Cedrick Oka 3211caa5b5 Allow exchange type headers binding 2019-08-18 17:49:22 +01:00
Amine Yakoubi f6623c11bd Add missing translations for Armenian locale 2019-08-18 17:34:57 +01:00
Alexander M. Turek 1b880677d4 Add types to private and final methods. 2019-08-18 11:59:28 +02:00
Alexander M. Turek 20ff512269 [Process] Added missing return type. 2019-08-18 11:18:30 +02:00
Alexander M. Turek fed395de4e [Process] Doc block backport. 2019-08-18 11:12:38 +02:00
Alexander M. Turek c76fd13848 Added doc block for Registry::supports(). 2019-08-18 10:46:59 +02:00
Fabien Potencier ff63bb325d feature #32783 [Messenger] InMemoryTransport handle acknowledged and rejected messages (tienvx)
This PR was merged into the 4.4 branch.

Discussion
----------

[Messenger] InMemoryTransport handle acknowledged and rejected messages

| Q             | A
| ------------- | ---
| Branch?       | 4.4 <!-- see below -->
| Bug fix?      | no
| New feature?  | yes <!-- 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 | #...   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs/pull/12045 <!-- required for new features -->

This PR do 2 things:
* Limit receiving messages from InMemoryTransport to 1 (reverted, another PR will fix the bug: worker does not stop when receiver return more messages than the number specify by the `--limit` option)
* Handle acknowledged and rejected messages in InMemoryTransport. Currently, it does not care about acknowledged and rejected messages. So it always return all messages that have been sent. So if we run console command `messenger:consume`, it will never stop, even though we set the `--limit` option.

For more information, please check the [reproduction](https://github.com/tienvx/symfony-messenger-in-memory-reproduction) project for the expected behavior.

See also my [messenger-memory-transport](https://github.com/tienvx/messenger-memory-transport) project

Commits
-------

71e7bdff22 [Messenger] InMemoryTransport handle acknowledged and rejected messages
2019-08-18 10:25:08 +02:00
Fabien Potencier 431ead273a bug #33127 [Messenger] make delay exchange and queues durable like the normal ones by default (Tobion)
This PR was merged into the 4.3 branch.

Discussion
----------

[Messenger] make delay exchange and queues durable like the normal ones by default

| 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 | #32891
| License       | MIT
| Doc PR        |

This also imrproves BC of #32631 by only adding the new expiry argument in case the delay queue name was not overwritten using the options. I will remove the checks in 4.4 again. Please merge this PR before releasing the new 4.3 version so that 32631 and this PR are part of one release.

Commits
-------

e5ecda6de1 [Messenger] make delay exchange and queues durable like the normal ones by default
2019-08-18 10:19:16 +02:00
Fabien Potencier 9130c6ad1a bug #33140 [Intl] Full alpha3 language support (ro0NL)
This PR was merged into the 4.4 branch.

Discussion
----------

[Intl] Full alpha3 language support

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #33136
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

I'll validate some more cases with tests.

Commits
-------

29aee2ddf2 [Intl] Full alpha3 language support
2019-08-18 10:17:19 +02:00
Fabien Potencier 98e86816ad feature #33155 [ErrorHandler] Added call() method utility to turns any PHP error into \ErrorException (yceruto)
This PR was merged into the 4.4 branch.

Discussion
----------

[ErrorHandler] Added call() method utility to turns any PHP error into \ErrorException

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

**Issue**

There is no easy way to catch PHP warnings, though some progress has been made in this area for PHP 8.0 (https://wiki.php.net/rfc/consistent_type_errors).

**Before**
```php
$file = file_get_contents('unknown.txt');
// PHP Warning:  file_get_contents(unknown.txt): failed to open stream: No such file or directory

// workaround:
$file = @file_get_contents('unknown.txt');
if (false === $file) {
    $e = error_get_last();
    throw new \ErrorException($e['message'], 0, $e['type'], $e['file'], $e['line']);
}
```

**After**
```php
$file = ErrorHandler::call('file_get_contents', 'unknown.txt');

// or
$file = ErrorHandler::call(static function () {
    return file_get_contents('unknown.txt');
});

// or (PHP 7.4)
$file = ErrorHandler::call(fn () => file_get_contents('unknown.txt'));
```

All credits to @nicolas-grekas https://github.com/symfony/symfony/issues/32936#issuecomment-518152681 and @vudaltsov for the idea.

Commits
-------

0faa855b5e Added ErrorHandler::call() method utility to turns any PHP warnings into `\ErrorException`
2019-08-18 10:09:38 +02:00
Fabien Potencier 6ee1f0b6f2 bug #33187 [Intl] Validate country preferred alpha code mapping (ro0NL)
This PR was merged into the 4.4 branch.

Discussion
----------

[Intl] Validate country preferred alpha code mapping

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #...   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

Use the same approach for the preferred alpha2-to-alpha3 code mapping, like Languages does. It provides us some more support in terms of maintenance.

The added `CD => COD` was previously implied based on ordering upstream.

Commits
-------

345305904b [Intl] Validate region preferred alpha code mapping
2019-08-18 10:05:02 +02:00
Nicolas Grekas 76bb1fca5c minor #33197 Fix some docblocks (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

Fix some docblocks

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

Backports from #33154.

Commits
-------

df89373e62 Fix some docblocks.
2019-08-18 09:33:13 +02:00
Nicolas Grekas a553173439 minor #33220 [Cache] Fix predis test (xuanquynh)
This PR was submitted for the 4.4 branch but it was squashed and merged into the 4.3 branch instead (closes #33220).

Discussion
----------

[Cache] Fix predis test

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| 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 #...   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

If `REDIS_HOST` is different from "localhost", `PredisAdapterTest` will go wrong.

Try these instructions below:
```bash
export REDIS_HOST=another_than_localhost
./phpunit src/Symfony/Component/Cache/Tests
```

> note: configure redis server with hostname "another_than_localhost"
![Screenshot from 2019-08-18 09-40-57](https://user-images.githubusercontent.com/16967350/63219445-667c6c80-c19c-11e9-9fce-ec42837ddf27.png)

Commits
-------

99f73fcca8 [Cache] Fix predis test
2019-08-18 09:29:43 +02:00
Quynh Xuan Nguyen 99f73fcca8 [Cache] Fix predis test 2019-08-18 09:29:35 +02:00
tien.xuan.vo 71e7bdff22 [Messenger] InMemoryTransport handle acknowledged and rejected messages 2019-08-18 09:00:51 +07:00
Fabien Potencier d77d89d74f bug #33210 [Mailer] Don't duplicate addresses in Sendgrid Transport (pierredup)
This PR was merged into the 4.3 branch.

Discussion
----------

[Mailer] Don't duplicate addresses in Sendgrid Transport

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

Sendgrid requires the `to`, `cc` and `bcc` fields to be unique

Commits
-------

2706a9763f Don't duplicate addresses in Sendgrid Transport
2019-08-17 13:06:15 +02:00
Tobias Schultze 9c1e8acf80 minor #33208 Remove unnecessary statement (david-binda)
This PR was merged into the 4.3 branch.

Discussion
----------

Remove unnecessary statement

The casting of `$id` to string inside the second foreach loop in `\Symfony\Component\DependencyInjection\Dumper\PhpDumper::addMethodMap` is redundant, as the variable is not used after the casting inside nor outside the loop (while still in the loop, it gets overridden upon next iteration).

| Q             | A
| ------------- | ---
| Branch?       | 4.4 for features / 3.4 or 4.3 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 -->
| Fixed tickets | #33206   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | no <!-- 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/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
-------

cde223ad2a Remove unnecessary statement
2019-08-17 02:20:27 +02:00
Fabien Potencier 3522590290 feature #33203 [Mailer] Add support for the queued flag in the EmailCount assertion (fabpot)
This PR was merged into the 4.4 branch.

Discussion
----------

[Mailer] Add support for the queued flag in the EmailCount assertion

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | yes
| 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        | -

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

afb1c04c35 [Mailer] added a way to test the number of queued emails
2019-08-16 21:40:14 +02:00
Fabien Potencier afb1c04c35 [Mailer] added a way to test the number of queued emails 2019-08-16 21:31:41 +02:00
Pierre du Plessis 2706a9763f
Don't duplicate addresses in Sendgrid Transport 2019-08-16 20:11:33 +02:00