Commit Graph

41781 Commits

Author SHA1 Message Date
Fabien Potencier
7c2305d9e9 bug #31423 Fix compat with older versions of PHP (fabpot)
This PR was merged into the 4.3-dev branch.

Discussion
----------

Fix compat with older versions of PHP

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
 - Bug fixes must be submitted against the lowest branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too).
 - Features and deprecations must be submitted against the master branch.
-->

Commits
-------

07b9af2eff fixed compat with older versions of PHP
2019-05-08 15:49:48 +02:00
Fabien Potencier
07b9af2eff fixed compat with older versions of PHP 2019-05-08 15:47:25 +02:00
Roland Franssen
ee25226971 [Intl][4.3] Fix root fallback locale 2019-05-08 08:53:09 +02:00
Fabien Potencier
40e100d3a8 Merge branch '4.2'
* 4.2:
  [Intl] Fix root fallback locale
  fixed CS
2019-05-08 08:52:59 +02:00
Fabien Potencier
74cbe5af9f Merge branch '3.4' into 4.2
* 3.4:
  [Intl] Fix root fallback locale
  fixed CS
2019-05-08 08:50:14 +02:00
Fabien Potencier
75d1dd45e5 bug #31411 [Intl] Fix root fallback locale (ro0NL)
This PR was merged into the 3.4 branch.

Discussion
----------

[Intl] Fix root fallback locale

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass?   | yes (including intl-data group)
| Fixed tickets | #...   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

We should never return "root" as a fallback locale for the "root" locale itself.

While at it, i realized the alias meta files are pointless :)

4.2) b9fc8b7857
4.3) https://github.com/ro0NL/symfony/commit/922a1eb

Commits
-------

11ff24a665 [Intl] Fix root fallback locale
2019-05-08 08:30:26 +02:00
Fabien Potencier
b2df5ca2b2 bug #31410 [Messenger] Fixing missed tests from #31355 (weaverryan)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Messenger] Fixing missed tests from #31355

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

Tests I missed from #31355 - sorry about that!

Commits
-------

ab3744961d Fixing missed tests from #31355
2019-05-08 08:17:17 +02:00
Fabien Potencier
2cf40ccd2f minor #31412 [Intl] recompile master (ro0NL)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Intl] recompile master

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

the file `zh.json` in merge commit e387854288 (diff-147ce5fc9ba87d2b8e5fbf1eaa057260R516) is different compared to its PR: https://github.com/symfony/symfony/pull/31403/files#diff-147ce5fc9ba87d2b8e5fbf1eaa057260R515

this solves it by recompiling 🤔 (cc @fabpot)

i've verified 3.4 & 4.2 are still OK 👍

Commits
-------

