Commit Graph

35871 Commits

Author SHA1 Message Date
Nicolas Grekas 9d472c715f minor #33482 fix tests mocking final events (Tobion)
This PR was merged into the 4.4 branch.

Discussion
----------

fix tests mocking final events

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #...   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        |

Fix tests in 4.4 extracted from #33297

Commits
-------

637461fd51 fix tests mocking final events
2019-09-06 17:55:53 +02:00
Nicolas Grekas 654b8037f1 minor #33492 [MonologBridge] Bump min version for monolog ^1.25 and drop dead code (lyrixx)
This PR was merged into the 4.4 branch.

Discussion
----------

[MonologBridge] Bump min version for monolog ^1.25 and drop dead code

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

Commits
-------

1e19c65b67 [MonologBridge] Bump min version for monolog ^1.25 and drop dead code
2019-09-06 17:53:25 +02:00
Nicolas Grekas 108a799512 minor #33490 [Bridge/Twig] use tty group on testLintDefaultPaths (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[Bridge/Twig] use tty group on testLintDefaultPaths

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/33446#issuecomment-528811376
| License       | MIT
| Doc PR        | -

Note that I still think we should deprecate reading from STDIN when not explicitly asked for, as explained in https://github.com/symfony/symfony/pull/33446#issuecomment-528276646

Commits
-------

3c59bb5c93 [Bridge/Twig] use tty group on testLintDefaultPaths
2019-09-06 17:52:51 +02:00
Nicolas Grekas 9dca229573 [Mailer] fix deps=low 2019-09-06 17:26:18 +02:00
Nicolas Grekas 388f28f726 Merge branch '4.3' into 4.4
* 4.3:
  cs fix
2019-09-06 16:52:15 +02:00
Nicolas Grekas 87ec83c00f Merge branch '3.4' into 4.3
* 3.4:
  cs fix
2019-09-06 16:50:57 +02:00
Nicolas Grekas fbeef96d66 cs fix 2019-09-06 16:49:07 +02:00
Fabien Potencier b58876c5b3 feature #33471 [Mailer] Check email validity before opening an SMTP connection (fabpot)
This PR was merged into the 4.4 branch.

Discussion
----------

[Mailer] Check email validity before opening an SMTP connection

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes-ish
| New feature?  | yes
| BC breaks?    | no-ish
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

When using an SMTP server to send emails, the connection to the SMTP server happens before being sure that the email to sent is valid. That does not happen with HTTP transports.

This pull request implements a new method to be sure that we don't connect to the SMTP server if the email is not valid.

Commits
-------

dc376f52a5 [Mailer] Check email validity before opening an SMTP connection
2019-09-06 16:42:40 +02:00
Nicolas Grekas a86b8cfd1a Merge branch '4.3' into 4.4
* 4.3:
  [FrameworkBundle] Fixed suggested package for missing server:dump command
  Add BC break note to UPGRADE-4.2.md
2019-09-06 16:33:21 +02:00
Nicolas Grekas cfed7d7970 typo 2019-09-06 16:32:32 +02:00
Grégoire Pineau 1e19c65b67 [MonologBridge] Bump min version for monolog ^1.25 and drop dead code 2019-09-06 16:22:32 +02:00
Nicolas Grekas 7a1545cc8f minor #33491 [Debug] disable new DebugClassLoader when testing the legacy one (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[Debug] disable new DebugClassLoader when testing the legacy one

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Commits
-------

25a683bbeb [Debug] disable new DebugClassLoader when testing the legacy one
2019-09-06 16:08:36 +02:00
Nicolas Grekas 25a683bbeb [Debug] disable new DebugClassLoader when testing the legacy one 2019-09-06 16:02:48 +02:00
Fabien Potencier dc376f52a5 [Mailer] Check email validity before opening an SMTP connection 2019-09-06 15:51:50 +02:00
Oleg Andreyev 4f4c30d59e - updated AbstractToken to compare Roles
- Updated isEqualTo method to match roles as default User implements EquatableInterface
- added test case
- bumped symfony/security-core to 4.4
2019-09-06 15:59:50 +03:00
Fabien Potencier c81fc3a079 bug #33469 [FrameworkBundle] Fixed suggested package for missing server:dump command (lyrixx)
This PR was merged into the 4.3 branch.

Discussion
----------

[FrameworkBundle] Fixed suggested package for missing server:dump command

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #33457
| License       | MIT
| Doc PR        | -

Commits
-------

4017477eed [FrameworkBundle] Fixed suggested package for missing server:dump command
2019-09-06 14:26:40 +02:00
Grégoire Pineau 4017477eed [FrameworkBundle] Fixed suggested package for missing server:dump command 2019-09-06 14:20:26 +02:00
Nicolas Grekas 3c59bb5c93 [Bridge/Twig] use tty group on testLintDefaultPaths 2019-09-06 13:06:38 +02:00
Nicolas Grekas cab412f0cb Merge branch '4.3' into HEAD
* 4.3:
  typos bis
