Commit Graph

45556 Commits

Author SHA1 Message Date
Nicolas Grekas
14a7ac8ba0 bug #34558 [Console] Fix autocomplete multibyte input support (fancyweb)
This PR was merged into the 3.4 branch.

Discussion
----------

[Console] Fix autocomplete multibyte input support

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

Added it just where it's needed.

Commits
-------

a1129f938c [Console] Fix autocomplete multibyte input support
2019-11-29 13:52:27 +01:00
Thomas Calvet
a1129f938c [Console] Fix autocomplete multibyte input support 2019-11-29 10:09:40 +01:00
Nicolas Grekas
fffeccd744 [Config] don't break on virtual stack frames in ClassExistenceResource 2019-11-28 16:42:08 +01:00
Nicolas Grekas
475967cbc1 Merge branch '4.3' into 4.4
* 4.3:
  bug #34554 [HttpClient] Fix early cleanup of pushed HTTP/2 responses (lyrixx)
2019-11-28 15:12:27 +01:00
Nicolas Grekas
53127c54a1 bug #34554 [HttpClient] Fix early cleanup of pushed HTTP/2 responses (lyrixx)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] Fix early cleanup of pushed HTTP/2 responses

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

Commits
-------

0f51da6ec7 [HttpClient] Fix early cleanup of pushed HTTP/2 responses
2019-11-28 15:09:27 +01:00
Nicolas Grekas
3e917dbfe3 Merge branch '4.3' into 4.4
* 4.3:
  Fix tests
  [Console] Fix commands description with numeric namespaces
  [HttpFoundation] Fixed typo
  [EventDispatcher] Better error reporting when arguments to dispatch() are swapped
  [Serializer] CsvEncoder::NO_HEADERS_KEY ignored when used in constructor
  [Form] Keep preferred_choices order for choice groups
  [Debug] work around failing chdir() on Darwin
  [PhpUnitBridge] Read configuration CLI directive
  [DI] Missing test on YamlFileLoader
  Revert "minor #34608 [Process] add tests for php executable finder if file does not exist (ahmedash95)"
  Simpler example for Apache basic auth workaround
  [Console] Fix trying to access array offset on value of type int
  [Config] Remove extra sprintf arg
  [VarDumper] notice on potential undefined index
  [HttpClient] turn exception into log when the request has no content-type
  [Process] add tests for php executable finder if file does not exist
  [Cache] Make sure we get the correct number of values from redis::mget()
  [TwigBridge] Add row_attr to all form themes
  [Serializer] Fix MetadataAwareNameConverter usage with string group
2019-11-28 14:33:56 +01:00
Nicolas Grekas
845943ab10 Merge branch '3.4' into 4.3
* 3.4:
  [Console] Fix commands description with numeric namespaces
  [HttpFoundation] Fixed typo
2019-11-28 14:29:27 +01:00
Nicolas Grekas
fa783f9697 bug #34130 [Console] Fix commands description with numeric namespaces (fancyweb)
This PR was merged into the 3.4 branch.

Discussion
----------

[Console] Fix commands description with numeric namespaces

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

This PR fixes the linked ticket case.

It also changes the keys sorting to display the numeric namespaces first.

It also fixes another bug if your command name starts with `_global:`. In this special case the command is considered global but its full name is still `_global:xxx`. We can't do better without more refactoring since the final array of namespaces and global commands is shared, `_global` just being a special key. Currently, if your command starts with `_global`, all global commands are not displayed at all so it's better like this anyway.

It also fixes another bug if your command starts with `0:` (cf `'' ===` comparison).

Commits
-------

4d47868125 [Console] Fix commands description with numeric namespaces
2019-11-28 14:28:57 +01:00
Nicolas Grekas
51045927da Fix tests 2019-11-28 14:25:45 +01:00
Thomas Calvet
4d47868125 [Console] Fix commands description with numeric namespaces 2019-11-28 14:20:50 +01:00
Nicolas Grekas
6e6ed9cd7b minor #34684 [HttpFoundation] Fixed typo (thomasbisignani)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpFoundation] Fixed typo

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

Commits
-------

3378890e70 [HttpFoundation] Fixed typo
2019-11-28 13:55:32 +01:00
Thomas Bisignani
3378890e70 [HttpFoundation] Fixed typo 2019-11-28 13:52:59 +01:00
Nicolas Grekas
60aea22193 minor #34519 improve upgrade instructions for twig.exception_controller configuration (bendavies)
This PR was merged into the 4.4 branch.

Discussion
----------

improve upgrade instructions for twig.exception_controller configuration

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

This improves the upgrade instructions for the deprecated configuration of `twig.exception_controller`.

Or would it be better to make the default `null` on 4.4?
a8a9e69488/src/Symfony/Bundle/TwigBundle/DependencyInjection/Configuration.php (L41)

