Commit Graph

45315 Commits

Author SHA1 Message Date
Nicolas Grekas
92687435dc bug #34258 [HttpClient] fix support for NTLM auth (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] fix support for NTLM auth

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

A `401` with `WWW-Authenticate: NTLM [...]` is not the final response code when using `auth_ntlm`.

Commits
-------

370c4379a5 [HttpClient] fix support for NTLM auth
2019-11-06 14:55:28 +01:00
Nicolas Grekas
370c4379a5 [HttpClient] fix support for NTLM auth 2019-11-06 14:41:42 +01:00
Nicolas Grekas
62bf1f5002 bug #34255 [HttpClient] fix after merge from 4.3 (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] fix after merge from 4.3

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

Commits
-------

3c6dc96ab4 [HttpClient] fix after merge from 4.3
2019-11-06 13:03:36 +01:00
Nicolas Grekas
3932642619 bug #34250 [VarDumper] fix tests & displaying generators (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[VarDumper] fix tests & displaying generators

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

Replaces #34248

Commits
-------

bcf43a4593 [VarDumper] fix tests & displaying generators
2019-11-06 13:03:12 +01:00
Nicolas Grekas
dac61d0667 Merge branch '4.3' into 4.4
* 4.3:
  [HttpClient] expose only gzip when doing transparent compression
  add species to inflector and inflector tests
2019-11-06 13:02:32 +01:00
Nicolas Grekas
4f04bedd00 bug #34251 [HttpClient] expose only gzip when doing transparent compression (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient] expose only gzip when doing transparent compression

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Closes #34083
| License       | MIT
| Doc PR        | -

Commits
-------

6571dddc4c [HttpClient] expose only gzip when doing transparent compression
2019-11-06 13:01:29 +01:00
Nicolas Grekas
3c6dc96ab4 [HttpClient] fix after merge from 4.3 2019-11-06 12:53:36 +01:00
Nicolas Grekas
6571dddc4c [HttpClient] expose only gzip when doing transparent compression 2019-11-06 11:21:02 +01:00
Nicolas Grekas
bcf43a4593 [VarDumper] fix tests & displaying generators 2019-11-06 10:36:47 +01:00
Nicolas Grekas
ddf9e0fa1c bug #34244 [Inflector] add support for 'species' (jeffreymoelands)
This PR was merged into the 4.3 branch.

Discussion
----------

[Inflector] add support for 'species'

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

This PR improves the inflection of the word 'species'
<!--
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):
 - Always add tests and ensure they pass.
 - Never break backward compatibility (see https://symfony.com/bc).
 - Bug fixes must be submitted against the lowest maintained branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too.)
 - Features and deprecations must be submitted against branch 4.4.
 - Legacy code removals go to the master branch.
-->

Commits
-------

cc87e40a8f add species to inflector and inflector tests
2019-11-06 09:52:55 +01:00
Maxime Steinhausser
b03b7f4ef5 [TwigBridge] Fix switch-custom changelog entry
As it doesn't really mention `switch-custom` is a css class.
2019-11-06 09:18:31 +01:00
Tobias Schultze
ba1ba971d6 minor #34245 Fix WeekType tests (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

Fix WeekType tests

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

`WeekToArrayTransformer::reverseTransform()` requires an integer + `testWeekChoices()` widget arg was forgotten.

Commits
-------

