Commit Graph

46693 Commits

Author SHA1 Message Date
Nicolas Grekas
572117a660 Merge branch '4.4' into 5.0
* 4.4:
  Fix failures on PHP 7.4
  Fix tests
  [Console] fix typos
  [Console] fix tests
2019-12-01 11:51:15 +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
324272111c Merge branch '5.0'
* 5.0:
  Add missing use statement
  [Notifier] Add telegram tests
  [Notifier] Add Slack bridge tests
2019-12-01 10:14:14 +01:00
Fabien Potencier
32b5d07139 Merge branch '4.4' into 5.0
* 4.4:
  Add missing use statement
2019-12-01 10:14:07 +01:00
Fabien Potencier
f3a670fb4a Add missing use statement 2019-12-01 10:13:30 +01:00
Fabien Potencier
c147ef4bc7 Merge branch '4.4'
* 4.4:
  Fix CS
  Fix CS
  Fix CS
  [DependencyInjection][Xml] Fix the attribute 'tag' is not allowed in 'bind' tag
2019-12-01 09:49:37 +01:00
Fabien Potencier
c13974cc20 Merge branch '4.4' into 5.0
* 4.4:
  Fix CS
  Fix CS
  Fix CS
  [DependencyInjection][Xml] Fix the attribute 'tag' is not allowed in 'bind' tag
2019-12-01 09:48:26 +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
a6527464e7 minor #34539 [Notifier] Add telegram tests (Jeroeny)
This PR was squashed before being merged into the 5.0 branch (closes #34539).

Discussion
----------

[Notifier] Add telegram tests

| Q             | A
| ------------- | ---
| Branch?       | 5.0
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | See #33687
| License       | MIT

Adds tests for the Telegram bridge of the Notifier component. Not sure if this is the right way to go, but would love some feedback.

#SymfonyHackday

Commits
-------

3b4d83cb4a [Notifier] Add telegram tests
2019-11-30 19:15:43 +01:00
Jeroeny
3b4d83cb4a [Notifier] Add telegram tests 2019-11-30 19:15:37 +01:00
Fabien Potencier
0be4647bd9 minor #34549 [Notifier] Add Slack bridge tests (Jeroeny)
This PR was squashed before being merged into the 5.0 branch (closes #34549).

Discussion
----------

[Notifier] Add Slack bridge tests

| Q             | A
| ------------- | ---
| Branch?       | 5.0
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | See #33687
| License       | MIT

Adds tests for the Slack bridge of the Notifier component.

#SymfonyHackday

Commits
-------

626fdaa9a4 [Notifier] Add Slack bridge tests
2019-11-30 19:14:26 +01:00
Jeroeny
626fdaa9a4 [Notifier] Add Slack bridge tests 2019-11-30 19:14:20 +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
Jérémy Derussé
8c7947f827
Add test on ServerLogHandler 2019-11-30 17:13:10 +01:00
Nicolas Grekas
c62bb82e27 Merge branch '5.0'
* 5.0:
  [DI] auto-register singly implemented interfaces by default
  [DI] fix overriding existing services with aliases for singly-implemented interfaces
  remove service when base class is missing
  do not depend on the QueryBuilder from the ORM
  [Security/Http] call auth listeners/guards eagerly when they "support" the request
  [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
  [HttpClient] remove conflict rule with HttpKernel that prevents using the component in Symfony 3.4
  [Config][ReflectionClassResource] Handle parameters with undefined constant as their default values
  Fix compatibility with Monolog 2
  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
  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 15:13:05 +01:00
Nicolas Grekas
bb11cac33e Merge branch '4.4' into 5.0
* 4.4:
  [DI] auto-register singly implemented interfaces by default
  [DI] fix overriding existing services with aliases for singly-implemented interfaces
  remove service when base class is missing
  do not depend on the QueryBuilder from the ORM
  [Security/Http] call auth listeners/guards eagerly when they "support" the request
  [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
  [HttpClient] remove conflict rule with HttpKernel that prevents using the component in Symfony 3.4
  [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
  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 15:12:50 +01: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
39ba678e83 feature #34119 [Mime] Added MimeType for "msg" (LIBERT Jérémy)
This PR was submitted for the 4.3 branch but it was merged into the 5.1-dev branch instead (closes #34119).

Discussion
----------

[Mime] Added MimeType for "msg"

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

Commits
-------

d6ccd4c40f Added MimeType for ".msg"
2019-11-30 14:04:32 +01:00
LIBERT Jérémy
d6ccd4c40f Added MimeType for ".msg" 2019-11-30 14:04:25 +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
04d6d8dc56 feature #34648 [Mailer] Allow to configure or disable the message bus to use (ogizanagi)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Mailer] Allow to configure or disable the message bus to use

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

A new `mailer.message_bus` option allowing to choose the message bus to use instead of using the default one.
Also allows to set it to `false` so no message bus is used and the transport will be called directly.

Commits
-------

42fd0cf985 [Mailer] Allow to configure or disable the message bus to use
2019-11-30 09:35:18 +01:00
Fabien Potencier
270247aa74 feature #34705 [Validator] Label regex in date validator (kristofvc)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Validator] Label regex in date validator

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

This change makes sure that when extending the DateValidator you can easily change the format withouth changing anything else.
eg. you can change the pattern to
`/^(?<day>\d{2})/(?<month>\d{2})/(?<year>\d{4})$/` but the implementation still checks your date correctly.

Commits
-------

ec09f7e630 Label regex in date validator
2019-11-30 09:31:28 +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