Commits
-------

bdc68fd894 improve upgrade instructions for twig.exception_controller configuration
2019-11-28 13:22:13 +01:00
Nicolas Grekas
8378d958e2 bug #34562 [DI] Skip unknown method calls for factories in check types pass (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

[DI] Skip unknown method calls for factories in check types pass

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

Ref https://github.com/symfony/symfony/issues/30885 and https://github.com/symfony/symfony/pull/30889.

Commits
-------

592bff88f2 [DI] Skip unknown method calls for factories in check types pass
2019-11-28 13:12:35 +01:00
Thomas Calvet
592bff88f2 [DI] Skip unknown method calls for factories in check types pass 2019-11-28 13:12:16 +01:00
Nicolas Grekas
28c3b3e3e7 bug #34677 [EventDispatcher] Better error reporting when arguments to dispatch() are swapped (rimas-kudelis)
This PR was squashed before being merged into the 4.3 branch.

Discussion
----------

[EventDispatcher] Better error reporting when arguments to dispatch() are swapped

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

Incorrect error is currently being reported when the second argument is an instance of `Symfony\Contracts\EventDispatcher\Event`.

Commits
-------

54aac56ab8 [EventDispatcher] Better error reporting when arguments to dispatch() are swapped
2019-11-28 12:54:58 +01:00
Rimas Kudelis
54aac56ab8 [EventDispatcher] Better error reporting when arguments to dispatch() are swapped 2019-11-28 12:54:51 +01:00
Ben Davies
bdc68fd894 improve upgrade instructions for twig.exception_controller configuration 2019-11-28 11:45:34 +00:00
Nicolas Grekas
8d22819443 minor #34582 [HttpFoundation] Update CHANGELOG for PdoSessionHandler BC BREAK in 4.4 (tseho)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[HttpFoundation] Update CHANGELOG for PdoSessionHandler BC BREAK in 4.4

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

As explained in https://github.com/symfony/symfony/issues/34491, there was a BC BREAK between 4.3 and 4.4, when using `PdoSessionHandler` with MySQL, where the column `sess_lifetime` was modified from `MEDIUMINT` to `INTEGER UNSIGNED`.

This PR updates `UPGRADE-4.4.md` with a suggested query for updating the database accordingly.

Commits
-------

eda4d68f7d [HttpFoundation] Update CHANGELOG for PdoSessionHandler BC BREAK in 4.4
2019-11-28 12:41:55 +01:00
Quentin Favrie
eda4d68f7d [HttpFoundation] Update CHANGELOG for PdoSessionHandler BC BREAK in 4.4 2019-11-28 12:41:49 +01:00
Nicolas Grekas
81ba73cb7b bug #33573 [TwigBridge] Add row_attr to all form themes (fancyweb)
This PR was merged into the 4.3 branch.

Discussion
----------

[TwigBridge] Add row_attr to all form themes

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

The rules I applied:
- Always done on the first HTML tag of the row.
- Current existing row attrs (`class` or `style`) are applied unless they are defined by the `row_attr` override. They can be removed if they are explicitly set to `false`.

Starting from:
```
<div class="form-group">
```

With `row_attr: {foo: "bar"}`:
```
<div foo="bar" class="form-group">
```

With `row_attr: {class: "ccc"}`:
```
<div class="ccc">
```

With `row_attr: {foo: "bar", class: false}`:
```
<div foo="bar">
```

Commits
-------

dfdcbb401e [TwigBridge] Add row_attr to all form themes
2019-11-28 12:39:15 +01:00
Nicolas Grekas
50db43fc4c bug #34019 [Serializer] CsvEncoder::NO_HEADERS_KEY ignored when used in constructor (Dario Savella)
This PR was squashed before being merged into the 4.3 branch.

Discussion
----------

[Serializer] CsvEncoder::NO_HEADERS_KEY ignored when used in constructor

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

My first pull request...
The following code:
```
$data = <<<EOD
a,b
c,d
EOD;
$encoder = new CsvEncoder([CsvEncoder::NO_HEADERS_KEY=>true]);
var_dump($encoder->decode($data,'csv'));
```
produces:
```
array(2) {
  'a' =>
  string(1) "c"
  'b' =>
  string(1) "d"
}
```
instead of the expected:
```
array(2) {
  [0] =>
  array(2) {
    [0] =>
    string(1) "a"
    [1] =>
    string(1) "b"
  }
  [1] =>
  array(2) {
    [0] =>
    string(1) "c"
    [1] =>
    string(1) "d"
  }
}
```

Commits
-------

