Commit Graph

44568 Commits

Author SHA1 Message Date
Alexander M. Turek
6493902287 Add types to constructors and private/final/internal methods (Batch III) 2019-10-07 13:33:25 +02:00
Christian Flothmann
001777ac07 minor #33757 [FrameworkBundle] conflict with VarDumper < 4.4 (dmaicher)
This PR was merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle] conflict with VarDumper < 4.4

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

While trying FrameworkBundle 4.4.x-dev I noticed that I was still using VarDumper 4.3 which leads to this error:

```
> app/console cache:clear

Fatal error: Uncaught Symfony\Component\ErrorHandler\Exception\ClassNotFoundException: Attempted to load class "ContextualizedDumper" from namespace "Symfony\Component\VarDumper\Dumper".
Did you forget a "use" statement for another namespace? in /var/www/x/symfony/app/cache/dev/ContainerB7mbdCh/getDebug_DumpListenerService.php:13
Stack trace:
#0 /var/www/x/symfony/app/cache/dev/ContainerB7mbdCh/appAppKernelDevDebugContainer.php(1357): require()
#1 /var/www/x/symfony/app/cache/dev/ContainerB7mbdCh/appAppKernelDevDebugContainer.php(2282): ContainerB7mbdCh\appAppKernelDevDebugContainer->load('getDebug_DumpLi...')
#2 /var/www/x/symfony/vendor/symfony/event-dispatcher/EventDispatcher.php(275): ContainerB7mbdCh\appAppKernelDevDebugContainer->ContainerB7mbdCh\{closure}()
#3 /var/www/x/symfony/vendor/symfony/event-dispatcher/EventDispatcher.php(90): Symfony\Component\EventDispatcher\EventDispatcher->sortListeners('console.command')
#4 /var/www/x in /var/www/x/symfony/app/cache/dev/ContainerB7mbdCh/getDebug_DumpListenerService.php on line 13
PHP Fatal error:  Uncaught Symfony\Component\ErrorHandler\Exception\ClassNotFoundException: Attempted to load class "ContextualizedDumper" from namespace "Symfony\Component\VarDumper\Dumper".
Did you forget a "use" statement for another namespace? in /var/www/x/symfony/app/cache/dev/ContainerB7mbdCh/getDebug_DumpListenerService.php:13
Stack trace:
#0 /var/www/x/symfony/app/cache/dev/ContainerB7mbdCh/appAppKernelDevDebugContainer.php(1357): require()
#1 /var/www/x/symfony/app/cache/dev/ContainerB7mbdCh/appAppKernelDevDebugContainer.php(2282): ContainerB7mbdCh\appAppKernelDevDebugContainer->load('getDebug_DumpLi...')
#2 /var/www/x/symfony/vendor/symfony/event-dispatcher/EventDispatcher.php(275): ContainerB7mbdCh\appAppKernelDevDebugContainer->ContainerB7mbdCh\{closure}()
#3 /var/www/x/symfony/vendor/symfony/event-dispatcher/EventDispatcher.php(90): Symfony\Component\EventDispatcher\EventDispatcher->sortListeners('console.command')
#4 /var/www/x in /var/www/x/symfony/app/cache/dev/ContainerB7mbdCh/getDebug_DumpListenerService.php on line 13
Script app/console cache:clear handling the post-update-cmd event returned with error code 255
```
So we need to use `symfony/var-dumper >= 4.4`

Commits
-------

9b512c6d5d [FrameworkBundle] conflict with VarDumper < 4.4
2019-09-30 15:16:52 +02:00
David Maicher
9b512c6d5d [FrameworkBundle] conflict with VarDumper < 4.4 2019-09-30 13:00:46 +02:00
Nicolas Grekas
2b71c6f221 bug #33752 [4.4] Fix some leftovers (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[4.4] Fix some leftovers

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

Found while running console commands with the Symfony Demo.

Commits
-------

b416c12d29 [4.4] Fix some leftovers
2019-09-30 12:04:15 +02:00
Nicolas Grekas
b416c12d29 [4.4] Fix some leftovers 2019-09-30 11:07:05 +02:00
Nicolas Grekas
5440d671ca feature #31446 [VarDumper] Output the location of calls to dump() (ktherage)
This PR was merged into the 4.4 branch.

