Commit Graph

47956 Commits

Author SHA1 Message Date
Fabien Potencier 14b825b24f minor #35999 [Mime] remove phpdoc mentioning Utf8AddressEncoder (dmaicher)
This PR was submitted for the 4.3 branch but it was merged into the 4.4 branch instead.

Discussion
----------

[Mime] remove phpdoc mentioning Utf8AddressEncoder

This class does not exist

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

I'm currently migrating from Swiftmailer fo Symfony mailer and stumbled upon this exception:

https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Mime/Encoder/IdnAddressEncoder.php#L44

The phpdoc of the class is a bit confusing/wrong. Seems to be a copy&paste leftover from Swiftmailer:

https://github.com/swiftmailer/swiftmailer/blob/master/lib/classes/Swift/AddressEncoder/IdnAddressEncoder.php#L19

Commits
-------

a85fb6c496 [Mime] remove phpdoc mentioning Utf8AddressEncoder
2020-03-09 13:55:10 +01:00
David Maicher a85fb6c496 [Mime] remove phpdoc mentioning Utf8AddressEncoder
that class does not exist.
2020-03-09 13:55:04 +01:00
Fabien Potencier c1ed1007cd Add missing phpdoc 2020-03-09 13:54:19 +01:00
Fabien Potencier d8d7357895 bug #35993 Remove int return type from FlattenException::getCode (wucdbm)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

Remove int return type from FlattenException::getCode

| 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       | - <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | - <!-- required for new features -->

Heya,

So my project died with `Return value of Symfony\Component\ErrorHandler\Exception\FlattenException::getCode() must be of the type int, string returned` symfony error page. Quite unexpected.

Turns out it's a `Doctrine\DBAL\Driver\PDOException` with code `42S02` and message `SQLSTATE[42S02]: Base table or view not found: 1146 Table 'some_db.some_table' doesn't exist`.

This is because I use the `FlattenException` class to serialize errors and store elsewhere, just more convenient to quickly check for any errors. I guess noone has stumbled upon a PDOException /  `FlattenException::getCode` before.

https://www.php.net/manual/en/throwable.getcode.php

`Returns the exception code as integer in Exception but possibly as other type in Exception descendants (for example as string in PDOException).`

Commits
-------

0f22e076c4 Remove int return type from FlattenException::getCode
2020-03-09 13:52:45 +01:00
Martin Kirilov 0f22e076c4 Remove int return type from FlattenException::getCode 2020-03-09 13:52:39 +01:00
Fabien Potencier bdd66aafc0 bug #36004 [Yaml] fix dumping strings containing CRs (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Yaml] fix dumping strings containing CRs

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

Commits
-------

da7870433f [Yaml] fix dumping strings containing CRs
2020-03-09 11:53:35 +01:00
Christian Flothmann da7870433f [Yaml] fix dumping strings containing CRs 2020-03-09 10:15:29 +01:00
Wouter de Jong 2980a680d4 Added special test token and implemented 'real' functional tests 2020-03-08 12:55:54 +01:00
Javier Eguiluz f516829d99 [DX][Testing] Added a loginUser() method to test protected resources 2020-03-07 18:11:03 +01:00
Fabien Potencier dbe37de820 feature #35978 [Messenger] Show message & handler(s) class description in debug:messenger (ogizanagi)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Messenger] Show message & handler(s) class description in debug:messenger

| 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       | N/A <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | N/A

Similar to the `debug:autowiring` command, add the messages & handlers class description to the `debug:messenger` command.

Messenger is a central piece in CQRS applications. Exposing the messages & handlers descriptions in this command is a great way to have a global vision of the covered use-cases (especially if there is a newcomer to the project).

Commits
-------

079efdff08 [Messenger] Show message & handler(s) class description in debug:messenger
2020-03-06 10:57:54 +01:00
Fabien Potencier e44a3f55ad bug #35982 [DI] Fix XmlFileLoader bad error message (przemyslaw-bogusz)
This PR was squashed before being merged into the 3.4 branch.

Discussion
----------

[DI] Fix XmlFileLoader bad error message

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

Commits
-------

be7afc6d85 [DI] Fix XmlFileLoader bad error message
2020-03-06 10:50:45 +01:00
Przemysław Bogusz be7afc6d85 [DI] Fix XmlFileLoader bad error message 2020-03-06 10:50:39 +01:00
Thomas Calvet 1a366bc378 [Form] Handle false as empty value on expanded choices 2020-03-06 10:46:24 +01:00
Thomas Calvet f9f5f8df3e [DoctrineBridge][DoctrineExtractor] Fix wrong guessed type for "json" type 2020-03-06 09:58:06 +01:00
Fabien Potencier ff30b43770 minor #35980 [Messenger] Add ext-redis min version req to tests (ogizanagi)
This PR was merged into the 4.4 branch.

Discussion
----------

[Messenger] Add ext-redis min version req to tests

| Q             | A
| ------------- | ---
| Branch?       | 4.4 <!-- 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

Properly skip the test instead of:

```
Testing src/Symfony/Component/Messenger
E                                                                   1 / 1 (100%)