2019-09-06 12:29:12 +02:00
Nicolas Grekas 7ba77ecc0d typos bis 2019-09-06 12:24:45 +02:00
Nicolas Grekas 4234bc8ced Merge branch '4.3' into 4.4
* 4.3:
  typos
2019-09-06 12:15:53 +02:00
Nicolas Grekas 7d1286884b typos 2019-09-06 12:15:48 +02:00
Nicolas Grekas 28d331bb58 Merge branch '4.3' into 4.4
* 4.3:
  Fix more bad tests
  Fix test fixtures with deprecated method signatures.
  Fix 4.3 tests forward compat
  [Messenger] fix empty amqp body returned as false
  Fix routing cache broken when using generator_class
2019-09-06 12:03:11 +02:00
Nicolas Grekas 54a514fc1d bug #31964 [Router] routing cache crash when using generator_class (dFayet)
This PR was merged into the 4.3 branch.

Discussion
----------

[Router] routing cache crash when using generator_class

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #31807
| License       | MIT

Since #28865 the Router use, by default, new generator, matcher, and dumpers.
This leads to crash when the Router use a custom generator, or matcher based on the old ones.

Commits
-------

a5b46e5390 Fix routing cache broken when using generator_class
2019-09-06 12:00:20 +02:00
Nicolas Grekas 1b835d1249 minor #33484 Fix test fixtures with deprecated method signatures (derrabus, nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

Fix test fixtures with deprecated method signatures

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #33483 (partly)
| License       | MIT
| Doc PR        | N/A

This PR upgrades two fixtures that implemented deprecated method signatures. As far as I can tell, they are used in tests that do not specifically test legacy behavior, so the fixtures should be up to date. Currently, these fixtures cause failing tests on the 4.4 branch.

Commits
-------

cc3e3d54ea Fix more bad tests
592aacff6f Fix test fixtures with deprecated method signatures.
2019-09-06 11:53:27 +02:00
Nicolas Grekas 2feae7bebb minor #33479 [SecurityBundle] Fix 4.3 tests forward compat (yceruto)
This PR was merged into the 4.3 branch.

Discussion
----------

[SecurityBundle] Fix 4.3 tests forward compat

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/33478
| License       | MIT
| Doc PR        | -

Commits
-------

f092331eb1 Fix 4.3 tests forward compat
2019-09-06 11:49:53 +02:00
Nicolas Grekas cc3e3d54ea Fix more bad tests 2019-09-06 11:34:03 +02:00
Alexander M. Turek 592aacff6f Fix test fixtures with deprecated method signatures. 2019-09-06 00:33:19 +02:00
Tobias Schultze 637461fd51 fix tests mocking final events 2019-09-05 22:36:38 +02:00
Yonel Ceruto f092331eb1 Fix 4.3 tests forward compat 2019-09-05 14:00:30 -04:00
Tobias Schultze ee5cbe3658 [Messenger] fix empty amqp body returned as false 2019-09-05 18:44:17 +02:00
Alexander M. Turek 248f0827c7 [Mailer] Added messenger to dev dependencies. 2019-09-05 17:38:24 +02:00
Alexander M. Turek 5bf8ccae17 [Validator] Update "suggest" section in composer.json. 2019-09-05 15:19:43 +02:00
Alexander M. Turek 0b08040459 [Validator] Deprecated CacheInterface in favor of PSR-6. 2019-09-05 14:29:38 +02:00
Fabien Potencier b7371ea5c6 feature #33271 Added new ErrorController + Preview and enabling there the error renderer mechanism (yceruto)
This PR was merged into the 4.4 branch.

Discussion
----------

Added new ErrorController + Preview and enabling there the error renderer mechanism

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes (deps=high failure is normal)
| Fixed tickets | -
| License       | MIT
| Doc PR        | TODO