Discussion
----------

[VarDumper] Output the location of calls to dump()

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

see #30830

Commits
-------

f0a59d3eab [VarDumper] Output the location of calls to dump()
2019-09-28 18:21:11 +02:00
THERAGE Kévin
f0a59d3eab [VarDumper] Output the location of calls to dump() 2019-09-28 18:20:13 +02:00
Nicolas Grekas
55843f2de6 Merge branch '4.3' into 4.4
* 4.3:
  sync phpunit script with master
  [HttpFoundation] allow additinal characters in not raw cookies
2019-09-28 18:13:05 +02:00
Nicolas Grekas
d8a026bcad Merge branch '3.4' into 4.3
* 3.4:
  sync phpunit script with master
2019-09-28 18:12:55 +02:00
Nicolas Grekas
fda5b20c39 sync phpunit script with master 2019-09-28 18:12:11 +02:00
Nicolas Grekas
241e2f7fb7 Merge branch '3.4' into 4.3
* 3.4:
  [HttpFoundation] allow additinal characters in not raw cookies
2019-09-28 17:12:15 +02:00
Nicolas Grekas
ca253960d8 bug #33646 [HttpFoundation] allow additinal characters in not raw cookies (marie)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpFoundation] allow additinal characters in not raw cookies

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| Tickets       | Fix #33619
| License     | MIT

> **Description**
> When creating a non-raw Cookie, it is impossible to provide a name that contains characters matching the regex class [=,; \t\r\n\013\014]

**Solution**: Check with this regex only raw cookie

Commits
-------

4db1402770 [HttpFoundation] allow additinal characters in not raw cookies
2019-09-28 17:10:09 +02:00
marie
4db1402770 [HttpFoundation] allow additinal characters in not raw cookies 2019-09-28 17:09:56 +02:00
Robin Chalas
e627989089 feature #33412 [Console] Do not leak hidden console commands (m-vo)
This PR was merged into the 4.4 branch.

Discussion
----------

[Console] Do not leak hidden console commands

| Q             | A
| ------------- | ---
| Branch?       | 4.4 (updated)
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #33398
| License       | MIT

This PR attempts to fix hidden console commands to be leaked when interacting with the console.

These are the changes:
* Hidden commands won't be shown anymore in the list of commands in a namespace as well as the list of  suggestions ("Did you mean...") for invalid or ambiguous commands.
* Hidden commands therefore now need to be always entered with their full name.
* If an abbreviated command is entered that was previously ambiguous with (only) hidden commands, it's now executed directly (not ambiguous anymore).

Side note: When implementing the tests & changes I realized that `Application->get()` isn't side effect free (when redirecting to the help command) and behaves differently when called multiple times. It therefore must not be used from inside `find()`. Maybe we should change this? Here are the relevant bits:
f71f74b36a/src/Symfony/Component/Console/Application.php (L495-L502)

Commits
-------

f3406338e6 [Console] Deprecate abbreviating hidden command names using  Application->find()
2019-09-28 17:03:31 +02:00
M. Vondano
f3406338e6 [Console] Deprecate abbreviating hidden command names using Application->find() 2019-09-28 17:00:54 +02:00
Nicolas Grekas
399e0fb06f Merge branch '4.3' into 4.4
* 4.3:
  Do not include hidden commands in suggested alternatives
  [DependencyInjection] Fix wrong exception when service is synthetic
2019-09-28 16:56:00 +02:00
Nicolas Grekas
8033fc5a1d Merge branch '3.4' into 4.3
* 3.4:
  Do not include hidden commands in suggested alternatives
  [DependencyInjection] Fix wrong exception when service is synthetic
2019-09-28 16:55:46 +02:00
Nicolas Grekas
944cda7969 bug #33748 [Console] Do not include hidden commands in suggested alternatives (m-vo)
This PR was merged into the 3.4 branch.

Discussion
----------

[Console] Do not include hidden commands in suggested alternatives

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

Partially backports #33412 on 3.4, avoids leaking the names of hidden commands in suggested alternatives on command not found.

Commits
-------

