Commit Graph

44111 Commits

Author SHA1 Message Date
Toni Rudolf
c2bdc4c4d3 [Messenger] Added check if json_encode succeeded 2020-01-07 20:21:19 +01:00
Nicolas Grekas
f3d8fd2521 bug #35120 [HttpClient] fix scheduling pending NativeResponse (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient] fix scheduling pending NativeResponse

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

There must be one pending list per `ResponseStream` instance.
Currently, we start unrelated responses and this can lead to broken iterators when the unrelated response throws because it is a 3/4/5xx.

Commits
-------

a90a6c9c48 [HttpClient] fix scheduling pending NativeResponse
2019-12-28 15:54:06 +01:00
Nicolas Grekas
b6403d88c2 bug #35117 [Cache] do not overwrite variable value (xabbuh)
This PR was merged into the 4.3 branch.

Discussion
----------

[Cache] do not overwrite variable value

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

Commits
-------

e379dbbf21 do not overwrite variable value
2019-12-28 15:53:10 +01:00
Nicolas Grekas
9876de2a28 bug #35113 [VarDumper] Fix "Undefined index: argv" when using CliContextProvider (xepozz)
This PR was submitted for the master branch but it was merged into the 4.3 branch instead.

Discussion
----------

[VarDumper] Fix "Undefined index: argv" when using CliContextProvider

| Q             | A
| ------------- | ---
| Branch?       | 4.1, 4.2, 4.3, 4.4 or 5.0<!-- see below -->
| 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 #35084
| License       | MIT
<!--
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 master.
-->

Commits
-------

340bb145d9 Fixed #35084
2019-12-28 15:52:21 +01:00
Dmitriy Derepko
340bb145d9 Fixed #35084 2019-12-28 15:52:14 +01:00
Nicolas Grekas
af4f99f52b Merge branch '3.4' into 4.3
* 3.4:
  Add missing use statement
  [Profiler] wording
  X-Accel Nginx URL updated
  ticket-30197 [Validator] Add the missing translations for the Chinese (Taiwan) ("zh_TW") locale
  Fixed test added in #35022
  Use locale_parse for computing fallback locales
  [Console] Fix filtering out identical alternatives when there is a command loader
2019-12-28 15:48:01 +01:00
Nicolas Grekas
7aba9cf753 minor #35122 [Translation] Add missing use statement (odolbeau)
This PR was merged into the 3.4 branch.

Discussion
----------

[Translation] Add missing use statement

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

Add missing use for `Data` class used in PHPDoc
https://github.com/symfony/symfony/blob/3.4/src/Symfony/Component/Translation/DataCollector/TranslationDataCollector.php#L64

Commits
-------

6fd266dba6 Add missing use statement
2019-12-28 14:49:39 +01:00
Olivier Dolbeau
6fd266dba6 Add missing use statement 2019-12-27 12:18:21 +01:00
Nicolas Grekas
a90a6c9c48 [HttpClient] fix scheduling pending NativeResponse 2019-12-27 12:01:41 +01:00
Christian Flothmann
e379dbbf21 do not overwrite variable value 2019-12-27 10:03:19 +01:00
Fabien Potencier
cee47cec05 bug #35103 [Translation] Use locale_parse for computing fallback locales (alanpoulain)
This PR was merged into the 3.4 branch.

Discussion
----------

[Translation] Use `locale_parse` for computing fallback locales

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

As done in this PR https://github.com/symfony/symfony/pull/24157 for the `Intl` component, the `Translation` component should use `locale_parse` as well when available.

