Commit Graph

43759 Commits

Author SHA1 Message Date
Nicolas Grekas
41234653d5 bug #32992 [ProxyManagerBridge] Polyfill for unmaintained version (jderusse)
This PR was squashed before being merged into the 3.4 branch (closes #32992).

Discussion
----------

[ProxyManagerBridge] Polyfill for unmaintained version

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

The current implementation of proxy-manager triggers a PHP 7.4 deprecation `ReflectionType::__toString`, and the patch won't be applied to a version prior to 2.5 (see https://github.com/Ocramius/ProxyManager/pull/484) will older version of proxy-manager (2.1 to 2.4 are also compatible with php 7.4).

This PR fixes the implementation of `ProxiedMethodReturnExpression` for version prior to 2.5

Commits
-------

33f722d86e [ProxyManagerBridge] Polyfill for unmaintained version
2019-08-07 10:26:08 +02:00
Jérémy Derussé
33f722d86e [ProxyManagerBridge] Polyfill for unmaintained version 2019-08-07 10:25:59 +02:00
Nicolas Grekas
465da038f7 bug #32989 [HttpClient] Declare $active first to prevent weird issue (Kocal)
This PR was squashed before being merged into the 4.3 branch (closes #32989).

Discussion
----------

[HttpClient] Declare `$active` first to prevent weird issue

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| 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?   | -    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #32833    <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | no

In some undefined cases we can have the following error while using the WebTestCase/CurlHttpClient in PHPUnit:
![Sélection_999(101)](https://user-images.githubusercontent.com/2103975/62543336-0ad9e700-b85e-11e9-8b7f-d5b49e1d2d0d.png)

This is really weird because `$active` is a reference and so it does not need to be declared before, but doing that fixes the issue. (https://github.com/symfony/symfony/issues/32833#issuecomment-518658222)

I can't add tests because we were not able to reproduce the issue...

Commits
-------

ba030f0022 [HttpClient] Declare `$active` first to prevent weird issue
2019-08-07 10:24:47 +02:00
Hugo Alliaume
ba030f0022 [HttpClient] Declare $active first to prevent weird issue 2019-08-07 10:24:40 +02:00
Nicolas Grekas
6d181ffbb6 minor #32977 Remove deprecated assertContains (MarioBlazek)
This PR was squashed before being merged into the 4.3 branch (closes #32977).

Discussion
----------

Remove deprecated assertContains

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

This PR replaces `assertContains()` with `assertStringContainsString()`.

Commits
-------

43acda6cf4 Remove deprecated assertContains
2019-08-07 10:23:13 +02:00
Mario Blažek
43acda6cf4 Remove deprecated assertContains 2019-08-07 10:22:11 +02:00
Nicolas Grekas
dff5a7d531 minor #33005 [HttpClient] fix tests (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient] fix tests

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

Commits
-------

3d6eb4075a [HttpClient] fix tests
2019-08-07 09:42:16 +02:00
Nicolas Grekas
3d6eb4075a [HttpClient] fix tests 2019-08-07 09:35:08 +02:00
Nicolas Grekas
6d2e3eeaa0 minor #32998 SCA: dropped unused mocks, duplicate import and a function alias usage (kalessil)
This PR was squashed before being merged into the 3.4 branch (closes #32998).

Discussion
----------

SCA: dropped unused mocks, duplicate import and a function alias usage

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

Commits
-------

484668fe56 SCA: dropped unused mocks, duplicate import and a function alias usage
2019-08-07 09:23:50 +02:00
Vladimir Reznichenko
484668fe56 SCA: dropped unused mocks, duplicate import and a function alias usage 2019-08-07 09:23:44 +02:00
Fabien Potencier
d94c4b4c6d bug #32963 [Mailer] fix getName() when transport is null (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[Mailer] fix getName() when transport is null

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

Commits
-------

ee4192ebc7 fix getName() when transport is null
2019-08-06 22:00:28 +02:00
Fabien Potencier
4c8034309d bug #32999 Added correct plural for box -> boxes (cinamo)
This PR was merged into the 4.3 branch.

Discussion
----------

Added correct plural for box -> boxes

| Q             | A
| ------------- | ---
| Branch?       | 4.3 <!-- see below -->
| 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 -->
| License       | MIT

The Inflector component's old test asserted that a valid plural for box is 'bocies', but a quick look at the dictionary (https://www.merriam-webster.com/dictionary/box) assures this is not actually the case. This pull request fixes that pluralization.

Commits
-------

56345e1319 Added correct plural for box -> boxes
2019-08-06 21:58:50 +02:00
Gert Wijnalda
56345e1319 Added correct plural for box -> boxes 2019-08-06 20:44:23 +02:00
Thomas Calvet
dbd9b75d86 [FrameworkBundle][Config] Ignore exeptions thrown during reflection classes autoload 2019-08-06 18:40:06 +02:00
Robin Chalas
6723bb9cdf bug #32957 [Console] Check for ErrorHandler classes (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

[Console] Check for ErrorHandler classes

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

Commits
-------

48b358d036 [Console] Check for ErrorHandler classes
2019-08-06 17:45:20 +02:00
Nicolas Grekas
6af3c6bb01 [Config] fix test 2019-08-06 17:37:23 +02:00
Jérémy Derussé
05ec8a08b4
Fix remaining tests 2019-08-06 15:24:37 +02:00
Nicolas Grekas
b59c8654b5 minor #32984 [HttpClient] Relax max duration test assertion (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] Relax max duration test assertion

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

cf https://travis-ci.org/symfony/symfony/jobs/568304532 - It looks like with the curl client, the actual duration can be a little less than the configured max duration. Note that the same test did not fail on the PR...

Commits
-------

3cbb978b00 [HttpClient] Relax max duration test assertion
2019-08-06 14:20:22 +02:00
Nicolas Grekas
b4bb8e833d minor #32982 Ignore ErrorHandler DebugClassLoaderTest class in PHP-CS-Fixer config (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

Ignore ErrorHandler DebugClassLoaderTest class in PHP-CS-Fixer config

| 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        | -

It must be ignored like the `Debug` one.

Commits
-------

ed916a4c42 Ignore ErrorHandler DebugClassLoaderTest class in PHP-CS-Fixer config
2019-08-06 14:19:52 +02:00
Nicolas Grekas
fc8872fca3 minor #32964 add yceruto as code owner of the ErrorRenderer component (yceruto)
This PR was squashed before being merged into the 4.4 branch (closes #32964).

Discussion
----------

add yceruto as code owner of the ErrorRenderer component

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

Commits
-------

df6e73dd2d add yceruto as code owner of the ErrorRenderer component
2019-08-06 14:17:09 +02:00
Yonel Ceruto
df6e73dd2d add yceruto as code owner of the ErrorRenderer component 2019-08-06 14:17:02 +02:00
Thomas Calvet
3cbb978b00 [HttpClient] Relax max duration test assertion 2019-08-06 14:14:26 +02:00
Thomas Calvet
ed916a4c42 Ignore ErrorHandler DebugClassLoaderTest class in PHP-CS-Fixer config 2019-08-06 12:43:51 +02:00
Nicolas Grekas
3498259b12 feature #32807 [HttpClient] add "max_duration" option (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] add "max_duration" option

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

Commits
-------

a4178f1369 [HttpClient] add "max_duration" option
2019-08-06 10:45:25 +02:00
Fabien Potencier
3dab7c9faf minor #32649 [Security] Improve fa (persian) translation (Arman-Hosseini)
This PR was merged into the 3.4 branch.

Discussion
----------

[Security] Improve fa (persian) translation

| Q             | A
| ------------- | ---
| Branch?       | >= 3.4 <!-- see below -->
| 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 | N/A    <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A <!-- 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):
 - 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
-------

4afdfd765d Improve fa (persian) translation
2019-08-06 10:03:48 +02:00
Nicolas Grekas
405c64c16d Merge branch '4.3' into 4.4
* 4.3:
  fix merge
2019-08-06 09:39:58 +02:00
Nicolas Grekas
36466a3ab5 fix merge 2019-08-06 09:38:50 +02:00
Christian Flothmann
2070e30018 feature #31546 [Dotenv] Use default value when referenced variable is not set (j92)
This PR was squashed before being merged into the 4.4 branch (closes #31546).

Discussion
----------

[Dotenv] Use default value when referenced variable is not set

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | yes <!-- 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        | https://github.com/symfony/symfony-docs/pull/11956 <!-- required for new features -->

In bash you have the option to define a default variable like this:
```bash
FOO=${VARIABLE:-default}
```

When VARIABLE is not set
```bash
FOO=${VARIABLE:-default} #FOO=default
```

When VARIABLE is set:
```bash
VARIABLE=test
FOO=${VARIABLE:-default} #FOO=test
```

If others find this also a good idea, I will write documentation and add the Doc PR. But first I would like some feedback to check if anyone agrees with this feature.

Commits
-------

790dbad149 [Dotenv] Use default value when referenced variable is not set
2019-08-06 09:27:26 +02:00
Joost van Driel
790dbad149 [Dotenv] Use default value when referenced variable is not set 2019-08-06 09:27:04 +02:00
Nicolas Grekas
94a0719bfc minor #32974 "An instance of X" phpdocs removal (fabpot)
This PR was merged into the 4.4 branch.

Discussion
----------

"An instance of X" phpdocs removal

| 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        | -

That's #32973 on 4.4 :P

Commits
-------

7a44ed6544 removed unneeded phpdocs
2019-08-06 09:13:58 +02:00
Nicolas Grekas
34e86761f4 Merge branch '4.3' into 4.4
* 4.3:
  bump phpunit-bridge cache-id
  Use assertStringContainsString when needed
  Use assert assertContainsEquals when needed
  Use assertEqualsWithDelta when required
2019-08-06 09:11:23 +02:00
Nicolas Grekas
5f96c0dee4 Merge branch '3.4' into 4.3
* 3.4:
  bump phpunit-bridge cache-id
  Use assertStringContainsString when needed
  Use assert assertContainsEquals when needed
  Use assertEqualsWithDelta when required
2019-08-06 09:11:09 +02:00
Christian Flothmann
ee4192ebc7 fix getName() when transport is null 2019-08-06 09:00:18 +02:00
Nicolas Grekas
87c8561c00 minor #32968 Use assertEqualsWithDelta when needed (jderusse)
This PR was merged into the 3.4 branch.

Discussion
----------

Use assertEqualsWithDelta when needed

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

This PR replaces deprecated paramèter `$delta` of methods `assertEquals` by the dedicated method `assertEqualsWithDelta`

Commits
-------

3a0a901fdb Use assertEqualsWithDelta when required
2019-08-06 08:53:06 +02:00
Nicolas Grekas
443e923c7b minor #32969 Use assertContainsEquals when needed (jderusse)
This PR was merged into the 3.4 branch.

Discussion
----------

Use assertContainsEquals when needed

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

This PR replaces deprecated paramèter `$checkForObjectIdentity` of methods `assertContains` by the dedicated method `assertContainsEquals`

Commits
-------

f842e59685 Use assert assertContainsEquals when needed
2019-08-06 08:52:18 +02:00
Nicolas Grekas
08573a1830 minor #32971 Use assertStringContainsString when needed (jderusse)
This PR was merged into the 3.4 branch.

Discussion
----------

Use assertStringContainsString when needed

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

This PR replaces deprecated assertContains to comparre string by the dedicated method `assertStringContainsString`

Commits
-------

058ef39bae Use assertStringContainsString when needed
2019-08-06 08:51:27 +02:00
Nicolas Grekas
611f57c456 bump phpunit-bridge cache-id 2019-08-06 08:41:45 +02:00
Fabien Potencier
7a44ed6544 removed unneeded phpdocs 2019-08-06 08:19:29 +02:00
Jérémy Derussé
058ef39bae
Use assertStringContainsString when needed 2019-08-06 08:15:37 +02:00
Fabien Potencier
c04fc48429 bug #32972 [PHPUnitBridge] Fix name of logical classes (jderusse)
This PR was merged into the 4.4 branch.

Discussion
----------

[PHPUnitBridge] Fix name of logical classes

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

In PHPUnit, class name of logical constaint (and, or, not, ...) does not respect the same pattern than classes

Commits
-------

e2c847fbbb Fix name of logical classes
2019-08-06 07:25:36 +02:00
Jérémy Derussé
e2c847fbbb
Fix name of logical classes 2019-08-06 01:58:57 +02:00
Jérémy Derussé
f842e59685
Use assert assertContainsEquals when needed 2019-08-06 01:50:02 +02:00
Jérémy Derussé
3a0a901fdb
Use assertEqualsWithDelta when required 2019-08-05 23:35:23 +02:00
Thomas Calvet
48b358d036 [Console] Check for ErrorHandler classes 2019-08-05 19:43:14 +02:00
Fabien Potencier
233562f034 bug #32958 [Mailer] Make the message logger permanent (fabpot)
This PR was merged into the 4.4 branch.

Discussion
----------

[Mailer] Make the message logger permanent

| 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

<!--
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):
 - 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
-------

4aeca4ec9c [Mailer] made the message logger permanent
2019-08-05 19:07:06 +02:00
Fabien Potencier
4aeca4ec9c [Mailer] made the message logger permanent 2019-08-05 18:46:42 +02:00
Fabien Potencier
6205acfe8d feature #32930 [Mailer][Mime] Add PHPUnit constraints and assertions for the Mailer (fabpot)
This PR was merged into the 4.4 branch.

Discussion
----------

[Mailer][Mime] Add PHPUnit constraints and assertions for the Mailer

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | yes
| 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 | refs #31592, closes #32409, closes #31947, closes #31747, closes #30850
| License       | MIT
| Doc PR        | n/a

This PR introduces PHPUnit constraints and assertions to ease testing emails in functional tests:

```php
<?php

namespace App\Tests;

use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;

class MailerAssertionsTraitsTest extends WebTestCase
{
    public function testSomething()
    {
        $client = static::createClient();
        $client->request('GET', '/');

        $this->assertEmailCount(2);
        $this->assertEmailIsQueued($this->getMailerEvent(0));

        $email = $this->getMailerMessage(0);
        $this->assertEmailHasHeader($email, 'To');
        $this->assertEmailHeaderSame($email, 'To', 'fabien@symfony.com');
        $this->assertEmailTextBodyContains($email, 'Bar');
        $this->assertEmailHtmlBodyContains($email, 'Foo');
        $this->assertEmailAttachementCount($email, 1);
    }
}
```

Commits
-------

23f237b92f added PHPUnit constraints and assertions for the Mailer
2019-08-05 18:31:53 +02:00
Fabien Potencier
23f237b92f added PHPUnit constraints and assertions for the Mailer 2019-08-05 18:16:42 +02:00
Fabien Potencier
fdaf0e0cf4 feature #32912 [Mailer] Add support for the profiler (fabpot)
This PR was merged into the 4.4 branch.

Discussion
----------

[Mailer] Add support for the profiler

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | yes
| 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 | closes #31592
| License       | MIT
| Doc PR        | n/a

Web profiler for the Mailer.

Commits
-------

f152314e28 [Mailer] added support for the profiler
2019-08-05 17:51:23 +02:00
Nicolas Grekas
38143c604f Merge branch '4.3' into 4.4
* 4.3:
  [Form] Fix inconsistencies
  Use Phpunit FQDN in tests comments
2019-08-05 16:24:36 +02:00