4b460eef82 [Intl] recompile master
2019-05-08 07:58:24 +02:00
Roland Franssen
11ff24a665 [Intl] Fix root fallback locale 2019-05-07 23:35:39 +02:00
Roland Franssen
4b460eef82 [Intl] recompile master 2019-05-07 21:05:40 +02:00
Ryan Weaver
ab3744961d Fixing missed tests from #31355 2019-05-07 10:25:03 -04:00
Fabien Potencier
b2f5b8a1e2 feature #31249 [Translator] Set sources when extracting strings from php files (Stadly)
This PR was squashed before being merged into the 4.3-dev branch (closes #31249).

Discussion
----------

[Translator] Set sources when extracting strings from php files

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

Set metadata about filenames and line numbers when extracting translatable strings from php files. This PR complements #30909 and #31248, as those PRs implement support for dumping the filenames and line numbers to Po and Qt file formats.

Commits
-------

f05d4e41be [Translator] Set sources when extracting strings from php files
2019-05-07 13:11:03 +02:00
Stadly
f05d4e41be [Translator] Set sources when extracting strings from php files 2019-05-07 13:10:55 +02:00
Fabien Potencier
224ab703c1 bug #31355 [Messenger] Adding final routing key to delay queue name (weaverryan)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Messenger] Adding final routing key to delay queue name

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

Fixes #31241.

When we delay, we create a queue whose `x-message-ttl` matches the delay length and `x-dead-letter-routing-key` matches the original routing key used for the message. However, before this PR, the original routing key was not part of that queue's name. The result is that if two messages were delayed by the same length, but with different routing keys, the second would try to "redeclare" the existing delay queue with a new `x-dead-letter-routing-key`, resulting in an error similar to:

> Server channel error: 406, message: PRECONDITION_FAILED - inequivalent arg 'x-dead-letter-routing-key' for queue 'delay_queue_1000'

Integration test was improved to catch this.

Cheers!

Commits
-------

9940e71ae1 fixing a bug where the delay queue name did not contain the final routing key
2019-05-07 12:54:07 +02:00
Fabien Potencier
6c6f76f217 fixed CS 2019-05-07 12:18:14 +02:00
Fabien Potencier
555280878b minor #31405 [Dotenv] Test do not use putenv (xuanquynh)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Dotenv] Test do not use putenv

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

The related pull request is https://github.com/symfony/symfony/pull/31062.

If the `$usePutenv` flag is set to `false`, `putenv` won't be executed. I just add a small test for this situation.

Commits
-------

6d1a76e998 Test do not use putenv
2019-05-07 12:14:10 +02:00
Fabien Potencier
e387854288 minor #31403 [Intl][4.3] Apply localeDisplayPattern and fix locale generation (ro0NL)
This PR was squashed before being merged into the 4.3-dev branch (closes #31403).

Discussion
----------

[Intl][4.3] Apply localeDisplayPattern and fix locale generation

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

Follow up of #31337 & #31402  for 4.3 / master

Commits
-------

ed04f242d2 recompile
504db27860 re-apply api changes for TimezoneDataGenerator
c443e78dde re-apply translator parents.json generation
bf50b61f2a [Intl] Apply localeDisplayPattern and fix locale generation
2019-05-07 12:11:50 +02:00
Fabien Potencier
da62835823 Merge branch '4.2'
* 4.2:
  recompile
  re-apply translator parents.json generation
  [Intl] Apply localeDisplayPattern and fix locale generation
  recompile
  [Intl] Apply localeDisplayPattern and fix locale generation
2019-05-07 12:08:52 +02:00
Fabien Potencier
6e8529f82e minor #31402 [Intl][4.2] Apply localeDisplayPattern and fix locale generation (ro0NL)
This PR was squashed before being merged into the 4.2 branch (closes #31402).

Discussion
----------

[Intl][4.2] Apply localeDisplayPattern and fix locale generation

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

Follow up of #31337 for 4.2

Commits
-------

c902c8aea0 recompile
a3164debf8 re-apply translator parents.json generation
294ae7a2b5 [Intl] Apply localeDisplayPattern and fix locale generation
2019-05-07 12:01:00 +02:00
Fabien Potencier
f86f792ef8 Merge branch '3.4' into 4.2
* 3.4:
  recompile
  [Intl] Apply localeDisplayPattern and fix locale generation
2019-05-07 11:58:56 +02:00
Fabien Potencier
7ae5fe033f minor #31337 [Intl] Apply localeDisplayPattern and fix locale generation (ro0NL)
This PR was squashed before being merged into the 3.4 branch (closes #31337).

Discussion
----------

[Intl] Apply localeDisplayPattern and fix locale generation

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no (few data changes)
| Deprecations? | no
| Tests pass?   | yes (including intl-data group)
| Fixed tickets | #...   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

See e2d8530616/icu4c/source/data/lang/en.txt (L1281-L1285)

Technically, this should be applied here: 2b923a7c03/src/Symfony/Component/Intl/Data/Generator/LocaleDataGenerator.php (L211)

This PR aims to implement it, but before it got to this point i noticed a false positive during generation (AFAIK). The current state solves this issue first.

While at it, i cleaned up dead-code in `update-data.php` to reduce the noise.

Commits
-------

a20a6ccac4 recompile
29e8aba14b [Intl] Apply localeDisplayPattern and fix locale generation
2019-05-07 11:55:10 +02:00
Quynh Xuan Nguyen
6d1a76e998 Test do not use putenv 2019-05-07 16:02:05 +07:00
Roland Franssen
ed04f242d2 recompile 2019-05-07 10:43:45 +02:00
Roland Franssen
504db27860 re-apply api changes for TimezoneDataGenerator 2019-05-07 10:41:50 +02:00
Roland Franssen
c443e78dde re-apply translator parents.json generation 2019-05-07 10:40:27 +02:00
Roland Franssen
bf50b61f2a [Intl] Apply localeDisplayPattern and fix locale generation 2019-05-07 10:39:48 +02:00
Roland Franssen
c902c8aea0 recompile 2019-05-07 10:22:02 +02:00
Roland Franssen
a3164debf8 re-apply translator parents.json generation 2019-05-07 10:20:14 +02:00
Roland Franssen
294ae7a2b5 [Intl] Apply localeDisplayPattern and fix locale generation 2019-05-07 10:06:38 +02:00
Roland Franssen
a20a6ccac4 recompile 2019-05-07 09:01:27 +02:00
Roland Franssen
29e8aba14b [Intl] Apply localeDisplayPattern and fix locale generation 2019-05-07 08:59:08 +02:00
Fabien Potencier
7596da1cdc feature #31365 [Intl] Made countries ISO 3166 compliant + exclude Zzzz script code (ro0NL)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Intl] Made countries ISO 3166 compliant + exclude Zzzz script code

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass?   | yes (including intl-data group)
| Fixed tickets | https://github.com/symfony/symfony/pull/31350#issuecomment-488771154, #18613
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

For consistency :)

Commits
-------

1bb7ddeb75 [Intl] Made countries ISO 3166 compliant + exclude Zzzz script code
2019-05-07 08:55:45 +02:00
Roland Franssen
1bb7ddeb75 [Intl] Made countries ISO 3166 compliant + exclude Zzzz script code 2019-05-07 08:50:30 +02:00
Fabien Potencier
2e872c4be0 Merge branch '4.2'
* 4.2:
  [Console] Fix auto-complete for ChoiceQuestion (multi-select answers)
  Translated form, security, validators resources into Belarusian (be)
  [WebProfilerBundle] Don't filter submitted IP values
  [Intl] Cleanup
  bumped Symfony version to 4.2.9
  updated VERSION for 4.2.8
  updated CHANGELOG for 4.2.8
  bumped Symfony version to 3.4.28
  updated VERSION for 3.4.27
  update CONTRIBUTORS for 3.4.27
  updated CHANGELOG for 3.4.27
2019-05-07 08:08:50 +02:00
Fabien Potencier
4304fb8e05 Merge branch '3.4' into 4.2
* 3.4:
  [Intl] Cleanup
2019-05-07 07:54:54 +02:00
Fabien Potencier
16c460c6d6 minor #31366 [Intl] Cleanup (ro0NL)
This PR was merged into the 3.4 branch.

Discussion
----------

[Intl] Cleanup

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| 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 -->

cleanup of #31365 for 3.4 + some other stuff to keep in sync across branches

Commits
-------

70a941ec0c [Intl] Cleanup
2019-05-07 07:53:33 +02:00
Ryan Weaver
9940e71ae1 fixing a bug where the delay queue name did not contain the final routing key 2019-05-06 21:02:46 -04:00
Fabien Potencier
bec45edbea bug #31396 [Messenger] Fix rejecting of pending messages (alexander-schranz)
This PR was squashed before being merged into the 4.3-dev branch (closes #31396).

Discussion
----------

[Messenger] Fix rejecting of pending messages

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

As discussed in https://github.com/symfony/symfony/pull/31387#issuecomment-489605683. It seems pending messages are not removed by calling xdel so we need to call xack first to remove them from the pending state and then call xdel to remove it from the complete stream.

It seems to be the correct way as mentioned in: https://github.com/antirez/redis/issues/5754

Test should be the same as added in: https://github.com/symfony/symfony/pull/31387/files#diff-46c1e03dafbcebc46b5cace7d05de20c

Commits
-------

072e466355 [Messenger] Fix rejecting of pending messages
2019-05-06 17:19:52 +02:00
Alexander Schranz
072e466355 [Messenger] Fix rejecting of pending messages 2019-05-06 17:19:44 +02:00
Fabien Potencier
ecfccc6ef0 feature #31060 [Validator] Make API endpoint for NotCompromisedPasswordValidator configurable (xelan)
This PR was squashed before being merged into the 4.3-dev branch (closes #31060).

Discussion
----------

[Validator] Make API endpoint for NotCompromisedPasswordValidator configurable

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | yes, but acceptable [1]
| Deprecations? | no [1]
| Tests pass?   | yes
| Fixed tickets | #30871, #31054
| License       | MIT
| Doc PR        | symfony/symfony-docs#... (TODO)

Makes the API endpoint for the `NotCompromisedPasswordValidator` configurable. The endpoint includes the placeholder which will be replaced with the first digits of the password hash for k-anonymity.

The endpoint can either be set via constructor injection of the validator if the component is used standalone, or via the framework configuration of symfony/framework-bundle.

[1] As discussed in #31054, the validator is not in a stable release yet, therefore the BC break is considered acceptable. No deprecation / BC layer is necessary.

Commits
-------

f6a80c214d [Validator] Make API endpoint for NotCompromisedPasswordValidator configurable
2019-05-06 13:55:51 +02:00
Andreas Erhard
f6a80c214d [Validator] Make API endpoint for NotCompromisedPasswordValidator configurable 2019-05-06 13:55:26 +02:00
Fabien Potencier
b9637c9209 Merge branch '3.4' into 4.2
* 3.4:
  [Console] Fix auto-complete for ChoiceQuestion (multi-select answers)
  Translated form, security, validators resources into Belarusian (be)
  [WebProfilerBundle] Don't filter submitted IP values
  bumped Symfony version to 3.4.28
  updated VERSION for 3.4.27
  update CONTRIBUTORS for 3.4.27
  updated CHANGELOG for 3.4.27
2019-05-06 13:28:52 +02:00
Fabien Potencier
4e61ff535e bug #31387 [Messenger] Fix Redis Connection::get() after reject() (chalasr)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Messenger] Fix Redis Connection::get() after reject()

| 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

If a message is rejected, another consumer cannot read from the stream because the first subsequent call to `\Redis::xreadgroup()` returns false for some reason.
Reproducer: https://github.com/chalasr/redis-transport-bug

ping @alexander-schranz

Commits
-------

c05273f793 [Messenger] Fix Redis Connection::get() after reject()
2019-05-06 13:25:34 +02:00
Fabien Potencier
bee5216ae8 minor #31389 [Messenger] fix wrong use of generator returns (Tobion)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Messenger] fix wrong use of generator returns

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets |
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

I've seen this problem many times: Mixing `yield` with `return []`.
Unfortunately it cannot be forbidden at the compiler level because it's actually a feature: https://www.php.net/manual/de/generator.getreturn.php
But usually not intended that way.
Also added some other minor cleanups I've found.

Commits
-------

e8a09e9d85 [Messenger] fix wrong use of generator returns
2019-05-06 13:17:40 +02:00
Fabien Potencier
660b18fe39 minor #31392 Make the exception messages consistent across the board (fabpot)
This PR was merged into the 4.3-dev branch.

Discussion
----------

Make the exception messages consistent across the board

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
 - Bug fixes must be submitted against the lowest branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too).
 - Features and deprecations must be submitted against the master branch.
-->

Commits
-------

84c67193bc made the esception messages consistent across the board
2019-05-06 13:16:34 +02:00
Fabien Potencier
0807720ece fixed CS 2019-05-06 13:15:22 +02:00
Tobias Schultze
e8a09e9d85 [Messenger] fix wrong use of generator returns
And some other minor cleanups
2019-05-06 12:22:55 +02:00
Fabien Potencier
84c67193bc made the esception messages consistent across the board 2019-05-06 12:03:55 +02:00
Fabien Potencier
fec95e01a2 bug #31354 [Intl][Validator] Handle alias locales/timezones (ro0NL)
This PR was squashed before being merged into the 4.3-dev branch (closes #31354).

Discussion
----------

[Intl][Validator] Handle alias locales/timezones

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass?   | yes (including intl-data group)
| Fixed tickets | #31022
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

both timezones and locales have aliases (either thru deprecation/migration/etc.)

for locales we compile a mapping, for timezones we dont. yet we can benefit partial alias support thru DateTimeZone, which knows about most timezone IDs already.

both the timezone + locale validator already support aliases. Connsequently, we should support aliases in  `Timezones::exists()`  + `Locales::exists()` as well IMHO.

so far so good; the catch is; with this PR `Locales::getName()` supports aliases, whereas `Timezones::getName()` doesnt. I think it's reasonable for now, until we compile the timezone mapping so we can widen the timezone ID conversion here.

Commits
-------

0a9be0df6e [Intl][Validator] Handle alias locales/timezones
2019-05-06 11:58:38 +02:00
Roland Franssen
0a9be0df6e [Intl][Validator] Handle alias locales/timezones 2019-05-06 11:58:29 +02:00