Commit Graph

41939 Commits

Author SHA1 Message Date
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
Fabien Potencier 26e1d8948e feature #31353 [FrameworkBundle] Show injected services for iterator and array arguments (jschaedl)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[FrameworkBundle] Show injected services for iterator and array arguments

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      |no
| New feature?  | yes<!-- 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 | #31340   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | tbd.

When I have the following service configuration:

```yaml
    App\Word\Checker\StaticWordChecker:
        tags: [app.checker]

    App\Word\Checker\BannedWorldListChecker:
        tags: [app.checker]

    App\Word\WordCheckerTaggedIterator:
        arguments: [!tagged app.checker]

    App\Word\WordCheckerArray:
        arguments:
            - App\Word\Checker\StaticWordChecker: ~
              App\Word\Checker\BannedWorldListChecker: ~
```

and I run:
`./bin/console debug:container App\Word\WordCheckerArray --show-arguments`
```bash
Information for Service "App\Word\WordCheckerArray"
===================================================

 ---------------- -------------------------------------------
  Option           Value
 ---------------- -------------------------------------------
  Service ID       App\Word\WordCheckerArray
  Class            App\Word\WordCheckerArray
  Tags             -
  Public           no
  Synthetic        no
  Lazy             no
  Shared           yes
  Abstract         no
  Autowired        yes
  Autoconfigured   yes
  Arguments        Array (2 element(s))
                   - App\Word\Checker\StaticWordChecker
                   - App\Word\Checker\BannedWorldListChecker
 ---------------- -------------------------------------------
```
or

`./bin/console debug:container App\Word\WordCheckerTaggedIterator --show-arguments`
```bash
Information for Service "App\Word\WordCheckerTaggedIterator"
============================================================

 ---------------- -------------------------------------------
  Option           Value
 ---------------- -------------------------------------------
  Service ID       App\Word\WordCheckerTaggedIterator
  Class            App\Word\WordCheckerTaggedIterator
  Tags             -
  Public           no
  Synthetic        no
  Lazy             no
  Shared           yes
  Abstract         no
  Autowired        yes
  Autoconfigured   yes
  Arguments        Iterator (2 element(s))
                   - App\Word\Checker\BannedWorldListChecker
                   - App\Word\Checker\StaticWordChecker
 ---------------- -------------------------------------------
```

I can now see the the objects injected into the iterator and array arguments.

Commits
-------

db5fb200ce [FrameworkBundle] Show injected services for Iterator and Array
2019-05-06 11:45:01 +02:00
Fabien Potencier b1872616d0 feature #31350 [Intl] Rename Regions to Countries (ro0NL)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Intl] Rename Regions to Countries

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

Because that's what the current region data is about; country codes.

This makes things consistent across the board; i.e. CountryType, CountryValidator

This allows a possible other region subset (e.g "continents") to distinct. Thus having `Countries::class` + `Continents::class` both reading from the `region` data. By then data should be compiled under different keys.

Current class is master only, so now or never :)

The alternative approach would be `Regions::getCountryNames [,getContinentNames, etc.]`, which is harder to scale, and should also be decided for 4.3 ideally.

Commits
-------

49aee67f46 [Intl] Rename Regions to Countries
2019-05-06 11:35:15 +02:00
Fabien Potencier aa3715714c feature #31364 [Bridge/PhpUnit] Extract all the code but shebang from bin/simple-phpunit (JustBlackBird)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Bridge/PhpUnit] Extract all the code but shebang from bin/simple-phpunit

The change allow `simple-phpunit` to be included without `#!/usr/bin/env php` string outputted.

Also it's the first step to fix #27035 (the second one is to change phpunit bridge recipe).

The reason why I fix a closed issue is because PHPStorm don't want to parse output from simple-phpunit with extra shebang.