a0430f6917 [Serializer] CsvEncoder::NO_HEADERS_KEY ignored when used in constructor
2019-11-28 12:29:50 +01:00
Dario Savella
a0430f6917 [Serializer] CsvEncoder::NO_HEADERS_KEY ignored when used in constructor 2019-11-28 12:29:45 +01:00
Nicolas Grekas
ab5e7fa706 bug #34083 [Form] Keep preferred_choices order for choice groups (vilius-g)
This PR was squashed before being merged into the 4.3 branch.

Discussion
----------

[Form] Keep preferred_choices order for choice groups

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

Since 4.3 ordering of `preferred_choices` is preserved when displaying form. But this only works for flat options. When the choices are grouped, the preferred groups are in default order.

Now the preferred choice group order is derived by taking the first matching choice from `preferred_choices` and using its position to sort the groups.

Commits
-------

75404e5287 [Form] Keep preferred_choices order for choice groups
2019-11-28 12:24:09 +01:00
Vilius Grigaliūnas
75404e5287 [Form] Keep preferred_choices order for choice groups 2019-11-28 12:22:21 +01:00
Nicolas Grekas
3688c3aebb Merge branch '3.4' into 4.3
* 3.4:
  [DI] Missing test on YamlFileLoader
2019-11-28 12:13:33 +01:00
Nicolas Grekas
84b5db3a44 minor #34675 [DI] Missing test on YamlFileLoader (maxhelias)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] Missing test on YamlFileLoader

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

Missing test on YamlFileLoader

Commits
-------

b9d5237f67 [DI] Missing test on YamlFileLoader
2019-11-28 12:10:43 +01:00
Nicolas Grekas
789c863233 bug #34091 [Debug] work around failing chdir() on Darwin (mary2501)
This PR was merged into the 4.3 branch.

Discussion
----------

[Debug] work around failing chdir() on Darwin

| Q             | A
| ------------- | ---
| Branch?       |  4.3 for bug fixes <!-- 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 https://github.com/happybottoms/coverd/issues/15 <!-- 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 4.4.
 - Legacy code removals go to the master branch.
-->

Commits
-------

f40373eb7c [Debug] work around failing chdir() on Darwin
2019-11-28 11:55:21 +01:00
Maria Grazia Patteri
f40373eb7c [Debug] work around failing chdir() on Darwin 2019-11-28 11:53:46 +01:00
Nicolas Grekas
da459d731f bug #34305 [PhpUnitBridge] Read configuration CLI directive (ro0NL)
This PR was merged into the 4.3 branch.

Discussion
----------

[PhpUnitBridge] Read configuration CLI directive

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

Commits
-------

22931a0d4a [PhpUnitBridge] Read configuration CLI directive
2019-11-28 11:35:16 +01:00
Roland Franssen
22931a0d4a [PhpUnitBridge] Read configuration CLI directive 2019-11-28 11:34:19 +01:00
Nicolas Grekas
33731bf287 bug #34490 [Serializer] Fix MetadataAwareNameConverter usage with string group (antograssiot)
This PR was merged into the 4.3 branch.

Discussion
----------

[Serializer] Fix MetadataAwareNameConverter usage with string group

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

Allow to use the short syntax for serialization context group like `['groups' => 'user']`

Commits
-------

d4f749a465 [Serializer] Fix MetadataAwareNameConverter usage with string group
2019-11-28 11:19:20 +01:00
Maxime Helias
b9d5237f67 [DI] Missing test on YamlFileLoader 2019-11-28 11:09:39 +01:00
Nicolas Grekas
63e6f873aa Merge branch '3.4' into 4.3 2019-11-28 11:06:24 +01:00
Nicolas Grekas
53241df2df Revert "minor #34608 [Process] add tests for php executable finder if file does not exist (ahmedash95)"
This reverts commit 5cacc5dd69, reversing
changes made to f0a6de2736.
2019-11-28 11:05:51 +01:00
Nicolas Grekas
4375742f2c Merge branch '3.4' into 4.3
* 3.4:
  Simpler example for Apache basic auth workaround
  [Console] Fix trying to access array offset on value of type int
  [Process] add tests for php executable finder if file does not exist
  [Cache] Make sure we get the correct number of values from redis::mget()
2019-11-28 11:05:26 +01:00
Nicolas Grekas
46eefa9610 minor #34460 Simpler example for Apache basic auth workaround (Roy-Orbison)
This PR was submitted for the master branch but it was merged into the 3.4 branch instead.

Discussion
----------

Simpler example for Apache basic auth workaround

Uses a simpler regex and existing back-reference instead of reading header twice.

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | #1813
| License       | MIT

Improvement to code documentation, no change to executed code.

Commits
-------

388528da50 Simpler example for Apache basic auth workaround
2019-11-28 10:37:31 +01:00
Roy-Orbison
388528da50 Simpler example for Apache basic auth workaround
Uses a simpler regex and existing back-reference instead of reading header twice.
2019-11-28 10:37:24 +01:00
Nicolas Grekas
e23fd9ed0c bug #34632 [Console] Fix trying to access array offset on value of type int (Tavafi)
This PR was merged into the 3.4 branch.