8a9d173c36 Do not include hidden commands in suggested alternatives
2019-09-28 16:54:55 +02:00
M. Vondano
8a9d173c36 Do not include hidden commands in suggested alternatives 2019-09-28 16:39:43 +02:00
Fabien Potencier
ae61ae5104 minor #31710 [DX][Messenger] Improve error message when routing to an invalid transport (Koc)
This PR was merged into the 4.4 branch.

Discussion
----------

[DX][Messenger] Improve error message when routing to an invalid transport

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

Commits
-------

7909092891 [Messenger] Improve error message when routing to an invalid transport (closes #31613)
2019-09-28 09:18:11 +02:00
Robin Chalas
6fef3fb83c feature #33676 [Security] add "anonymous: lazy" mode to firewalls (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[Security] add "anonymous: lazy" mode to firewalls

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | Fixes #26769 et al.
| License       | MIT
| Doc PR        | -

Contains #33663 until it is merged.

This PR allows defining a firewall as such:
```yaml
security:
    firewalls:
        main:
            anonymous: lazy
```

This means that the corresponding area should not start the session / load the user unless the application actively gets access to it. On pages that don't fetch the user at all, this means the session is not started, which means the corresponding token neither is. Lazily, when the user is accessed, e.g. via a call to `is_granted()`, the user is loaded, starting the session if needed.

See #27817 for previous explanations on the topic also.

Note that thanks to the logic in #33633, this PR doesn't have the drawback spotted in #27817: here, the profiler works as expected.

Recipe update pending at https://github.com/symfony/recipes/pull/649

Commits
-------

5cd1d7b4cc [Security] add "anonymous: lazy" mode to firewalls
2019-09-28 01:05:16 +02:00
Konstantin Myakshin
7909092891 [Messenger] Improve error message when routing to an invalid transport (closes #31613) 2019-09-28 01:24:27 +03:00
Nicolas Grekas
f5d3d5fe17 cs fix bis 2019-09-27 19:11:11 +02:00
Nicolas Grekas
7a3a664ea0 cs fix 2019-09-27 19:09:14 +02:00
Nicolas Grekas
7d6b6571aa feature #32440 [DomCrawler] add a normalizeWhitespace argument to text() method (Simperfit)
This PR was merged into the 4.4 branch.

Discussion
----------

[DomCrawler] add a normalizeWhitespace argument to text() method

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

<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/roadmap):
 - Bug fixes must be submitted against the lowest maintained branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too).
 - Features and deprecations must be submitted against branch 4.4.
 - Legacy code removals go to the master branch.
-->

I've taken #24412, rebased with 4.4, fixed the comments in the PR.

cc @xabbuh @stof @nicolas-grekas

Commits
-------

1746718553 [DomCrawler] add a value() method, normalize whitespaces
2019-09-27 19:07:24 +02:00
Amrouche Hamza
1746718553 [DomCrawler] add a value() method, normalize whitespaces 2019-09-27 19:06:53 +02:00
Nicolas Grekas
293a22a433 bug #33625 [DependencyInjection] Fix wrong exception when service is synthetic (k0d3r1s)
This PR was squashed before being merged into the 3.4 branch (closes #33625).

Discussion
----------

[DependencyInjection] Fix wrong exception when service is synthetic

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

This fixes wrongfully thrown exception when service is defined as synthetic and some arguments are binded in _defaults

Commits
-------

152dec95bc [DependencyInjection] Fix wrong exception when service is synthetic
2019-09-27 17:48:09 +02:00
k0d3r1s
152dec95bc [DependencyInjection] Fix wrong exception when service is synthetic 2019-09-27 17:47:48 +02:00
Nicolas Grekas
50da16bb6e Merge branch '4.3' into 4.4
* 4.3:
  fix merge (bis)
  fix merge
2019-09-27 16:40:26 +02:00
Nicolas Grekas
fbfdebc487 fix merge (bis) 2019-09-27 16:39:13 +02:00
Nicolas Grekas
d4d81be289 fix merge 2019-09-27 16:37:39 +02:00
Nicolas Grekas
4acef47abb Merge branch '4.3' into 4.4
* 4.3:
  [Form][Validator][Intl] Fix tests
  [Messenger] return empty envelopes when RetryableException occurs
  [Validator] Accept underscores in the URL validator as the URL will resolve correctly
  [Translation] Collect original locale in case of fallback translation
  Fix toolbar load when GET params are present in "_wdt" route
2019-09-27 16:21:43 +02:00
Nicolas Grekas
7bb421bd45 Merge branch '3.4' into 4.3
* 3.4:
  [Form][Validator][Intl] Fix tests
  [Validator] Accept underscores in the URL validator as the URL will resolve correctly
  [Translation] Collect original locale in case of fallback translation
  Fix toolbar load when GET params are present in "_wdt" route
2019-09-27 16:21:32 +02:00
Nicolas Grekas
82a62d2bd6 minor #33739 [Form][Validator][Intl] Fix tests (ro0NL)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form][Validator][Intl] Fix tests

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix https://github.com/symfony/symfony/pull/33148#issuecomment-535929906
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->
<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/roadmap):
 - 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