906b82eb97 Fix WeekType tests
2019-11-06 00:27:01 +01:00
Thomas Calvet
906b82eb97 Fix WeekType tests 2019-11-05 23:24:16 +01:00
Fabien Potencier
9151698d85 minor #34135 [Validator] Add the missing translations for the Hebrew ("he") locale and fix 2 typos (Tamarpe)
This PR was squashed before being merged into the 3.4 branch (closes #34135).

Discussion
----------

[Validator] Add the missing translations for the Hebrew ("he") locale and fix 2 typos

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

Ref #30166

Commits
-------

022cf67f19 [Validator] Add the missing translations for the Hebrew (\"he\") locale and fix 2 typos
2019-11-05 23:03:38 +01:00
tamar peled
022cf67f19 [Validator] Add the missing translations for the Hebrew (\"he\") locale and fix 2 typos 2019-11-05 23:03:33 +01:00
jeffreymoelands
cc87e40a8f add species to inflector and inflector tests 2019-11-05 20:58:22 +01:00
Robin Chalas
a307733751 feature #31977 Add handling for delayed message to redis transport (alexander-schranz)
This PR was merged into the 4.4 branch.

Discussion
----------

Add handling for delayed message to redis transport

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | WIP
| Fixed tickets | Fixes #31711
| License       | MIT
| Doc PR        | symfony/symfony-docs#... TODO

Still in WIP: This pull request implements delayed messages for redis transport. It will park the messages in an own sorted set and if the time comes it will push the messages to the stream to make them available for all consumers. Because of a race condition when having multiple consumers it need to be checked if not accidently a message from the future is popped by zpopmin so the add function is called and there is check if the delay is in the present/past and only then add the message to the stream.

Commits
-------

cfece10569 Add handling for delayed message to redis transport
2019-11-05 20:03:26 +01:00
Alexander Schranz
cfece10569 Add handling for delayed message to redis transport 2019-11-05 19:40:51 +01:00
Nicolas Grekas
a0cefaa103 feature #34217 [Messenger] use events consistently in worker (Tobion)
This PR was merged into the 4.4 branch.

Discussion
----------

[Messenger] use events consistently in worker

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | Fix #32560, #32614, #33843
| License       | MIT
| Doc PR        |

The worker had the three ways to handle events
1. $onHandledCallback in `run(array $options = [], callable $onHandledCallback = null)`
2. events dispatched using the event dispatcher
3. hardcoded things inside the worker

This PR refactores the messenger worker to only use event dispatching. So instead of a hardcoded `$onHandledCallback` and worker decorators, we use event listeners and we don't need a `WorkerInterface` at all. The behavior of all the options like `--memory-limit` etc remains the same.

I introduced two new events
- `WorkerStartedEvent`
- `WorkerRunningEvent`

Together with the existing `WorkerStoppedEvent` it's very symmetrical and solves the referenced issues.

Commits
-------

201f159303 [Messenger] use events consistently in worker
2019-11-05 18:28:37 +01:00
Tobias Schultze
201f159303 [Messenger] use events consistently in worker 2019-11-05 18:28:25 +01:00
Nicolas Grekas
72dd176132 feature #33065 Deprecate things that prevent \Throwable from bubbling down (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

Deprecate things that prevent \Throwable from bubbling down

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | yes (todo update CHANGELOGS & UPGRADES)
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/32605
| License       | MIT
| Doc PR        | -

~The goal of this PR is to allow `\Throwable` forwarded from the`ErrorHandler::handleException()` method (cf https://github.com/symfony/symfony/pull/33038) to bubble down in our code base without having to convert them into exceptions.~

~WIP because I'm blocked by 2 things caused by `GetResponseForExceptionEvent::getThrowable()` returning a `\Throwable` instead of an `\Exception`.~

~1. This `\Throwable` end up in `DataCollectorInterface::collect()` (cf `ProfilerListener`). So that looks impossible to support in 4.4. What can we do?~
~2. The second blocker is `ExceptionListener::duplicateRequest()`. We are not gonna rename this method to support `\Throwable` I guess. What can we do?~

Since there are blockers to do it in 4.4, let's prepare for the future and deprecate the things that block us.

Commits
-------

abef506e89 Deprecate things that prevent \Throwable from bubbling down
2019-11-05 18:24:16 +01:00
Thomas Calvet
abef506e89 Deprecate things that prevent \Throwable from bubbling down 2019-11-05 18:23:20 +01:00
Nicolas Grekas
4cd3dc8d7f Merge branch '4.3' into 4.4
* 4.3: (26 commits)
  [Console] Fix #33915, Detect dimensions using mode CON if vt100 is supported
  [HttpKernel][DataCollectorInterface] Ease compatibility
  Add tests to ensure defaultLocale is properly passed to the URL generator
  [DependencyInjection] Fix broken references in tests
  [HttpClient] Retry safe requests when then fail before the body arrives
  Avoid using of kernel after shutdown
  Simplify PHP CS Fixer configuration
  [PropertyInfo] Fixed type extraction for nullable collections of non-nullable elements
  [FrameworkBundle] [HttpKernel] fixed correct EOL and EOM month
  [Serializer] Fix property name usage for denormalization
  Name test accordingly to the tested class
  Fix MockFileSessionStorageTest::sessionDir being used after it's unset
  bumped Symfony version to 4.3.7
  updated VERSION for 4.3.6
  updated CHANGELOG for 4.3.6
  bumped Symfony version to 3.4.34
  updated VERSION for 3.4.33
  update CONTRIBUTORS for 3.4.33
  updated CHANGELOG for 3.4.33
  [HttpClient] Fix perf issue when doing thousands of requests with curl
  ...
2019-11-05 17:11:08 +01:00
Nicolas Grekas
620e8942a2 bug #34085 [Console] Detect dimensions using mode CON if vt100 is supported (rtek)
This PR was merged into the 4.3 branch.

Discussion
----------

[Console] Detect dimensions using mode CON if vt100 is supported

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

This fixes color support detection for users of Win10 + git-bash.  If vt100 support is detected, the terminal will not try to use `stty` to test for dimensions. Calling such command implicitly disables vt100 support on STDOUT.

Commits
-------

fdeceff85e [Console] Fix #33915, Detect dimensions using mode CON if vt100 is supported
2019-11-05 16:00:49 +01:00
rtek
fdeceff85e [Console] Fix #33915, Detect dimensions using mode CON if vt100 is supported 2019-11-05 16:00:28 +01:00
Nicolas Grekas
e0c7ab0700 bug #34199 [HttpClient] Retry safe requests using HTTP/1.1 when HTTP/2 fails (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient] Retry safe requests using HTTP/1.1 when HTTP/2 fails

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

cURL support of HTTP/2 is not as robust as HTTP/1.1. When doing >1k requests, the stream can break for buggy reasons. New versions of cURL are fixed already, but let's make our logic more resilient anyway, and switch to HTTP/1.1 when a *safe* request fails for send/recv reasons.

Commits
-------

9f7cd66004 [HttpClient] Retry safe requests when then fail before the body arrives
2019-11-05 15:50:06 +01:00
Nicolas Grekas
448d0d6728 Merge branch '3.4' into 4.3
* 3.4:
  [DependencyInjection] Fix broken references in tests
  Avoid using of kernel after shutdown
  Simplify PHP CS Fixer configuration
  [FrameworkBundle] [HttpKernel] fixed correct EOL and EOM month
  Fix MockFileSessionStorageTest::sessionDir being used after it's unset
  bumped Symfony version to 3.4.34
  updated VERSION for 3.4.33
  update CONTRIBUTORS for 3.4.33
  updated CHANGELOG for 3.4.33
  [Stopwatch] Fixed a bug in stopwatch event getStartTime
  [Stopwatch] Fixed bug in getDuration when counting multiple ongoing periods
  Adding some validations tags on validators.et.xlf
  add missing translation for 94 (it)
2019-11-05 15:48:09 +01:00
Nicolas Grekas
a2bccc6910 minor #33950 [FrameworkBundle] Avoid using of kernel after shutdown in KernelTestCase (alexander-schranz)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] Avoid using of kernel after shutdown in KernelTestCase

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #...
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

I had sadly something like this in my codebase:

```php
if (!static::$kernel) {
    static::bootKernel();
}
```

As the $kernel is never set again to null a old $kernel was still there. I would not only set the $container also the $kernel variable to null. ~~As this could be a BC Break I'm targeting master~~.

Commits
-------

49b58ed45e Avoid using of kernel after shutdown
2019-11-05 15:21:40 +01:00
Nicolas Grekas
d056c17286 minor #34188 [PhpUnitBridge] Also search for composer.phar in git root folder (MaPePeR)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[PhpUnitBridge] Also search for composer.phar in git root folder

| Q             | A
| ------------- | ---
| Branch?       | 4.4 for features
| Bug fix?      | kindof
| New feature?  | addition to existing feature
| Deprecations? | no
| Tickets       | Related: https://github.com/symfony/symfony/issues/26637#issuecomment-390749681
| License       | MIT

When you don't have a system `composer` installation, but a `composer.phar` in the project folder, you cannot use the `simple-phpunit` script from a subfolder of the project with e.g. `../vendor/bin/simple-phpunit`.

This change also searches for the `composer.phar` in the current git root folder if it was not found at any other places to increase the likelihood of it being found.

Commits
-------

97fd204d16 [PhpUnitBridge] Also search for composer.phar in git root folder
2019-11-05 14:50:02 +01:00
MaPePeR
97fd204d16 [PhpUnitBridge] Also search for composer.phar in git root folder 2019-11-05 14:49:56 +01:00
Nicolas Grekas
1a573c387e minor #34230 [HttpKernel][DataCollectorInterface] Ease compatibility (fancyweb)
This PR was submitted for the 3.4 branch but it was merged into the 4.3 branch instead.

Discussion
----------

[HttpKernel][DataCollectorInterface] Ease compatibility

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | https://github.com/symfony/symfony/pull/33065/files#r342109866
| License       | MIT
| Doc PR        | -

To ease data collectors being compatible from 4.3 to 5.0.

Commits
-------

761df46993 [HttpKernel][DataCollectorInterface] Ease compatibility
2019-11-05 14:42:35 +01:00
Thomas Calvet
761df46993 [HttpKernel][DataCollectorInterface] Ease compatibility 2019-11-05 14:42:27 +01:00
Nicolas Grekas
dc8bb309b5 feature #34184 [VarDumper] display the method we're in when dumping stack traces (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[VarDumper] display the method we're in when dumping stack traces

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

This PR adds the line in blue:
![image](https://user-images.githubusercontent.com/243674/68152006-131bee00-ff43-11e9-8270-1d547732a7e5.png)

Without it, we're missing some context as the method is from a trait. This allows knowing which class is actually importing and using the method.

Commits
-------

23600cc8e1 [VarDumper] display the method we're in when dumping stack traces
2019-11-05 00:35:38 +01:00
Nicolas Grekas
a56ac78269 bug #34192 [Routing] Fix URL generator instantiation (X-Coder264, HypeMC)
This PR was merged into the 4.3 branch.

Discussion
----------

[Routing] Fix URL generator instantiation

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

After merging my fix (PR https://github.com/symfony/symfony/pull/31023) from the 4.2 branch to 4.3 (which was master at the time) one code path which instantiates the url generator was missed. This new code path was added via https://github.com/symfony/symfony/pull/28865 and was missed during the merge because there was no merge conflict there as that code path didn't exist on 4.2.

So the current state on the 4.3 branch is:

- https://github.com/symfony/symfony/blob/v4.3.5/src/Symfony/Component/Routing/Router.php#L356 (default locale is properly passed to the constructor)

- https://github.com/symfony/symfony/blob/v4.3.5/src/Symfony/Component/Routing/Router.php#L372 (default locale is **NOT** properly passed to the constructor)

- https://github.com/symfony/symfony/blob/v4.3.5/src/Symfony/Component/Routing/Router.php#L378 (default locale is properly passed to the constructor)

I noticed this in my app because tests started to fail on the branch where we are upgrading our app from SF 4.2 to 4.3 due to this. This PR fixes the inconsistency (now the default locale is passed on all three places) which fixes the bug.

Commits
-------

9aa66e2f59 Add tests to ensure defaultLocale is properly passed to the URL generator
16c9bafee4 Fix URL generator instantiation
2019-11-04 21:23:21 +01:00
HypeMC
9aa66e2f59 Add tests to ensure defaultLocale is properly passed to the URL generator 2019-11-04 21:23:03 +01:00
Nicolas Grekas
9cebe4bc09 minor #34229 [DependencyInjection] Fix broken references in tests (Chi-teck)
This PR was submitted for the master branch but it was merged into the 3.4 branch instead.

Discussion
----------

[DependencyInjection] Fix broken references in tests

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  |no
| Deprications? | no
| License       | MIT

Commits
-------

bd1ead251c [DependencyInjection] Fix broken references in tests
2019-11-04 20:58:33 +01:00
Chi-teck
bd1ead251c [DependencyInjection] Fix broken references in tests 2019-11-04 20:58:26 +01:00
Nicolas Grekas
23600cc8e1 [VarDumper] display the method we're in when dumping stack traces 2019-11-04 20:39:01 +01:00
Nicolas Grekas
9f7cd66004 [HttpClient] Retry safe requests when then fail before the body arrives 2019-11-04 16:10:28 +01:00
Fabien Potencier
14080ce5b5 minor #34197 [ErrorRenderer] Show generic message in non-debug mode (yceruto)
This PR was merged into the 4.4 branch.

Discussion
----------

[ErrorRenderer] Show generic message in non-debug mode

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

I agree with @Tobion here https://github.com/symfony/symfony/pull/34158#issuecomment-548181099, so let's always show the detail message, but for 5xx errors we'll send a generic message instead.

/cc @dunglas wdyt?

Commits
-------

45f1a5ee06 Show generic message in non-debug mode
2019-11-04 13:48:39 +01:00
Fabien Potencier
e4c661901e feature #33732 [Console] Rename some methods related to redraw frequency (javiereguiluz)
This PR was squashed before being merged into the 4.4 branch (closes #33732).

Discussion
----------

[Console] Rename some methods related to redraw frequency

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

In #26339 we added `preventRedrawFasterThan()` and `forceRedrawSlowerThan()`. While merging the docs for them (https://github.com/symfony/symfony-docs/pull/12364) I thought that the method names are a bit hard to understand.

In this PR I propose a renaming for your consideration. Thanks!

In the following example, we want to update the progress bar every 100 iterations, but not faster than 100ms or slower than 200ms.

**Before**

```php
$progressBar = new ProgressBar($output, 50000);
$progressBar->start();

$progressBar->setRedrawFrequency(100);
$progressBar->preventRedrawFasterThan(0.1);
$progressBar->forceRedrawSlowerThan(0.2);
```

**After**

```php
$progressBar = new ProgressBar($output, 50000);
$progressBar->start();

$progressBar->setRedrawFrequency(100);
$progressBar->maxRefreshInterval(0.1);
$progressBar->minRefreshInterval(0.2);
```

Commits
-------

e6ee7b07f3 [Console] Rename some methods related to redraw frequency
2019-11-04 13:46:19 +01:00
Javier Eguiluz
e6ee7b07f3 [Console] Rename some methods related to redraw frequency 2019-11-04 13:46:13 +01:00
Nicolas Grekas
13dd18c8a6 feature #31587 [Routing][Config] Allow patterns of resources to be excluded from config loading (tristanbes)
This PR was merged into the 4.4 branch.

Discussion
----------

[Routing][Config] Allow patterns of resources to be excluded from config loading

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

The PR will fix the following RFC: #31516

Like resource loading for services, this PR offers a way to exclude patterns of resources like:

```yml
// config/routes/annotations.yaml
controllers:
    resource: ../../src/Controller/*
    type: annotation
    exclude: '../src/Controller/{DebugEmailController}.php'
```

All the annotation routes inside `Controller/` will be loaded in this example except all the one present inside the `Controller/DebugEmailController.php`

Commits
-------

332ff8811c [Routing][Config] Allow patterns of resources to be excluded from config loading
2019-11-04 11:53:20 +01:00
Nicolas Grekas
29fd51f272 feature #32256 [DI] Add compiler pass and command to check that services wiring matches type declarations (alcalyn, GuilhemN, nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[DI] Add compiler pass and command to check that services wiring matches type declarations

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

PR replacing https://github.com/symfony/symfony/pull/27825.

It adds a `lint:container` command asserting the type hints used in your code are correct.

Commits
-------

8230a1543e Make it really work on real apps
4b3e9d4c96 Fix comments, improve the feature
a6292b917b [DI] Add compiler pass to check arguments type hint
2019-11-04 11:27:29 +01:00
Fabien Potencier
e057a9c89f bug #34134 [Messenger] fix retry of messages losing the routing key and properties (Tobion)
This PR was merged into the 4.3 branch.

Discussion
----------

[Messenger] fix retry of messages losing the routing key and properties

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | Fix #32994 <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        |

Messages sent for retry in rabbitmq lost the routing key and properties like the priority. Now we read those original properties and sent the retry message with the same properties (unless those properties have already been set manually before).

Commits
-------

75c674debc [Messenger] fix retry of messages losing the routing key and properties
2019-11-04 07:59:16 +01:00
Fabien Potencier
ee0988cb06 minor #34227 Simplify PHP CS Fixer configuration (keradus)
This PR was merged into the 3.4 branch.

Discussion
----------

Simplify PHP CS Fixer configuration

Possible after updating PHP CS Fixer on fabbot.io to 2.16

Commits
-------

0b0e5b50d5 Simplify PHP CS Fixer configuration
2019-11-03 20:59:03 +01:00
Alexander Schranz
49b58ed45e Avoid using of kernel after shutdown 2019-11-03 20:32:26 +01:00
Fabien Potencier
0af10ccd0d minor #34160 Adding some validations tags on validators.et.xlf (glodzienski)
This PR was merged into the 3.4 branch.

Discussion
----------

Adding some validations tags on validators.et.xlf

| Q             | A
| ------------- | ---
| Branch?       | 4.4 for features / 3.4 or 4.3 for bug fixes <!-- see below -->
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | https://github.com/symfony/symfony/issues/30160
| License       | MIT

I saw an issue in the **Issues Page** and i want to help to improve the repository, even with a simple modification

Commits
-------

16bd71b5b1 Adding some validations tags on validators.et.xlf
2019-11-03 18:41:53 +01:00
Fabien Potencier
78bdf1a307 minor #34153 [Validator] add missing translation for 94 (it) (garak)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] add missing translation for 94 (it)

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

Italian translation for validator is missing last item (id 94)

Commits
-------

1dc7ce1159 add missing translation for 94 (it)
2019-11-03 18:21:08 +01:00
Fabien Potencier
9162892fd4 bug #34181 [Stopwatch] Fixed bug in getDuration when counting multiple ongoing periods (TimoBakx)
This PR was merged into the 3.4 branch.

Discussion
----------

[Stopwatch] Fixed bug in getDuration when counting multiple ongoing periods

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

When running multiple periods in StopwatchEvent (start multiple times and not stop them all), the getDuration() method would return unexpected values.

This was because at every stop, the last entry in the `started` array was removed, while the `getDuration` method was still expecting all the started events to still be there.

Now, when calling `getDuration`, the duration of all the finished periods are added together with the unfinished counts.

Commits
-------

af00d8deab [Stopwatch] Fixed bug in getDuration when counting multiple ongoing periods
2019-11-03 18:17:59 +01:00