Commit Graph

42156 Commits

Author SHA1 Message Date
Nicolas Grekas e901494262 bug #31864 [Cache] Fixed undefined variable in ArrayTrait (eXtreme)
This PR was squashed before being merged into the 4.3 branch (closes #31864).

Discussion
----------

[Cache] Fixed undefined variable in ArrayTrait

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

So once again (see https://github.com/symfony/symfony/pull/29591) my test suite managed to find an error in ArrayTrait in cache. This time it was this PR: https://github.com/symfony/symfony/pull/31395 later improved by https://github.com/symfony/symfony/pull/31590 that introduced `$id` to logging, which I guess should be `$key`? So this PR changes it to `$key`, ~but my tests **still fail** as there is no `$this->namespace` in `ArrayAdapter` (is this the only class that uses this ArrayTrait?). But I don't know what to do about it. Maybe @nicolas-grekas has some answers?~

Commits
-------

8568923491 [Cache] Fixed undefined variable in ArrayTrait
2019-06-05 15:26:52 +02:00
Jacek Jędrzejewski 8568923491 [Cache] Fixed undefined variable in ArrayTrait 2019-06-05 15:26:46 +02:00
Nicolas Grekas fc7ed49c78 Merge branch '4.2' into 4.3
* 4.2:
  [HttpKernel] Fix handling non-catchable fatal errors
  Fix json-encoding when JSON_THROW_ON_ERROR is used
  [HttpFoundation] work around PHP 7.3 bug related to json_encode()
  [Security] added support for updated \"distinguished name\" format in x509 authentication
2019-06-05 15:25:51 +02:00
Nicolas Grekas eb41911d88 Merge branch '3.4' into 4.2
* 3.4:
  Fix json-encoding when JSON_THROW_ON_ERROR is used
  [HttpFoundation] work around PHP 7.3 bug related to json_encode()
  [Security] added support for updated \"distinguished name\" format in x509 authentication
2019-06-05 15:22:46 +02:00
Fabien Potencier e5b082acee bug #31850 [HttpClient] add $response->cancel() (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient] add $response->cancel()

| 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        | https://github.com/symfony/symfony-docs/pull/11668

An alternative to #31845 and #31842.
Same as  #31831 but considered as a bug fix (at the Contracts level), thus for 4.3.
I think we're early enough since 4.3/1.1 to do it.
That will save us some headaches in the short term.

Commits
-------

c402418723 [HttpClient] add $response->cancel()
2019-06-05 15:19:12 +02:00
Fabien Potencier 28fbf160ae bug #31871 [HttpClient] revert bad logic around JSON_THROW_ON_ERROR (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient] revert bad logic around JSON_THROW_ON_ERROR

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

Same as #31869, reverts #31861

Commits
-------

846116edab [HttpClient] revert bad logic around JSON_THROW_ON_ERROR
2019-06-05 15:18:34 +02:00
Fabien Potencier 92e8514dbb bug #31869 Fix json-encoding when JSON_THROW_ON_ERROR is used (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

Fix json-encoding when JSON_THROW_ON_ERROR is used

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

As hinted in #31860 by @lt

Commits
-------

d18f42c409 Fix json-encoding when JSON_THROW_ON_ERROR is used
2019-06-05 15:14:18 +02:00
Fabien Potencier a80483cdb7 bug #31868 [HttpKernel] Fix handling non-catchable fatal errors (nicolas-grekas)
This PR was merged into the 4.2 branch.

Discussion
----------

[HttpKernel] Fix handling non-catchable fatal errors

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

This reverts PR #27519 this commit 18c2dde08e,
reversing changes made to ac1189a61e.

Right now, the listener is skipped on fatal errors.

Commits
-------

a1619ccb95 [HttpKernel] Fix handling non-catchable fatal errors
2019-06-05 15:12:48 +02:00
Nicolas Grekas 846116edab [HttpClient] revert bad logic around JSON_THROW_ON_ERROR 2019-06-05 13:58:47 +02:00
Tobias Schultze 3242392b1b minor #31866 [Routing] revert deprecation of Serializable in routing (Tobion)
This PR was merged into the 4.3 branch.

Discussion
----------

[Routing] revert deprecation of Serializable in routing

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

we still need to implement Serializable as long as we support PHP < 7.4. otherwise serialized data in php 7.2 would not work anymore when people upgrade to php 7.4. see discussion in https://github.com/symfony/symfony/pull/31792#discussion_r289626274
partly reverts #30286

Commits
-------

d32a29527b [Routing] revert deprecation of Serializable in routing
2019-06-05 13:36:12 +02:00
Nicolas Grekas a1619ccb95 [HttpKernel] Fix handling non-catchable fatal errors
This reverts PR #27519 this commit 18c2dde08e,
reversing changes made to ac1189a61e.
2019-06-05 13:34:39 +02:00
Nicolas Grekas d18f42c409 Fix json-encoding when JSON_THROW_ON_ERROR is used 2019-06-05 13:33:52 +02:00
Tobias Schultze d32a29527b [Routing] revert deprecation of Serializable in routing
we still need to implement Serializable as long as we support PHP < 7.4. otherwise serialized data in php 7.2 would not work anymore when people upgrade to php 7.4
2019-06-05 11:16:20 +02:00
Fabien Potencier d90dd8da98 bug #31834 [HttpClient] Don't throw InvalidArgumentException on bad Location header (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient] Don't throw InvalidArgumentException on bad Location header

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

Instead, just stop following redirections and throw a `RedirectionExceptionInterface` as usual when throwing is not disabled.

Commits
-------

4acca42330 [HttpClient] Don't throw InvalidArgumentException on bad Location header
2019-06-05 04:18:50 +02:00
Fabien Potencier 036d7b69a4 bug #31846 [Mailer] Set default crypto method (bpolaszek)
This PR was merged into the 4.3 branch.

Discussion
----------

[Mailer] Set default crypto method

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

This PR fixes #31105 by providing `STREAM_CRYPTO_METHOD_TLS_CLIENT | STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT | STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT` as  default crypto method when none is defined in user options and TLS is enabled.

Commits
-------

4f0ad25fab Set default crypto method - Fix #31105
2019-06-05 04:15:36 +02:00
Fabien Potencier ed59830f55 bug #31849 [Console] Add check for Konsole/Yakuake to disable hyperlinks (belinde)
This PR was squashed before being merged into the 4.3 branch (closes #31849).

Discussion
----------

[Console] Add check for Konsole/Yakuake to disable hyperlinks

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

Added check for environment variable set by Konsole and other relateds terminal emulators.

A ticket has been opened to Konsole team to support this feature someday: https://bugs.kde.org/show_bug.cgi?id=408288

Commits
-------

14b27b7d02 [Console] Add check for Konsole/Yakuake to disable hyperlinks
2019-06-05 04:08:12 +02:00
Franco Traversaro 14b27b7d02 [Console] Add check for Konsole/Yakuake to disable hyperlinks 2019-06-05 04:08:03 +02:00
Fabien Potencier e6e63c7d32 bug #31854 Rename the Symfony Mailer service implementation to avoid conflict with SwitMailer (tgalopin)
This PR was merged into the 4.3 branch.

Discussion
----------

Rename the Symfony Mailer service implementation to avoid conflict with SwitMailer

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

When you install Symfony Mailer as well as SwitMailer and try to typehint MailerInterface, the autowiring alias is aliased to the "mailer" service which is overriden by SwitMailer, thus making the injection fail.

Commits
-------

e7c96d3b43 Rename the Symfony Mailer service config to avoid conflict with SwitMailer
2019-06-05 04:04:45 +02:00
Fabien Potencier a8aad15639 bug #31856 [VarDumper] fix dumping the cloner itself (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[VarDumper] fix dumping the cloner itself

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

Having PHP references inside the cloner badly breaks it when it finds itself in the dumped graph.
Let's remove this optimization, and skip dumping cloners by default as a bonus.

Commits
-------

3cd56cb018 [VarDumper] fix dumping the cloner itself
2019-06-05 04:03:00 +02:00
Fabien Potencier 4f7c614ef0 bug #31861 [HttpClient] work around PHP 7.3 bug related to json_encode() (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient] work around PHP 7.3 bug related to json_encode()

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

This is the remaining of ##31860 for upper branches.

Commits
-------

42904e34e6 [HttpClient] work around PHP 7.3 bug related to json_encode()
2019-06-05 04:00:18 +02:00
Fabien Potencier 2ae0580eea bug #31860 [HttpFoundation] work around PHP 7.3 bug related to json_encode() (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpFoundation] work around PHP 7.3 bug related to json_encode()

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

I know, this doesn't make any sense.
`json_encode` embeds global state behind the scene :(

For reference, I asked on php-internals what they think about this:
https://externals.io/message/105653#105838

Commits
-------

e6e63017f0 [HttpFoundation] work around PHP 7.3 bug related to json_encode()
2019-06-05 03:57:52 +02:00
Nicolas Grekas 42904e34e6 [HttpClient] work around PHP 7.3 bug related to json_encode() 2019-06-04 21:00:49 +02:00
Nicolas Grekas e6e63017f0 [HttpFoundation] work around PHP 7.3 bug related to json_encode() 2019-06-04 20:52:06 +02:00
Nicolas Grekas 3cd56cb018 [VarDumper] fix dumping the cloner itself 2019-06-04 19:28:31 +02:00
Titouan Galopin e7c96d3b43 Rename the Symfony Mailer service config to avoid conflict with SwitMailer 2019-06-04 17:17:31 +02:00
Beno!t POLASZEK 4f0ad25fab Set default crypto method - Fix #31105 2019-06-04 15:59:49 +02:00
Fabien Potencier 04e2026b98 bug #31852 [Form] add missing symfony/service-contracts dependency (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[Form] add missing symfony/service-contracts dependency

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

`ResetInterface` is needed by `CachingFactoryDecorator`, which is used in `CoreExtension`, so this is a mandatory dep.

Commits
-------

8639bcca3d [Form] add missing symfony/service-contracts dependency
2019-06-04 15:54:26 +02:00
Nicolas Grekas 8639bcca3d [Form] add missing symfony/service-contracts dependency 2019-06-04 15:28:20 +02:00
Fabien Potencier 33f3933a90 Merge branch '4.2' into 4.3
* 4.2:
  Fix inconsistency in json format regarding DST value
2019-06-04 14:23:51 +02:00
Fabien Potencier 846f721cc4 minor #31640 Fix inconsistency in json format regarding DST value (mmokhi)
This PR was merged into the 4.2 branch.

Discussion
----------

Fix inconsistency in json format regarding DST value

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

In absence of a known time zone we might or might not have DST.
If DST doesn't exist (eg, server has timezone set on GMT) the current test fails,
Becasue PHP doesn't dump `dst_savings` in the `IntlTimeZone` objects.

This patch takes care of this known point.

Sponsored-by: Platform.sh

Commits
-------

38a5b2c943 Fix inconsistency in json format regarding DST value
2019-06-04 14:23:06 +02:00
mmokhi 38a5b2c943 Fix inconsistency in json format regarding DST value
The `$expected` template seems not to be consistent.
It will change when the DST value is 0 (it'll not have `dst_savings` for
example)

This patch takes care of the issue, by adding proper condition.

Sponsored-by: Platform.sh
2019-06-04 13:59:41 +02:00
Nicolas Grekas c402418723 [HttpClient] add $response->cancel() 2019-06-04 13:36:30 +02:00
Fabien Potencier 40076b98bf bug #31836 [DoctrineBridge] do not process private properties from parent class (xabbuh)
This PR was merged into the 4.3 branch.

Discussion
----------

[DoctrineBridge] do not process private properties from parent class

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

Commits
-------

adfa1ef3ce do not process private properties from parent class
2019-06-04 12:24:01 +02:00
Fabien Potencier 22e5f32e5f bug #31790 [Messenger] set amqp content_type based on serialization format (Tobion)
This PR was merged into the 4.3 branch.

Discussion
----------

[Messenger] set amqp content_type based on serialization format

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

Commits
-------

dee077016d [Messenger] set amqp content_type based on serialization format
2019-06-04 12:22:38 +02:00
Fabien Potencier 5a88e4cfd6 minor #31837 Change type hints (fabpot)
This PR was merged into the 4.3 branch.

Discussion
----------

Change type hints

| Q             | A
| ------------- | ---
| Branch?       | 4.3 for features / 3.4, 4.2 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 | n/a
| License       | MIT
| Doc PR        | n/a

see https://github.com/symfony/symfony/pull/31774#discussion_r289597824

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

d56ae06ca3 changed type hints
2019-06-04 11:23:46 +02:00
Fabien Potencier d56ae06ca3 changed type hints 2019-06-04 11:22:54 +02:00
Christian Flothmann adfa1ef3ce do not process private properties from parent class 2019-06-04 10:43:25 +02:00
Nicolas Grekas 4acca42330 [HttpClient] Don't throw InvalidArgumentException on bad Location header 2019-06-04 10:32:15 +02:00
Fabien Potencier f6a6fb6834 bug #31832 [HttpClient] fix unregistering the debug buffer when using curl (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient] fix unregistering the debug buffer when using curl

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

Commits
-------

4fce813ed0 [HttpClient] fix unregistering the debug buffer when using curl
2019-06-04 09:03:28 +02:00
Fabien Potencier 5498cf559c bug #31407 [Security] added support for updated "distinguished name" format in x509 authentication (Robert Kopera)
This PR was submitted for the master branch but it was squashed and merged into the 3.4 branch instead (closes #31407).

Discussion
----------

[Security] added support for updated "distinguished name" format in x509 authentication

RFC 2253 (https://tools.ietf.org/html/rfc2253)
issue: https://github.com/symfony/symfony/issues/31406

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

Commits
-------

bdbac2c6e6 [Security] added support for updated \"distinguished name\" format in x509 authentication
2019-06-04 09:01:23 +02:00
Robert Kopera bdbac2c6e6 [Security] added support for updated \"distinguished name\" format in x509 authentication 2019-06-04 09:01:11 +02:00
Nicolas Grekas 4fce813ed0 [HttpClient] fix unregistering the debug buffer when using curl 2019-06-04 08:38:41 +02:00
Fabien Potencier 2438b1422a bug #31774 [Mailer] Fix the possibility to set a From header from MessageListener (fabpot)
This PR was merged into the 4.3 branch.

Discussion
----------

[Mailer] Fix the possibility to set a From header from MessageListener

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

f4254e6f5e [Mailer] fixed the possibility to set a From header from MessageListener
2019-06-04 08:18:12 +02:00
Fabien Potencier 66b87abcfc bug #31811 [DoctrineBridge] don't add embedded properties to wrapping class metadata (xabbuh)
This PR was merged into the 4.3 branch.

Discussion
----------

[DoctrineBridge] don't add embedded properties to wrapping class metadata

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

Commits
-------

56fe02512c don't add embedded properties to wrapping class metadata
2019-06-04 08:16:02 +02:00
Nicolas Grekas 0a9d724d2a Merge branch '4.2' into 4.3
* 4.2:
  [Translation] Fixed case sensitivity of lint:xliff command
  fix type hint for salt in PasswordEncoderInterface
  Simplify code - catch \Throwable capture all exceptions
  fix typo in PR #31802
  update italian validator translation
  Add missing translations
2019-06-03 22:27:40 +02:00
Nicolas Grekas 9fbfc4cf06 Merge branch '3.4' into 4.2
* 3.4:
  fix type hint for salt in PasswordEncoderInterface
  fix typo in PR #31802
  update italian validator translation
  Add missing translations
2019-06-03 22:27:17 +02:00
Nicolas Grekas 54ba63a57e bug #31786 [Translation] Fixed case sensitivity of lint:xliff command (javiereguiluz)
This PR was squashed before being merged into the 4.2 branch (closes #31786).

Discussion
----------

[Translation] Fixed case sensitivity of lint:xliff command

| Q             | A
| ------------- | ---
| Branch?       | 4.2
| 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        | (not needed)

I was checking some errors of `lint:xliff` (https://travis-ci.org/EasyCorp/EasyAdminBundle/jobs/540053551#L657) and saw this:

```
ERROR  in src/Resources/translations/EasyAdminBundle.sr_RS.xlf
 * There is a mismatch between the language included in the file name ("EasyAdminBundle.sr_RS.xlf") and the "sr-rs" value used in the "target-language" attribute of the file.

ERROR  in src/Resources/translations/EasyAdminBundle.zh_CN.xlf
 * There is a mismatch between the language included in the file name ("EasyAdminBundle.zh_CN.xlf") and the "zh-cn" value used in the "target-language" attribute of the file.
```

This was suspicious, so I checked the XLIFF standard and it says (http://docs.oasis-open.org/xliff/v1.2/os/xliff-core.html#target-language):

```
target-language:
  Unlike the other XLIFF attributes, the values are not case-sensitive.
```

So, it's valid that `zh-cn` is the target language and `zh-CN` is the file extension. This PR fixes that.

Commits
-------

ec690b2145 [Translation] Fixed case sensitivity of lint:xliff command
2019-06-03 22:10:17 +02:00
Javier Eguiluz ec690b2145 [Translation] Fixed case sensitivity of lint:xliff command 2019-06-03 22:09:57 +02:00
Nicolas Grekas 0bf50cff96 bug #31815 [Translator] Collect locale details earlier in the process (pierredup)
This PR was merged into the 4.3 branch.

Discussion
----------

[Translator] Collect locale details earlier in the process

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

The [LocaleAwareListener](https://github.com/symfony/symfony/blob/4.3/src/Symfony/Component/HttpKernel/EventListener/LocaleListener.php) class reverts the locale back to the default locale when the request has finished. But the `TranslationDataCollector` only collects the locale in `lateCollect`, which only happens when the kernel terminates. This means the locale is reverted back to the default by the time the collector runs.

The PR moves the `locale` and `fallback_locales` from `lateCollect` to `collect`, so that the information can be captured earlier, before the `LocaleAwareListener` is run.

Commits
-------

5c394eeb79 Collect locale details earlier in the process in TranslationDataCollector
2019-06-03 21:51:47 +02:00
Nicolas Grekas dfae7e9f9d minor #31822 Simplify code - catch \Throwable capture all exceptions (lyrixx)
This PR was merged into the 4.2 branch.

Discussion
----------

Simplify code - catch \Throwable capture all exceptions

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

---

This is a legacy when we did support PHP 5.X

Commits
-------

648c6949fc Simplify code - catch \Throwable capture all exceptions
2019-06-03 21:45:55 +02:00