Commit Graph

45556 Commits

Author SHA1 Message Date
Fabien Potencier
ccff7754c3 updated CHANGELOG for 4.4.1 2019-12-01 15:06:29 +01:00
Nicolas Grekas
febff9b1fd Merge branch '4.3' into 4.4
* 4.3:
  Fix failures on PHP 7.4
2019-12-01 11:50:45 +01:00
Nicolas Grekas
54e2ad7c88 Merge branch '3.4' into 4.3
* 3.4:
  Fix failures on PHP 7.4
2019-12-01 11:50:31 +01:00
Nicolas Grekas
a94e76a866 Fix failures on PHP 7.4 2019-12-01 11:45:41 +01:00
Nicolas Grekas
9ad38b2e5f Fix tests 2019-12-01 11:19:36 +01:00
Nicolas Grekas
c22b36ef50 Merge branch '4.3' into 4.4
* 4.3:
  [Console] fix typos
  [Console] fix tests
2019-12-01 11:06:17 +01:00
Nicolas Grekas
a489c529ef Merge branch '3.4' into 4.3
* 3.4:
  [Console] fix typos
2019-12-01 11:04:59 +01:00
Nicolas Grekas
abc2880be4 [Console] fix typos 2019-12-01 11:04:45 +01:00
Nicolas Grekas
cd2a8d2628 [Console] fix tests 2019-12-01 10:59:54 +01:00
Fabien Potencier
f3a670fb4a Add missing use statement 2019-12-01 10:13:30 +01:00
Fabien Potencier
23e5d1aa8e Fix CS 2019-12-01 09:46:01 +01:00
Fabien Potencier
9b10c167ef Merge branch '4.3' into 4.4
* 4.3:
  Fix CS
  Fix CS
2019-12-01 09:39:58 +01:00
Fabien Potencier
2c04fad016 Fix CS 2019-12-01 09:39:44 +01:00
Fabien Potencier
d5ca9ec2c7 Merge branch '3.4' into 4.3
* 3.4:
  Fix CS
2019-12-01 09:34:52 +01:00
Fabien Potencier
861783cc15 Fix CS 2019-12-01 09:33:36 +01:00
Fabien Potencier
28e1d1ea77 bug #34732 [DependencyInjection][Xml] Fix the attribute 'tag' is not allowed in 'bind' tag (tienvx)
This PR was merged into the 4.4 branch.

Discussion
----------

[DependencyInjection][Xml] Fix the attribute 'tag' is not allowed in 'bind' tag

| Q             | A
| ------------- | ---
| Branch?       | 4.4 <!-- 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       | N/A <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs/pull/12741 <!-- required for new features -->

Add test case for https://symfony.com/blog/new-in-symfony-4-4-dependency-injection-improvements-part-1#allow-binding-tagged-services and fix a bug with attribute 'tag' is not allowed

Commits
-------

e38f7d41ef [DependencyInjection][Xml] Fix the attribute 'tag' is not allowed in 'bind' tag
2019-11-30 18:51:58 +01:00
tien.xuan.vo
e38f7d41ef [DependencyInjection][Xml] Fix the attribute 'tag' is not allowed in 'bind' tag 2019-11-30 23:34:06 +07:00
Nicolas Grekas
9b658ed4a2 bug #34729 [DI] auto-register singly implemented interfaces by default (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[DI] auto-register singly implemented interfaces by default

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

Commits
-------

209b330fd6 [DI] auto-register singly implemented interfaces by default
2019-11-30 15:05:16 +01:00
Nicolas Grekas
c222aaae70 bug #34728 [DI] fix overriding existing services with aliases for singly-implemented interfaces (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[DI] fix overriding existing services with aliases for singly-implemented interfaces

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

Commits
-------

739357656d [DI] fix overriding existing services with aliases for singly-implemented interfaces
2019-11-30 15:04:25 +01:00
Nicolas Grekas
df379f0d07 Merge branch '4.3' into 4.4
* 4.3:
  [Messenger] add tests to FailedMessagesShowCommand
  Fix the translation commands when a template contains a syntax error
  [Security] Fix clearing remember-me cookie after deauthentication
  [Validator] Update Slovenian translations
  [Config][ReflectionClassResource] Handle parameters with undefined constant as their default values
  fix dumping number-like string parameters
  Fix CI
  [Console] Fix autocomplete multibyte input support
  [Config] don't break on virtual stack frames in ClassExistenceResource
  more robust initialization from request