Time: 597 ms, Memory: 16.00 MB

There was 1 error:

1) Symfony\Component\Messenger\Tests\Transport\RedisExt\RedisTransportFactoryTest::testCreateTransport
Symfony\Component\Messenger\Exception\LogicException: The redis transport requires php-redis 4.3.0 or higher.
```

Commits
-------

31f8990194 [Messenger] Add ext-redis min version req to tests
2020-03-05 16:51:29 +01:00
Fabien Potencier b470af1d1b minor #35970 [VarDumper] DumpServer: log whenever a payload is received (ogizanagi)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[VarDumper] DumpServer: log whenever a payload is received

| 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       | N/A <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | N/A <!-- required for new features -->

Small improvement so you can get a feedback in the console when a dump was received by using `-vv`:

![Capture d’écran 2020-03-05 à 12 02 34](https://user-images.githubusercontent.com/2211145/75975709-4d899d80-5ed9-11ea-942f-e76a62d82218.png)

Commits
-------

7cfc3ced9d [VarDumper] DumpServer: log whenever a payload is received
2020-03-05 16:36:45 +01:00
Maxime Steinhausser 31f8990194 [Messenger] Add ext-redis min version req to tests 2020-03-05 16:34:25 +01:00
Maxime Steinhausser 079efdff08 [Messenger] Show message & handler(s) class description in debug:messenger 2020-03-05 16:02:15 +01:00
Robin Chalas 45c4ffaa59 feature #35960 [Security/Http] Hash Persistent RememberMe token (guillbdx)
This PR was squashed before being merged into the 5.1-dev branch (closes #35960).

Discussion
----------

[Security/Http] Hash Persistent RememberMe token

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | Fix #27910
| License       | MIT
| Doc PR        | Not sure this enhancement needs documentation

The purpose of this PR is to enhance the Remember Me persistent token feature: instead of storing cleared token value in DB, the values will be hashed.
To make sure that existing remember me cookies will keep being valid after this change, we prefix the new token values with 'hash_'. In case the token value doesn't match this prefix, we keep validating it the old way.

Commits
-------

e2425b9ece [Security/Http] Hash Persistent RememberMe token
2020-03-05 15:13:50 +01:00
Guillaume Pédelagrabe e2425b9ece [Security/Http] Hash Persistent RememberMe token 2020-03-05 15:13:42 +01:00
Nicolas Grekas 3801ddce5c bug #35957 [DI] ignore extra tags added by autoconfiguration in PriorityTaggedServiceTrait (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[DI] ignore extra tags added by autoconfiguration in PriorityTaggedServiceTrait

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

Commits
-------

09770aa930 [DI] ignore extra tags added by autoconfiguration in PriorityTaggedServiceTrait
2020-03-05 14:50:44 +01:00
Fabien Potencier 1647cbdb83 minor #35962 [DI] fix dumping errored definitions (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[DI] fix dumping errored definitions

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

Best reviewed [ignoring whitespaces](https://github.com/symfony/symfony/pull/35962/files?w=1).

Commits
-------

8179928336 [DI] fix dumping errored definitions
2020-03-05 12:37:43 +01:00
Fabien Potencier f37dfa171a minor #35963 Add new packages on the link script (maxhelias)
This PR was merged into the 4.4 branch.

Discussion
----------

Add new packages on the link script

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

Add the support of the new package on the link script

Commits
-------

2a2bb66ff2 Add new packages on the link script
2020-03-05 12:36:22 +01:00
Fabien Potencier bd0bf5240f minor #35958 improve PlaintextPasswordEncoder docBlock summary (jrushlow)
This PR was squashed before being merged into the 3.4 branch.

Discussion
----------

improve PlaintextPasswordEncoder docBlock summary

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

Updates class summary as suggested in tkt #35927 & pr #35929 to suggest the encoder is for test usage.

Commits
-------

622facfe94 Tweak message
a56d262639 improve PlaintextPasswordEncoder docBlock summary
2020-03-05 12:34:40 +01:00
Fabien Potencier 622facfe94 Tweak message 2020-03-05 12:34:29 +01:00
Jesse Rushlow a56d262639 improve PlaintextPasswordEncoder docBlock summary 2020-03-05 12:33:58 +01:00
Fabien Potencier 0ad2fdf6c5 minor #35969 [Validator] Add two missing arabe translations (Reda DAOUDI)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] Add two missing arabe translations

| Q             | A
| ------------- | ---
| Branch?       | 3.4 <!-- 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       |
| License       | MIT
| Doc PR        |

Add two arabe translations for Validator's constraint violation messages

Commits
-------

9cc8d39c39 [Validator] Add two missing translations for the Arabic (ar) locale
2020-03-05 12:25:50 +01:00
Maxime Steinhausser 7cfc3ced9d [VarDumper] DumpServer: log whenever a payload is received 2020-03-05 11:59:11 +01:00
Fabien Potencier 600b2b54ec minor #35966 Use some PHP 5.4 constants unconditionally (fancyweb)
This PR was merged into the 3.4 branch.

Discussion
----------

Use some PHP 5.4 constants unconditionally

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

Since we are PHP >= 5.5.9 only, we can use those constants unconditionally.

Commits
-------

0caf947924 Use some PHP 5.4 constants unconditionally
2020-03-05 11:58:12 +01:00
Reda DAOUDI 9cc8d39c39 [Validator] Add two missing translations for the Arabic (ar) locale 2020-03-05 11:31:37 +01:00
Thomas Calvet 0caf947924 Use some PHP 5.4 constants unconditionally 2020-03-05 10:39:55 +01:00
Maxime Helias 2a2bb66ff2 Add new packages on the link script 2020-03-04 17:45:35 +01:00
Nicolas Grekas 8179928336 [DI] fix dumping errored definitions 2020-03-04 16:44:30 +01:00
Nicolas Grekas 09770aa930 [DI] ignore extra tags added by autoconfiguration in PriorityTaggedServiceTrait 2020-03-04 15:14:33 +01:00
Fabien Potencier 4103a6ebd2 minor #35946 [DI] relax test to ignore changes to error message in master (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[DI] relax test to ignore changes to error message in master

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

Required to make https://github.com/symfony/symfony/pull/35945 green (check https://travis-ci.org/symfony/symfony/jobs/657931002#L4720)

Commits
-------

bf5d25c838 [DI] relax test to ignore changes to error message in master
2020-03-04 10:07:10 +01:00
Nicolas Grekas bf5d25c838 [DI] relax test to ignore changes to error message in master 2020-03-04 08:10:40 +01:00
Fabien Potencier 7c90c8ba84 minor #35948 [String] move symfony/translation-contracts to require-dev (nicolas-grekas)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[String] move symfony/translation-contracts to require-dev

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

Since it's needed only if `AsciiSlugger` is used.
Surprisingly, the code in `FrameworkExtension` deals with this as if the dep was already optional:
210ea2202b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php (L217-L220)

Commits
-------

aea80edc78 [String] move symfony/translation-contracts to require-dev
2020-03-04 06:35:35 +01:00
Nicolas Grekas aea80edc78 [String] move symfony/translation-contracts to require-dev 2020-03-03 22:05:19 +01:00
Fabien Potencier 3a8da96b74 bug #35937 Revert "bug symfony#28179 [DomCrawler] Skip disabled fields processing in Form" (dmaicher)
This PR was merged into the 3.4 branch.

Discussion
----------

Revert "bug symfony#28179 [DomCrawler] Skip disabled fields processing in Form"

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

Reverts https://github.com/symfony/symfony/pull/34059

See https://github.com/symfony/symfony/issues/35923

Commits
-------

af17f5a9ac Revert "bug symfony#28179 [DomCrawler] Skip disabled fields processing in Form"
2020-03-03 14:53:42 +01:00
Fabien Potencier 210ea2202b minor #35935 [String] fix failing test on PHP 8 (nicolas-grekas)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[String] fix failing test on PHP 8

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

`__toString()` must be public in PHP 8.

Commits
-------

0a2f7b2ceb [String] fix failing test on PHP 8
2020-03-03 14:52:45 +01:00
David Maicher af17f5a9ac Revert "bug symfony#28179 [DomCrawler] Skip disabled fields processing in Form"
This reverts commit c73b042044.
2020-03-03 14:44:39 +01:00
Nicolas Grekas 0a2f7b2ceb [String] fix failing test on PHP 8 2020-03-03 11:04:25 +01:00
Nicolas Grekas d246e941ab minor #35926 [Routing] Fix some wrong localized routes tests (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

[Routing] Fix some wrong localized routes tests

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

~~Since https://github.com/symfony/symfony/pull/35855, the `_locale` path param is directly substituted so those tests are not valid cases anymore. Instead, the path directly contain the right locale.~~ Actually, the compilation is done after, so instead we need to set the new requirement in all tests to reflect the "reality".

https://github.com/symfony/symfony/pull/35855 also causes a BC break on one case:
```php
$compiledUrlGenerator->generate('foo.fr', ['_locale' => 'en']))
```

Previously, the generated route would be the `/en/fourchette`. Now that the locale is hardcoded in the route path, it will always be `/fr/fourchette`. I changed `foo` to relevant words because it is easier to understand like that.

Commits
-------

99ae55ff1a [Routing] Fix some wrong localized routes tests
2020-03-02 18:19:11 +01:00
Nicolas Grekas afdd507225 bug #35928 [Routing] Prevent localized routes _locale default & requirement from being overridden (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

[Routing] Prevent localized routes _locale default & requirement from being overridden

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

When we have configured a localized route, its default _locale and _locale requirement should not be modified to ensure it works as expected.

Commits
-------

096dc0aeef [Routing] Prevent localized routes _locale default & requirement from being overridden
2020-03-02 18:17:59 +01:00
Thomas Calvet 99ae55ff1a [Routing] Fix some wrong localized routes tests 2020-03-02 17:31:03 +01:00
Thomas Calvet 096dc0aeef [Routing] Prevent localized routes _locale default & requirement from being overridden 2020-03-02 17:08:48 +01:00
Fabien Potencier f632b76824 feature #35115 [HttpClient] Add portable HTTP/2 implementation based on Amp's HTTP client (nicolas-grekas)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[HttpClient] Add portable HTTP/2 implementation based on Amp's HTTP client

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

This PR provides an `AmpHttpClient`, which is an adapter between [`amphp/http-client`](https://github.com/amphp/http-client) and `symfony/http-client-contracts`.

~This is an early experiment for now, but it works already on the happy path:~ I have a local h2-intensive script, and while it's slower than CurlHttpClient, this performs quite well!

This could provide a portable implementation of HTTP/2 \o/

/cc @kelunik FYI

Todo:
- [x] async request/response
- [x] streaming and multiplexing
- [x] handle all ssl options
- [x] timers info
- [x] upload/download progress info
- [x] upload/download progress callback
- [x] HTTP proxy support
- [x] streamed upload
- [x] public-key pinning
- [x] peer certificate capturing
- [x] stream casting with `$response->toStream()`
- [x] ~https://github.com/amphp/http-client/pull/241~
- [x] extensive debug info
- [x] HTTP/2 PUSH support
- [x] https://github.com/amphp/http-client/issues/243
- [x] https://github.com/amphp/http-client/issues/242
- [x] https://github.com/amphp/http-client/pull/250
- [x] https://github.com/amphp/http-client/pull/239
- [x] ~https://github.com/kelunik/certificate/pull/2~
- [x] https://github.com/amphp/socket/pull/71
- [x] https://github.com/amphp/http-client/issues/252

Commits
-------

ef113feeb3 [HttpClient] Add portable HTTP/2 implementation based on Amp's HTTP client
2020-03-02 15:21:41 +01:00
Fabien Potencier 2265a5778e bug #35907 [FrameworkBundle] register only existing transport factories (xabbuh)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[FrameworkBundle] register only existing transport factories

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

Commits
-------

24322cffdb register only existing transport factories
2020-03-02 14:31:42 +01:00
Christian Flothmann 24322cffdb register only existing transport factories 2020-03-02 14:23:01 +01:00
Nicolas Grekas ef113feeb3 [HttpClient] Add portable HTTP/2 implementation based on Amp's HTTP client 2020-03-02 14:21:45 +01:00