-------

e648a91259 [Form][Validator][Intl] Fix tests
2019-09-27 16:04:35 +02:00
Roland Franssen
e648a91259 [Form][Validator][Intl] Fix tests 2019-09-27 16:00:26 +02:00
Tobias Schultze
abf11d8ba8 bug #32979 [Messenger] return empty envelopes when RetryableException occurs (surikman)
This PR was squashed before being merged into the 4.3 branch (closes #32979).

Discussion
----------

[Messenger] return empty envelopes when RetryableException occurs

| Q             | A
| ------------- | ---
| Branch?       |  3.4 or 4.3 for bug fixes <!-- see below -->
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| License       | MIT
| ~~Doc PR~~ | ~~symfony/symfony-docs#12109~~

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

Problem occurs when you are using more than 1 worker with Doctrine Transport.

`Symfony\Component\Messenger\Transport\Doctrine\Connection::get` does a query `SELECT ... FOR UPDATE` and this locking query could lock table and workers stops. But using locks can result in dead locks or lock timeouts. Doctrine renders these SQL errors as RetryableExceptions. These exceptions are often normal if you are in a high concurrency environment. They can happen very often and your application should handle them properly.

Commits
-------

9add32a9ca [Messenger] return empty envelopes when RetryableException occurs
2019-09-27 13:21:51 +02:00
SuRiKmAn
9add32a9ca [Messenger] return empty envelopes when RetryableException occurs 2019-09-27 13:21:34 +02:00
Fabien Potencier
161975d17e feature #33148 [Intl] Excludes locale from language codes (split localized language names) (ro0NL)
This PR was merged into the 4.4 branch.

Discussion
----------

[Intl] Excludes locale from language codes (split localized language names)

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

(includes #33140)

Commits
-------

1a9f517903 [Intl] Excludes locale from language codes (split localized language names)
2019-09-27 12:16:57 +02:00
Fabien Potencier
979be2958d feature #31202 [FrameworkBundle] WebTestCase KernelBrowser::getContainer null return type (Simperfit)
This PR was merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle] WebTestCase KernelBrowser::getContainer null return type

| Q             | A
| ------------- | ---
| Branch?       | 4.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? | yes <!-- 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 | #25920  <!-- #-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.
-->

As @stof suggested in the #25920 I started deprecating the behaviour of returning null when the container is non booted / null.

If this is not wanted we should close both the PR and the issue ;).

Commits
-------

e169e1a4d5 [FrameworkBundle] WebTestCase KernelBrowser::getContainer null return type
2019-09-27 12:15:03 +02:00
Roland Franssen
1a9f517903 [Intl] Excludes locale from language codes (split localized language names) 2019-09-27 12:13:42 +02:00
Fabien Potencier
86d7efad2b bug #33734 [Intl] Fix compile type errors (ro0NL)
This PR was merged into the 4.4 branch.

Discussion
----------

[Intl] Fix compile type errors

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #... <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

Fixes e.g. `TypeError: Return value of Symfony\Component\Intl\Data\Generator\LanguageDataGenerator::generateDataForRoot() must be of the type array or null, none returned`

Adding typehints in `FallbackTrait` seems forgotten, now added as all generator stuff is `@internal` anyway ran on latest PHP.