Discussion
----------

[Console] Fix trying to access array offset on value of type int

| Q             | A
| ------------- | ---
| Branch?       | 5.0
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
|Tests pass?| yes
| License       | MIT

PHP 7.4 throws an error exception when you are trying to access an array by an integer key.
I got this error while I was running a console command:

```
ErrorException: Trying to access array offset on value of type int
at /my/project/vendor/symfony/console/Input/ArrayInput.php:110

Exception trace:
/my/project/vendor/symfony/console/Input/ArrayInput.php:110
/my/project/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:29
/my/project/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:29
/my/project/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:87
/my/project/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:31
/my/project/vendor/laravel/framework/src/Illuminate/Container/Container.php:564
/my/project/vendor/laravel/framework/src/Illuminate/Console/Command.php:179
/my/project/vendor/symfony/console/Command/Command.php:255
/my/project/vendor/laravel/framework/src/Illuminate/Console/Command.php:166
/my/project/vendor/symfony/console/Application.php:934
/my/project/vendor/symfony/console/Application.php:273
/my/project/vendor/symfony/console/Application.php:149
/my/project/vendor/laravel/framework/src/Illuminate/Console/Application.php:89
/my/project/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:122
/my/project/artisan:37

```

Commits
-------

069d214210 [Console] Fix trying to access array offset on value of type int
2019-11-28 10:15:15 +01:00
Ali Tavafi
069d214210 [Console] Fix trying to access array offset on value of type int 2019-11-28 10:13:48 +01:00
David Buchmann
c6ed0f0208 more robust initialization from request
Request::getPort is declared as int|string but can actually return null.
2019-11-28 09:59:10 +01:00
Nicolas Grekas
3c3c8bfb9b minor #34663 [Config] Remove extra sprintf arg (ogizanagi)
This PR was merged into the 4.3 branch.

Discussion
----------

[Config] Remove extra sprintf arg

| Q             | A
| ------------- | ---
| Branch?       | 5.0 <!-- see below -->
| 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

there is only one placeholder here

(code in previous branches is commented out for 5.0)

Commits
-------

9f19ae185d [Config] Remove extra sprintf arg
2019-11-28 09:36:08 +01:00
Maxime Steinhausser
9f19ae185d [Config] Remove extra sprintf arg 2019-11-28 09:31:09 +01:00
Nicolas Grekas
ed22c85635 [HttpKernel] fix typo 2019-11-28 09:08:13 +01:00
Nicolas Grekas
396da3726b bug #34669 [HttpClient] turn exception into log when the request has no content-type (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient] turn exception into log when the request has no content-type

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

Spotted while merging a PR with ext-curl disabled:

```
  [Symfony\Component\HttpClient\Exception\TransportException]
  fopen(): Content-type not specified assuming application/x-www-form-urlencoded
```

This is now a log.

Commits
-------

4c671a4487 [HttpClient] turn exception into log when the request has no content-type
2019-11-28 09:02:16 +01:00
Nicolas Grekas
f9e6f11bea bug #34662 [HttpKernel] Support typehint to deprecated FlattenException in controller (andrew-demb)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[HttpKernel] Support typehint to deprecated FlattenException in controller

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

We should support converting throwable to `FlattenException` with typehint to deprecated class also

Commits
-------

26b4e372dd [HttpKernel] Support typehint to deprecated FlattenException in controller
2019-11-28 08:56:36 +01:00
Andrii Dembitskyi
26b4e372dd [HttpKernel] Support typehint to deprecated FlattenException in controller 2019-11-28 08:56:28 +01:00
Nicolas Grekas
d72133e78b bug #34619 Restores preview mode support for Html and Serializer error renderers (yceruto)
This PR was merged into the 4.4 branch.

Discussion
----------

Restores preview mode support for Html and Serializer error renderers

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

This restores the preview mode support for all error renderers.

Commits
-------

38493b3e4b Add preview mode support for Html and Serializer error renderers
2019-11-28 08:51:16 +01:00
Yonel Ceruto
38493b3e4b Add preview mode support for Html and Serializer error renderers 2019-11-28 08:51:03 +01:00
Nicolas Grekas
ac20382f41 minor #34617 [FWBundle] Remove error_renderer.serializer if the Serializer isn't available (dunglas)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[FWBundle] Remove error_renderer.serializer if the Serializer isn't available

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

(Should help for https://github.com/hautelook/AliceBundle/pull/485).

Commits
-------

0b4c21b3d2 [FWBundle] Remove error_renderer.serializer if the Serializer isn't available
2019-11-28 08:41:19 +01:00