![phpstorm-phpunit](https://user-images.githubusercontent.com/1167086/57097433-6c9b2a00-6d20-11e9-9979-0c2c6d24147d.png)

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

Commits
-------

74a0be3e0b [Bridge/PhpUnit] Extract all the code but shebang from bin/simple-phpunit
2019-05-06 11:29:23 +02:00
Fabien Potencier 60b505e88c bug #31377 [Console] Fix auto-complete for ChoiceQuestion (multi-select answers) (battye)
This PR was squashed before being merged into the 3.4 branch (closes #31377).

Discussion
----------

[Console] Fix auto-complete for ChoiceQuestion (multi-select answers)

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

Previously, a bug existed whereby for multi-select questions, the auto-complete would only work for the first answer supplied by the user. On all subsequent answers, the auto-complete would not appear.

Now it works as expected:

![screenshot](https://user-images.githubusercontent.com/2110222/57158657-8c147e80-6e16-11e9-94f7-a9bc95506545.png)

Commits
-------

59321fe031 [Console] Fix auto-complete for ChoiceQuestion (multi-select answers)
2019-05-06 11:25:23 +02:00
battye 59321fe031 [Console] Fix auto-complete for ChoiceQuestion (multi-select answers) 2019-05-06 11:25:16 +02:00
Jan Schädlich db5fb200ce [FrameworkBundle] Show injected services for Iterator and Array 2019-05-05 22:13:45 +02:00
Dmitry Simushev 74a0be3e0b [Bridge/PhpUnit] Extract all the code but shebang from bin/simple-phpunit
The change allow `simple-phpunit` to be included without
`#!/usr/bin/env php` string outputted.

Also it's the first step to fix #27035 (the second one is to change
phpunit bridge recipe).
2019-05-05 21:47:39 +03:00
Nicolas Grekas b82b09eefb minor #31372 Merges second DI section into first one (jschaedl)
This PR was merged into the 4.3-dev branch.

Discussion
----------

Merges second DI section into first one

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

Commits
-------

826237aa4b Merges second DI section into first one
2019-05-05 18:45:06 +02:00
Nicolas Grekas 5453f3ea54 bug #31380 [WebProfilerBundle] Don't filter submitted IP values (javiereguiluz)
This PR was merged into the 3.4 branch.

Discussion
----------

[WebProfilerBundle] Don't filter submitted IP values

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| 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 | #31378   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | -

I don't think we need to filter the value submitted by users in this case.

Commits
-------

29bd2ad3f2 [WebProfilerBundle] Don't filter submitted IP values
2019-05-05 18:39:56 +02:00
Robin Chalas c05273f793 [Messenger] Fix Redis Connection::get() after reject() 2019-05-05 18:23:23 +02:00
Nicolas Grekas c315767b69 bug #31382 [PhpunitBridge] Fix not unserialized logs after DeprecationErrorHandler refacto (l-vo)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[PhpunitBridge] Fix not unserialized logs after DeprecationErrorHandler refacto

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

During the refactoring for #29211 , it seems a little bug was introduced. When using runInSeparateProcess, deprecation message isn't unserialized anymore.

Commits
-------

f522729527 [PhpunitBridge] Fix not unserialized logs after DeprecationErrorHandler refactoring
2019-05-05 18:12:56 +02:00
Nicolas Grekas 7494d466bc minor #31386 Translated form, security, validators resources into Belarusian (be) (vtsykun)
This PR was submitted for the master branch but it was merged into the 3.4 branch instead (closes #31386).

Discussion
----------

Translated form, security, validators resources into Belarusian (be)

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

Commits
-------

3ae9de1ef3 Translated form, security, validators resources into Belarusian (be)
2019-05-05 18:11:13 +02:00
Uladzimir Tsykun 3ae9de1ef3 Translated form, security, validators resources into Belarusian (be) 2019-05-05 18:11:06 +02:00
Nicolas Grekas b224a32f0a bug #31384 [Mailer][Messenger] Changing messenger bus id from 'message_bus' to 'messenger.default_bus' (Koc)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Mailer][Messenger] Changing messenger bus id from 'message_bus' to 'messenger.default_bus'

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| 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 | #30690
| License       | MIT
| Doc PR        | -

Follow up of #30690

Commits
-------

d3079e0976 Changing messenger bus id from 'message_bus' to 'messenger.default_bus'
2019-05-05 18:09:33 +02:00
Konstantin Myakshin d3079e0976 Changing messenger bus id from 'message_bus' to 'messenger.default_bus' 2019-05-05 00:51:20 +03:00
Laurent VOULLEMIER f522729527 [PhpunitBridge] Fix not unserialized logs after DeprecationErrorHandler refactoring
(when using runInSeparateProcess)
2019-05-04 20:28:21 +02:00
Javier Eguiluz 29bd2ad3f2 [WebProfilerBundle] Don't filter submitted IP values 2019-05-04 10:57:59 +02:00
Robin Chalas ad6e888a6f bug #31344 [FrameworkBundle] Remove SendFailedMessageToFailureTransportListener if no failure transport (chalasr)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[FrameworkBundle] Remove SendFailedMessageToFailureTransportListener if no failure transport

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

When there is no failure transport configured and `messenger:consume` hits a failing message:
>  Argument 2 passed to Symfony\Component\Messenger\EventListener\SendFailedMessageToFailureTransportListener::__construct() must be of the type string, null given

/cc @weaverryan

Commits
-------

bdf4e913be [FrameworkBundle] Remove SendFailedMessageToFailureTransportListener definition if no failure transport
2019-05-03 13:56:22 +02:00
Christian Flothmann d4baa71af6 feature #30985 [Form] Keep preferred choices order in ChoiceType (vudaltsov)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Form] Keep preferred choices order in ChoiceType

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

#EUFOSSA

Commits
-------

340a2fb3f8 Keep preferred_choices order
2019-05-03 12:06:19 +02:00
Jan Schädlich 826237aa4b Merges second DI section into first one 2019-05-03 11:45:06 +02:00
Robin Chalas bdf4e913be [FrameworkBundle] Remove SendFailedMessageToFailureTransportListener definition if no failure transport 2019-05-02 22:37:20 +02:00
Roland Franssen 70a941ec0c [Intl] Cleanup 2019-05-02 21:34:01 +02:00
Fabien Potencier 446480e2f7 minor #31346 [Messenger] Lowercased method calls on \Redis (chalasr)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Messenger] Lowercased method calls on \Redis

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/31298#discussion_r279312710
| License       | MIT
| Doc PR        | n/a

64e71b5307/php_redis.h (L231-L244)

Commits
-------

2d41976b26 [Messenger] Lowercased method calls on \Redis
2019-05-02 07:45:21 +02:00
Roland Franssen 49aee67f46 [Intl] Rename Regions to Countries 2019-05-01 22:02:47 +02:00
Christian Flothmann c5f450b54c minor #31352 [TwigBridge] fix conflict resolution (xabbuh)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[TwigBridge] fix conflict resolution

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

Commits
-------

d99da56f8e fix conflict resolution
2019-05-01 20:09:17 +02:00
Christian Flothmann d99da56f8e fix conflict resolution 2019-05-01 19:50:42 +02:00
Fabien Potencier c9231e2d5a bumped Symfony version to 4.2.9 2019-05-01 15:33:38 +02:00
Fabien Potencier 203a87abd6
Merge pull request #31347 from fabpot/release-4.2.8
released v4.2.8
2019-05-01 15:31:27 +02:00
Fabien Potencier 33c23dadb2 updated VERSION for 4.2.8 2019-05-01 15:31:08 +02:00
Fabien Potencier 55a3c761e9 updated CHANGELOG for 4.2.8 2019-05-01 15:31:03 +02:00
Fabien Potencier 15e9eec225 bumped Symfony version to 3.4.28 2019-05-01 15:30:28 +02:00
Robin Chalas 2d41976b26 [Messenger] Lowercased method calls on \Redis 2019-05-01 15:13:23 +02:00
Fabien Potencier a9bb118215
Merge pull request #31345 from fabpot/release-3.4.27
released v3.4.27
2019-05-01 15:04:01 +02:00
Fabien Potencier 3d7ca2e596 updated VERSION for 3.4.27 2019-05-01 15:03:24 +02:00
Fabien Potencier 1611faf76b update CONTRIBUTORS for 3.4.27 2019-05-01 15:03:01 +02:00
Fabien Potencier e6c269e345 updated CHANGELOG for 3.4.27 2019-05-01 15:02:51 +02:00
Fabien Potencier 58d03ea0cc Merge branch '4.2'
* 4.2:
  [Translation] Fixes typo in comment
  Reword VarDumper description
2019-05-01 14:55:49 +02:00
Fabien Potencier 962b3ae504 Merge branch '3.4' into 4.2
* 3.4:
  [Translation] Fixes typo in comment
  Reword VarDumper description
2019-05-01 14:55:36 +02:00
Fabien Potencier e2881d178d minor #31339 Reword VarDumper description (greg0ire)
This PR was merged into the 3.4 branch.

Discussion
----------

Reword VarDumper description

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

It is hard to understand what "Built on top" refers to, and even when
knowing, the sentence looks weird.
![Untitled](https://user-images.githubusercontent.com/657779/57011659-15ebfe00-6c03-11e9-9b85-5c00cfc15026.png)

The description of [the Github repository](https://github.com/symfony/var-dumper) has the same issue and should be changed.

Commits
-------

6024e16ea1 Reword VarDumper description
2019-05-01 14:54:26 +02:00
Fabien Potencier cc480e4598 minor #31343 [Translation] Fixes typo in comment (jschaedl)
This PR was merged into the 3.4 branch.

Discussion
----------

[Translation] Fixes typo in comment

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

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

e11985f001 [Translation] Fixes typo in comment
2019-05-01 14:41:24 +02:00
Jan Schädlich e11985f001 [Translation] Fixes typo in comment 2019-05-01 13:10:09 +02:00
Grégoire Paris 6024e16ea1
Reword VarDumper description
It is hard to understand what "Built on top" refers to, and even when
knowing, the sentence looks weird.
2019-05-01 11:52:10 +02:00
Fabien Potencier 90326e67d5 Merge branch '4.2'
* 4.2:
  Revert "bug #30620 [FrameworkBundle][HttpFoundation] make session service resettable (dmaicher)"
  [Workflow] Fixed dumping when many transition with same name exist
  relax assertions in tests
  fix ConsoleFormatter - call to a member function format() on string
  Made `debug:container` and `debug:autowiring` ignore starting backslash in service id
  [Validator] Translate messages into Japanese
  Fix Thai translation in validators.th.xlf
  [FramworkBundle] mark any env vars found in the ide setting as used
2019-05-01 10:40:02 +02:00