Commits
-------

96fae635be [Intl] Fix compile type errors
2019-09-27 12:10:33 +02:00
Amrouche Hamza
e169e1a4d5 [FrameworkBundle] WebTestCase KernelBrowser::getContainer null return type 2019-09-27 12:05:31 +02:00
Roland Franssen
96fae635be [Intl] Fix compile type errors 2019-09-27 11:54:15 +02:00
Fabien Potencier
ad89564ebf bug #32522 [Validator] Accept underscores in the URL validator, as the URL will load (battye)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] Accept underscores in the URL validator, as the URL will load

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

As @javiereguiluz mentioned, regardless of convention a URL with an underscore in it will load perfectly fine - so in that respect it must be valid.

Commits
-------

c9c7a1118c [Validator] Accept underscores in the URL validator as the URL will resolve correctly
2019-09-27 09:08:14 +02:00
battye
c9c7a1118c [Validator] Accept underscores in the URL validator as the URL will resolve correctly 2019-09-27 08:53:48 +02:00
Fabien Potencier
b8294398cc feature #33038 [ErrorHandler] Forward \Throwable (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

[ErrorHandler] Forward \Throwable

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

The goal of this PR is that `ErrorHandler::handleException()` handles `\Throwable` directly and forwards it  without altering it.

Commits
-------

62483ed305 [ErrorHandler] Forward \Throwable
2019-09-27 08:24:06 +02:00
Fabien Potencier
8dc0814e79 bug #32437 Fix toolbar load when GET params are present in "_wdt" route (Molkobain)
This PR was merged into the 3.4 branch.

Discussion
----------

Fix toolbar load when GET params are present in "_wdt" route

When using a custom router that inject GET parameters, eg:

```
# services.yaml
parameters:
    # Replace default url generator service
    router.options.generator_base_class: Combodo\iTop\Portal\Routing\UrlGenerator
```

The path generated by the toolbar JS is HTML entity encoded which breaks the JS call (`&` becomes `&amp;`).

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

<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/roadmap):
 - Bug fixes must be submitted against the lowest maintained branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too).
 - Features and deprecations must be submitted against branch 4.4.
 - Legacy code removals go to the master branch.
-->

Commits
-------

5309e64949 Fix toolbar load when GET params are present in "_wdt" route
2019-09-27 08:10:02 +02:00
Fabien Potencier
650f179c2f bug #32925 [Translation] Collect original locale in case of fallback translation (digilist)
This PR was squashed before being merged into the 3.4 branch (closes #32925).

Discussion
----------

[Translation] Collect original locale in case of fallback translation

Before, it collected the fallback locale that was used to translate a key. But this information is confusing, as it does not reveal which translation key is missing in the requested language.

So I'd like to propose to track the "requested" locale instead, so that the Symfony profiler gives me the information in which locale the key is missing instead of which locale was used as a fallback.

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

In principle, this change is a BC break, but imho also a bug. It's really confusing when the Profiler tells you that it uses a translation fallback for an ID and locale that is actually translated. Took some debugging so recognize that this fallback came from another locale. If you think it's better to target 5.0, I'll update the PR.

Commits
-------

5564e149cb [Translation] Collect original locale in case of fallback translation
2019-09-27 07:57:25 +02:00
Markus Fasselt
5564e149cb [Translation] Collect original locale in case of fallback translation 2019-09-27 07:57:18 +02:00
Fabien Potencier
b1f6d0dbce minor #33519 Add types to constructors and private/final/internal methods (Batch I) (derrabus)
This PR was squashed before being merged into the 4.4 branch (closes #33519).

Discussion
----------

Add types to constructors and private/final/internal methods (Batch I)

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

As promised, now a larger batch with the following components:
* Asset
* BrowserKit
* Config
* Console
* ~~CssSelector~~
* Debug
* ~~DomCrawler~~
* DotEnv
* ErrorHandler
* ErrorRenderer
* ExpressionLanguage
* ~~Filesystem~~
* ~~Finder~~

Commits
-------

4039b95d22 Add types to constructors and private/final/internal methods (Batch I)
2019-09-27 07:43:13 +02:00