It will allow to manage [BCP 47](https://tools.ietf.org/html/bcp47) locales, which is why it is considered a bugfix ([locale_set_default](https://www.php.net/manual/en/locale.setdefault.php) is using BCP 47 compliant locale).

As done with the forementioned PR, there is also a fallback to make it work with `-`.

Sadly, I think it will create some conflicts when merging it upstream since the modified code has changed little by little.

Commits
-------

3657c0e664 Use locale_parse for computing fallback locales
2019-12-27 09:11:50 +01:00
Fabien Potencier
be40f32798 minor #35016 [Profiler] wording (noniagriconomie)
This PR was submitted for the master branch but it was merged into the 3.4 branch instead (closes #35016).

Discussion
----------

[Profiler] wording

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

Small wording improvement

Commits
-------

e7c9a28a03 [Profiler] wording
2019-12-27 08:51:10 +01:00
noniagriconomie
e7c9a28a03 [Profiler] wording 2019-12-27 08:51:03 +01:00
Nicolas Grekas
8855082ffd minor #35106 Use spaces correctly to display options in DebugCommand (ruudk)
This PR was submitted for the master branch but it was merged into the 4.3 branch instead.

Discussion
----------

Use spaces correctly to display options in DebugCommand

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

Messenger ships with a DebugCommand. It doesn't properly place spaces for every option.

```diff
- handled by Symfony\Component\Messenger\Tests\Fixtures\DummyCommandHandler (when option1=1,  option2=2)
+ handled by Symfony\Component\Messenger\Tests\Fixtures\DummyCommandHandler (when option1=1, option2=2)
```

Commits
-------

1c92e9e2f1 Use spaces correctly to display options in DebugCommand
2019-12-26 09:30:00 +01:00
Ruud Kamphuis
1c92e9e2f1 Use spaces correctly to display options in DebugCommand 2019-12-26 09:29:54 +01:00
Nicolas Grekas
d6a3138a40 minor #35075 X-Accel Nginx URL updated (shahariaazam)
This PR was submitted for the master branch but it was merged into the 3.4 branch instead.

Discussion
----------

X-Accel Nginx URL updated

Obsolete URL has been updated

Commits
-------

4557221597 X-Accel Nginx URL updated
2019-12-26 09:05:47 +01:00
Shaharia Azam
4557221597 X-Accel Nginx URL updated
Obsolete URL has been updated
2019-12-26 09:05:33 +01:00
Nicolas Grekas
0102ff42b6 minor #35064 [Validator] Add the missing translations for the Chinese (Taiwan) ("zh_TW") locale (Islam93)
This PR was submitted for the master branch but it was merged into the 3.4 branch instead.

Discussion
----------

[Validator] Add the missing translations for the Chinese (Taiwan) ("zh_TW") locale

… (Taiwan) ("zh_TW") locale

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

Hi
This is my first PR to the Symfony project
I saw this issue in issues list with "good first issue" mark and decided to try
I am not a native speaker of Chinese, but I ordered a translation at a translation agency. Hope it should be better than by google translator

Commits
-------

36f07b7e09 ticket-30197 [Validator] Add the missing translations for the Chinese (Taiwan) ("zh_TW") locale
2019-12-26 09:01:29 +01:00
Islam93
36f07b7e09 ticket-30197 [Validator] Add the missing translations for the Chinese (Taiwan) ("zh_TW") locale 2019-12-26 09:01:24 +01:00
Nicolas Grekas
412fcf5463 minor #35056 Fixed test added in #35022 (GrahamCampbell)
This PR was merged into the 3.4 branch.

Discussion
----------

Fixed test added in #35022

| Q             | A
| ------------- | ---
| Branch?       | master for features / 3.4, 4.3, 4.4 or 5.0 for bug fixes <!-- see below -->
| Bug fix?      | yes/no
| New feature?  | yes/no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | yes/no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | Fix #... <!-- prefix each issue number with "Fix #", 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):
 - 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 master.
-->

Commits
-------

6eeec7c270 Fixed test added in #35022
2019-12-26 08:58:50 +01:00
Graham Campbell
6eeec7c270 Fixed test added in #35022 2019-12-26 08:58:28 +01:00
Robin Chalas
1908434f72 bug #35094 [Console] Fix filtering out identical alternatives when there is a command loader (fancyweb)
This PR was merged into the 3.4 branch.

Discussion
----------

[Console] Fix filtering out identical alternatives when there is a command loader

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | https://github.com/symfony/symfony/issues/35089
| License       | MIT
| Doc PR        | -

CommandLoader commands needs to be loaded to resolve their names and filter them.

Commits
-------

589e93e3b7 [Console] Fix filtering out identical alternatives when there is a command loader
2019-12-24 21:01:36 +01:00
Alan Poulain
3657c0e664
Use locale_parse for computing fallback locales 2019-12-24 19:50:33 +01:00
Thomas Calvet
589e93e3b7 [Console] Fix filtering out identical alternatives when there is a command loader 2019-12-24 12:07:31 +01:00
Nicolas Grekas
dfa118f253 Merge branch '3.4' into 4.3
* 3.4:
  [ProxyManager] fix generating proxies for root-namespaced classes
  [DI] skip looking for config class when the extension class is anonymous
  Fix typo
  [Dotenv] FIX missing getenv
2019-12-19 16:57:24 +01:00
Nicolas Grekas
135c6f7d9d bug #35039 [DI] skip looking for config class when the extension class is anonymous (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] skip looking for config class when the extension class is anonymous

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

Commits
-------

1c7eda4649 [DI] skip looking for config class when the extension class is anonymous
2019-12-19 16:52:25 +01:00
Nicolas Grekas
939d3bf1f3 bug #35049 [ProxyManager] fix generating proxies for root-namespaced classes (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[ProxyManager] fix generating proxies for root-namespaced classes

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

Commits
-------

a47ae10a9d [ProxyManager] fix generating proxies for root-namespaced classes
2019-12-19 16:51:02 +01:00
Nicolas Grekas
a47ae10a9d [ProxyManager] fix generating proxies for root-namespaced classes 2019-12-19 15:39:15 +01:00
Nicolas Grekas
1c7eda4649 [DI] skip looking for config class when the extension class is anonymous 2019-12-19 11:27:02 +01:00
Nicolas Grekas
f11a282e42 minor #35036 [HttpFoundation] Remove obsolete reference (fabpot)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpFoundation] Remove obsolete reference

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

Commits
-------

5e9fa9d75e Fix typo
2019-12-19 10:53:30 +01:00
Fabien Potencier
5e9fa9d75e Fix typo 2019-12-19 10:48:27 +01:00
Nicolas Grekas
b38aad5a39 bug #35022 [Dotenv] FIX missing getenv (mccullagh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Dotenv] FIX missing getenv

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

Revert one line to use getenv because not all environment variables are populated in $_ENV[]

Commits
-------

9c5754acaa [Dotenv] FIX missing getenv
2019-12-18 22:43:02 +01:00
Nicolas Grekas
4d064a2584 bug #35025 [HttpClient][Psr18Client] Remove Psr18ExceptionTrait (fancyweb)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient][Psr18Client] Remove Psr18ExceptionTrait

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

Interesting case. Declared trait are instantly loaded by PHP. When ClassExistenceResource fails to load this class because of a thrown \LogicException (when a dependency is missing, cf the top of this class) the trait is loaded. Then, to display the exception, this class is reaccessed (I guess by the duplicated request 🤔) and it results in a fatal error "Cannot redeclare trait...". Basically ClassExistenceResource does not support this kind of structure (thrown exception + trait). Let's do the easy fix first, and then revert if someone finds a fix for the root problem?

Commits
-------

c1746d8b14 [HttpClient][Psr18Client] Remove Psr18ExceptionTrait
2019-12-18 22:38:12 +01:00
Alexander McCullagh
9c5754acaa [Dotenv] FIX missing getenv 2019-12-18 16:41:13 +01:00
Thomas Calvet
c1746d8b14 [HttpClient][Psr18Client] Remove Psr18ExceptionTrait 2019-12-18 16:09:34 +01:00
Nicolas Grekas
bbf7ed12b1 bug #35014 [HttpClient] make pushed responses retry-able (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient] make pushed responses retry-able

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | https://github.com/orgs/symfony/projects/1#card-30499375
| License       | MIT
| Doc PR        | -

This moves the PUSH matching logic down so that the curl handle of pushed responses can be properly configured. This should make pushed requests retry-able when they fail just after the push-promise frame.

Commits
-------

c2864f65ab [HttpClient] make pushed responses retry-able
2019-12-18 14:38:49 +01:00
Nicolas Grekas
026d57e196 Merge branch '3.4' into 4.3
* 3.4:
  use utf8mb4_bin to align code with documentation
  [VarDumper] ignore failing __debugInfo()
2019-12-18 14:36:54 +01:00
Nicolas Grekas
e85acddc9a bug #35010 [VarDumper] ignore failing __debugInfo() (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[VarDumper] ignore failing __debugInfo()

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

Commits
-------

eb2eb76d0e [VarDumper] ignore failing __debugInfo()
2019-12-18 14:29:30 +01:00
Nicolas Grekas
b47f1af6c2 minor #35020 [HttpFoundation] use utf8mb4_bin to align code with documentation (bendavies)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpFoundation] use utf8mb4_bin to align code with documentation

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

This aligns the code with [the documentation](https://symfony.com/doc/3.4/doctrine/pdo_session_storage.html#mysql), which says to use `utf8mb4` for the character set when using mysql.

Commits
-------

3739ec9f29 use utf8mb4_bin to align code with documentation
2019-12-18 13:05:47 +01:00
Ben Davies
3739ec9f29 use utf8mb4_bin to align code with documentation 2019-12-18 10:25:03 +00:00
Nicolas Grekas
c2864f65ab [HttpClient] make pushed responses retry-able 2019-12-17 17:19:12 +01:00
Nicolas Grekas
eb2eb76d0e [VarDumper] ignore failing __debugInfo() 2019-12-17 16:56:06 +01:00
Nicolas Grekas
2b0f9d6bd9 [DI] revert reordering of ResolveFactoryClassPass and AutowireRequiredMethodsPass in PassConfig 2019-12-17 13:15:16 +01:00
Nicolas Grekas
91016348ba Merge branch '3.4' into 4.3
* 3.4:
  [Console][SymfonyQuestionHelper] Handle multibytes question choices keys and custom prompt
2019-12-17 11:30:23 +01:00
Nicolas Grekas
8c74562dd8 bug #34998 [DI] fix auto-binding service providers to their service subscribers (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[DI] fix auto-binding service providers to their service subscribers

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix https://github.com/orgs/symfony/projects/1#card-30503621
| License       | MIT
| Doc PR        | -

Spotted during a workshop at SymfonyLive Sao Paulo if I recall well :)

Commits
-------

6c2ceb0c44 [DI] fix auto-binding service providers to their service subscribers
2019-12-17 11:27:58 +01:00
Nicolas Grekas
672fbf5a2b bug #33670 [DI] Service locators can't be decorated (malarzm)
This PR was squashed before being merged into the 4.3 branch.

Discussion
----------

[DI] Service locators can't be decorated

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

This popped up while I was trying to update my work project as we have decorated the `messenger.receiver_locator` service. Not sure if this is a regression in DI or a change in messenger that caused the issue thus I'm not marking this as a BC break.

Exception while trying to compile the container:

```
Invalid definition for service "Symfony\Component\DependencyInjection\Tests\Compiler\DecoratedServiceLocator": an array of references is expected as first argument when the "container.service_locator" tag is set.
```

Expected result: service locator can be decorated.

Commits
-------

343282b9d4 [DI] Service locators can't be decorated
2019-12-17 11:22:17 +01:00
Maciej Malarz
343282b9d4 [DI] Service locators can't be decorated 2019-12-17 11:22:10 +01:00
Nicolas Grekas
ae9c41cb16 bug #35000 [Console][SymfonyQuestionHelper] Handle multibytes question choices keys and custom prompt (fancyweb)
This PR was merged into the 3.4 branch.

Discussion
----------

[Console][SymfonyQuestionHelper] Handle multibytes question choices keys and custom prompt

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | https://github.com/symfony/symfony/issues/33928
| License       | MIT
| Doc PR        | -

Replaces / finishes https://github.com/symfony/symfony/pull/33911

Commits
-------

f175032ed8 [Console][SymfonyQuestionHelper] Handle multibytes question choices keys and custom prompt
2019-12-17 11:19:24 +01:00
fancyweb
f175032ed8 [Console][SymfonyQuestionHelper] Handle multibytes question choices keys and custom prompt
Co-authored-by: Mikhail Fesenko <m.fesenko@corp.vk.com>
2019-12-17 09:06:44 +01:00
Nicolas Grekas
6c2ceb0c44 [DI] fix auto-binding service providers to their service subscribers 2019-12-16 19:47:19 +01:00