2019-11-30 15:03:57 +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
Nicolas Grekas
209b330fd6 [DI] auto-register singly implemented interfaces by default 2019-11-30 13:50:03 +01:00
Fabien Potencier
b357488e77 bug #34715 [TwigBundle] remove service when base class is missing (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[TwigBundle] remove service when base class is missing

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

Commits
-------

c3a658ac0f remove service when base class is missing
2019-11-30 13:44:40 +01:00
Fabien Potencier
0a2a176961 bug #34600 [DoctrineBridge] do not depend on the QueryBuilder from the ORM (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[DoctrineBridge] do not depend on the QueryBuilder from the ORM

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

Commits
-------

6958d77f0c do not depend on the QueryBuilder from the ORM
2019-11-30 13:42:38 +01:00
Nicolas Grekas
739357656d [DI] fix overriding existing services with aliases for singly-implemented interfaces 2019-11-30 13:15:17 +01:00
Christian Flothmann
c3a658ac0f remove service when base class is missing 2019-11-30 11:12:23 +01:00
Christian Flothmann
6958d77f0c do not depend on the QueryBuilder from the ORM 2019-11-30 11:00:03 +01:00
Fabien Potencier
4d11bca474 bug #34627 [Security/Http] call auth listeners/guards eagerly when they "support" the request (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[Security/Http] call auth listeners/guards eagerly when they "support" the request

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

This fixes the form authenticator linked to #34614.
Since laziness is here to provide compatibility with HTTP caching, it should be disabled when the request cannot be cached.

Tests don't pass yet, but I'm on the path to something here.

The PR now introduces a new `AbstractListener` that splits the handling logic in two:
- `supports(Request): ?bool` is always called eagerly and tells whether the listener matches the request for an earger call or a lazy call
- `authenticate(RequestEvent)` does the rest of the job when `supports()` allows so - lazily or not depending on the return value of `supports()`.

Of course, this remains compatible with non-lazy logics, see `AbstractListener::__invoke()`.

Commits
-------

b20ebe6b90 [Security/Http] call auth listeners/guards eagerly when they "support" the request
2019-11-30 10:56:08 +01:00
Nicolas Grekas
b20ebe6b90 [Security/Http] call auth listeners/guards eagerly when they "support" the request 2019-11-30 10:49:41 +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
6cc2c293bc bug #34032 [Mime] Fixing multidimensional array structure with FormDataPart (jvahldick)
This PR was merged into the 4.4 branch.

Discussion
----------

[Mime] Fixing multidimensional array structure with FormDataPart

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

The issue is pretty much described on #34031
The current structure of the raw body build on FormDataPart is not well recognized by the server. It considers all the fields as a root type, when actually it is possible to send arrays by html forms.

Lets the following structure on the html
```html
<input type="text" name="names[]" value="John" />
<input type="text" name="names[]" value="Doe" />
```

It creates the following raw body:
```
----------------------------466490401959219490193856
Content-Disposition: form-data; name="names[]"

John
----------------------------466490401959219490193856
Content-Disposition: form-data; name="names[]"

Doe
----------------------------466490401959219490193856--
```

Meanwhile, the FormDataPart on Mime component generates the following body:
```
--_=_symfony_1571410799_b7846b3b4e86d821cdec4379e62b4068_=_
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Content-Disposition: form-data

John
--_=_symfony_1571410799_b7846b3b4e86d821cdec4379e62b4068_=_
Content-Type: text/plain; charset=utf-8; name=1
Content-Transfer-Encoding: 8bit
Content-Disposition: form-data; name=1

Doe
--_=_symfony_1571410799_b7846b3b4e86d821cdec4379e62b4068_=_--
```

For more complex structures, the $_POST doesn't even recognize properly the field names and values.

Commits
-------

ca630e5351 Changing the multipart form-data behavior to use the form name as an array, which makes it recognizable as an array by PHP on the $_POST globals once it is coming from the HttpClient component
2019-11-30 09:27:26 +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
f9eccf8ae3 minor #34719 [HttpClient] remove conflict rule with HttpKernel that prevents using the component in Symfony 3.4 (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] remove conflict rule with HttpKernel that prevents using the component in Symfony 3.4

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

Fix #34698

Commits
-------

d9c6476407 [HttpClient] remove conflict rule with HttpKernel that prevents using the component in Symfony 3.4
2019-11-29 17:57:48 +01:00
Nicolas Grekas
d9c6476407 [HttpClient] remove conflict rule with HttpKernel that prevents using the component in Symfony 3.4 2019-11-29 17:55:58 +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