Commit Graph

43982 Commits

Author SHA1 Message Date
Jérémy Derussé
8c7947f827
Add test on ServerLogHandler 2019-11-30 17:13:10 +01:00
Nicolas Grekas
cad14177dc Merge branch '3.4' into 4.3
* 3.4:
  [Security] Fix clearing remember-me cookie after deauthentication
  more robust initialization from request
2019-11-30 14:16:45 +01:00
Fabien Potencier
9b3cc04522 bug #34649 more robust initialization from request (dbu)
This PR was merged into the 3.4 branch.

Discussion
----------

more robust initialization from request

Request::getPort is declared as int|string but can actually return null.

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

I discovered this problem with a functional test where i dispatch the RequestEvent with a `new Request()`. This used to work in symfony 4 and now triggers an error `Argument 1 passed to Symfony\Component\Routing\RequestContext::setHttpPort() must be of the type int, null given`

In regular web requests, this should probably never happen, but it seems to me if Request is not robust, the RequestContext should be robust about it.

Commits
-------

c6ed0f0208 more robust initialization from request
2019-11-30 13:57:32 +01:00
Fabien Potencier
d2a5c057c5 bug #34671 [Security] Fix clearing remember-me cookie after deauthentication (chalasr)
This PR was merged into the 3.4 branch.

Discussion
----------

[Security] Fix clearing remember-me cookie after deauthentication

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

If you are using the `remember_me` listener and the refreshed user is deauthenticated, you are still logged in because the remember-me cookie does not get cleared.
This fixes it.

Commits
-------

d625a73705 [Security] Fix clearing remember-me cookie after deauthentication
2019-11-30 09:47:34 +01:00
Fabien Potencier
2a9c31e6cf Merge branch '3.4' into 4.3
* 3.4:
  Fix the translation commands when a template contains a syntax error
  [Validator] Update Slovenian translations
2019-11-30 09:28:34 +01:00
Fabien Potencier
7a7ddc04c8 bug #34711 Fix the translation commands when a template contains a syntax error (fabpot)
This PR was merged into the 3.4 branch.

Discussion
----------

Fix the translation commands when a template contains a syntax error

| Q             | A
| ------------- | ---
| Branch?       | 3.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       | Fix #34586
| License       | MIT
| Doc PR        | n/a

When using `debug:translation` or `translation:update`, we should catch exceptions to avoid breaking the command. It was not really an issue before Symfony 4.4/5 as we didn't have templates in the core that use features from optional dependencies.

Commits
-------

7f803bc674 Fix the translation commands when a template contains a syntax error
2019-11-30 09:28:01 +01:00
Fabien Potencier
1d03e0e1a8 minor #34641 [Messenger] add tests to FailedMessagesShowCommand (ahmedash95)
This PR was squashed before being merged into the 4.3 branch (closes #34641).

Discussion
----------

[Messenger] add tests to FailedMessagesShowCommand

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

Add missing tests to FailedMessagesShowCommand in Messenger component

Commits
-------

4b9b93f5d6 [Messenger] add tests to FailedMessagesShowCommand
2019-11-30 09:26:46 +01:00
Ahmed
4b9b93f5d6 [Messenger] add tests to FailedMessagesShowCommand 2019-11-30 09:26:41 +01:00
Fabien Potencier
9d78fcc161 minor #34722 [Validator] Update Slovenian translations (petk)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] Update Slovenian translations

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

Hello, this fixes the https://github.com/symfony/symfony/issues/30186

Commits
-------

b2ae60a73b [Validator] Update Slovenian translations
2019-11-30 09:21:06 +01:00
Fabien Potencier
7f803bc674 Fix the translation commands when a template contains a syntax error 2019-11-30 09:19:08 +01:00
Robin Chalas
d625a73705 [Security] Fix clearing remember-me cookie after deauthentication 2019-11-30 02:46:11 +01:00
Peter Kokot
b2ae60a73b [Validator] Update Slovenian translations 2019-11-29 20:07:18 +01:00
Nicolas Grekas
73ea89b4c2 Merge branch '3.4' into 4.3
* 3.4:
  [Config][ReflectionClassResource] Handle parameters with undefined constant as their default values
  fix dumping number-like string parameters
  [Console] Fix autocomplete multibyte input support
  [Config] don't break on virtual stack frames in ClassExistenceResource
2019-11-29 18:37:27 +01:00
Nicolas Grekas
9eafff5ec0 bug #34560 [Config][ReflectionClassResource] Handle parameters with undefined constant as their default values (fancyweb)
This PR was merged into the 3.4 branch.

Discussion
----------

[Config][ReflectionClassResource] Handle parameters with undefined constant as their default values

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

Basically we can fix this bug by "reimplementing" php src way of building the __toString() of the method except that we avoid to call the undefined constant. Obviously we cannot invalidate the resource if the value of the constant changes since we never knew it. However, it's still better than now.

Commits
-------

8de2a226a8 [Config][ReflectionClassResource] Handle parameters with undefined constant as their default values
2019-11-29 17:06:11 +01:00
Thomas Calvet
8de2a226a8 [Config][ReflectionClassResource] Handle parameters with undefined constant as their default values 2019-11-29 17:04:16 +01:00
Nicolas Grekas
2d2dd6244c bug #34695 [Config] don't break on virtual stack frames in ClassExistenceResource (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Config] don't break on virtual stack frames in ClassExistenceResource

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

Commits
-------

fffeccd744 [Config] don't break on virtual stack frames in ClassExistenceResource
2019-11-29 17:02:06 +01:00
Christian Flothmann
e0851737ab bug #34716 [DependencyInjection] fix dumping number-like string parameters (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[DependencyInjection] fix dumping number-like string parameters

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

Commits
-------

a1ce0ed086 fix dumping number-like string parameters
2019-11-29 16:39:50 +01:00
Christian Flothmann
a1ce0ed086 fix dumping number-like string parameters 2019-11-29 16:28:12 +01:00
Nicolas Grekas
bbda69d041 minor #34714 Fix CI (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

Fix CI

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

Commits
-------

b9b3fd89a3 Fix CI
2019-11-29 16:15:05 +01:00
Nicolas Grekas
b9b3fd89a3 Fix CI 2019-11-29 16:01:18 +01:00
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
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
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
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
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