After deprecating the `ExceptionController` in TwigBundle (refs https://github.com/symfony/symfony/pull/31398) the `twig.exception_controller` config key becomes useless as feature provided by TwigBundle, while the preview controller is taking more relevance for the error renderer mechanish.

**Proposal**
 * Deprecate the `twig.exception_controller` config key in favor of `framework.error_controller` with default `ErrorController` that activates the error renderer mechanism through the current `ExceptionListener`, meaning also that `DebugHandlersListener::onKernelException` method becomes useless too.
 * Deprecate the `PreviewErrorController` from TwigBundle in favor of similar in FrameworkBundle.

So you no longer need to install TwigBundle to create a custom error controller or check the preview output of an error renderer (included `TwigHtmlErrorRenderer`).

Btw this would fix https://github.com/symfony/symfony/pull/31398#issuecomment-490081769, removing here workaround in SecurityBundle.

TODO:
- [x] Update CHANGELOG & UPGRADE files
- [x] Add tests

WDYT?

Commits
-------

b79532ab0e Add ErrorController to preview and render errors
2019-09-05 13:15:04 +02:00
Fabien Potencier 7a9c5da1de minor #33463 [Mailer] Fix an error message (fabpot)
This PR was merged into the 4.4 branch.

Discussion
----------

[Mailer] Fix an error message

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

Now  that the host is not the name anymore, the error message when not having a host is wrong.

Commits
-------

60bb1c0ddc [Mailer] Fix an error message
2019-09-05 10:11:06 +02:00
Fabien Potencier f0c3c47a07 Fix wrong namespace 2019-09-05 05:08:57 +02:00
Fabien Potencier b2ca530d82 [Mailer] Fix typo 2019-09-05 03:35:53 +02:00
Fabien Potencier 60bb1c0ddc [Mailer] Fix an error message 2019-09-05 03:13:57 +02:00
Fabien Potencier 3e8a726c41 Merge branch '4.3' into 4.4
* 4.3:
  maintain sender/recipient name in SMTP envelopes
  Fix #32148 TransportException was not thrown
2019-09-04 12:09:07 +02:00
Christian Flothmann 46ed0e84cd maintain sender/recipient name in SMTP envelopes 2019-09-04 11:58:50 +02:00
Fabien Potencier c6d56de86d [Mailer] Improve an exception when trying to send a RawMessage without an Envelope 2019-09-04 08:32:49 +02:00
Fabien Potencier 9407c6b6b0 bug #33449 Fix gmail relay (Beno!t POLASZEK)
This PR was merged into the 4.3 branch.

Discussion
----------

Fix gmail relay

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #32148
| License       | MIT

This tiny PR fixes #32148 by removing the emission of a notice which prevented a `TransportException` to be thrown when something wrong occured.

Commits
-------

6c90e08368 Fix #32148 TransportException was not thrown
2019-09-04 08:06:43 +02:00
Nicolas Grekas b0abc10617 Merge branch '4.3' into 4.4
* 4.3:
  [HttpClient] Fix a bug preventing Server Pushes to be handled properly
  [HttpClient] fix support for 103 Early Hints and other informational status codes
  [DI] fix failure
  [Validator] Add ConstraintValidator::formatValue() tests
  [HttpClient] improve handling of HTTP/2 PUSH
  Fix #33427
  [Validator] Only handle numeric values in DivisibleBy
  [Validator] Sync string to date behavior and throw a better exception
  Check phpunit configuration for listeners
  [DI] fix support for "!tagged_locator foo"
2019-09-03 23:44:11 +02:00
Nicolas Grekas 29355c059c bug #33391 [HttpClient] fix support for 103 Early Hints and other informational status codes (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient] fix support for 103 Early Hints and other informational status codes

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

I learned quite recently how 1xx status codes work in HTTP 1.1 when I discovered the [103 Early Hint](https://evertpot.com/http/103-early-hints) status code from [RFC8297](https://tools.ietf.org/html/rfc8297)

This PR fixes support for them by adding a new `getInformationalStatus()` method on `ChunkInterface`. This means that you can now know about 1xx status code by using the `$client->stream()` method:

```php

$response = $client->request('GET', '...');

foreach ($client->stream($response) as $chunk) {
    [$code, $headers] = $chunk->getInformationalStatus();
    if (103 === $code) {
        // $headers['link'] contains the early hints defined in RFC8297
    }

    // ...
}
```

Commits
-------

34275bba1c [HttpClient] fix support for 103 Early Hints and other informational status codes
2019-09-03 23:38:33 +02:00
Nicolas Grekas 200281db40 Merge branch '3.4' into 4.3
* 3.4:
  [Validator] Add ConstraintValidator::formatValue() tests
  [Validator] Sync string to date behavior and throw a better exception
  Check phpunit configuration for listeners
2019-09-03 23:37:38 +02:00
Kévin Dunglas e1fbaeb65c
[HttpClient] Fix a bug preventing Server Pushes to be handled properly 2019-09-03 23:26:51 +02:00
Nicolas Grekas 34275bba1c [HttpClient] fix support for 103 Early Hints and other informational status codes 2019-09-03 23:21:26 +02:00
Nicolas Grekas 0f434134d6 fix typo 2019-09-03 22:36:28 +02:00
Beno!t POLASZEK 6c90e08368 Fix #32148 TransportException was not thrown 2019-09-03 22:05:27 +02:00