Commit Graph

42976 Commits

Author SHA1 Message Date
Nicolas Grekas
3ae991049d minor #33042 Disable typehint patch on PHPUnit (jderusse)
This PR was merged into the 4.3 branch.

Discussion
----------

Disable typehint patch on PHPUnit

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

This PR removes the `SYMFONY_PHPUNIT_REMOVE_RETURN_TYPEHINT` patch and adds a `: void` typehint on `setup` and `tearDown` methods in order to be compatible with PHPUnit 8

Commits
-------

a5af6c4cd7 Disable phpunit typehint patch on 4.3 branch
2019-08-08 14:02:35 +02:00
Nicolas Grekas
0abd64bb2b bug #33045 Make HttpClientTestCase compatible with PHPUnit8 (jderusse)
This PR was merged into the 4.3 branch.

Discussion
----------

Make HttpClientTestCase compatible with PHPUnit8

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

the abstract class `HttpClientTestCase` may be extends by end user and execute by both PHPUnit 8 and bellow. Adding a return typehint on it will force all users extending it to add it too and would be a BC Break.

Note. I don't know how to trigger a deprecation here and help user to add it.

Commits
-------

55daf15353 Fix compatibility with PHPUnit 8
2019-08-08 12:04:39 +02:00
Jérémy Derussé
55daf15353
Fix compatibility with PHPUnit 8 2019-08-08 12:03:27 +02:00
Jérémy Derussé
a5af6c4cd7
Disable phpunit typehint patch on 4.3 branch 2019-08-08 11:29:19 +02:00
Nicolas Grekas
c0f416eb9d Merge branch '3.4' into 4.3
* 3.4:
  consistently throw NotSupportException
  [HttpKernel] Clarify error handler restoring process again
  [Intl] fix nullable phpdocs and useless method visibility of internal class
  Resilience against file_get_contents() race conditions.
2019-08-08 11:16:40 +02:00
Nicolas Grekas
d936a707d3 minor #33020 [Intl] fix nullable phpdocs and useless method visibility of internal class (Tobion)
This PR was merged into the 3.4 branch.

Discussion
----------

[Intl] fix nullable phpdocs and useless method visibility of internal class

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

Fix stuff found in #32525

Commits
-------

63b71b5ade [Intl] fix nullable phpdocs and useless method visibility of internal class
2019-08-08 11:00:58 +02:00
Nicolas Grekas
ce09c31993 minor #33016 [HttpKernel] Resilience against file_get_contents() race conditions (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpKernel] Resilience against file_get_contents() race conditions

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

This PR addresses https://github.com/symfony/symfony/pull/33007#discussion_r311589966.

Commits
-------

5892837641 Resilience against file_get_contents() race conditions.
2019-08-08 09:59:56 +02:00
Nicolas Grekas
e48d2c14d9 minor #33031 [HttpKernel] Clarify error handler restoring process again (fancyweb)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpKernel] Clarify error handler restoring process again

| 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/33024
| License       | MIT
| Doc PR        | -

Commits
-------

4ee54f0e84 [HttpKernel] Clarify error handler restoring process again
2019-08-08 09:54:28 +02:00
Nicolas Grekas
854f5d1dee bug #33033 [Lock] consistently throw NotSupportException (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Lock] consistently throw NotSupportException

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

Commits
-------

12b8c942eb consistently throw NotSupportException
2019-08-08 09:53:42 +02:00
Christian Flothmann
12b8c942eb consistently throw NotSupportException 2019-08-08 08:47:22 +02:00
Thomas Calvet
4ee54f0e84 [HttpKernel] Clarify error handler restoring process again 2019-08-08 08:45:40 +02:00
Nicolas Grekas
fda49e699a bug #33022 [HttpClient] Remove CURLOPT_CONNECTTIMEOUT_MS curl opt (lyrixx)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient] Remove CURLOPT_CONNECTTIMEOUT_MS curl opt

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

Commits
-------

e289723aad [HttpClient] Remove CURLOPT_CONNECTTIMEOUT_MS curl opt
2019-08-08 08:39:53 +02:00
Grégoire Pineau
e289723aad [HttpClient] Remove CURLOPT_CONNECTTIMEOUT_MS curl opt 2019-08-08 08:37:38 +02:00
Nicolas Grekas
e8cd106a4b minor #33021 [FrameworkBundle] remove deprecated cache pool argument (xabbuh)
This PR was merged into the 4.3 branch.

Discussion
----------

[FrameworkBundle] remove deprecated cache pool argument

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

3f51a55179 remove deprecated cache pool arguments
2019-08-07 19:19:57 +02:00
Christian Flothmann
3f51a55179 remove deprecated cache pool arguments 2019-08-07 19:11:50 +02:00
Tobias Schultze
63b71b5ade [Intl] fix nullable phpdocs and useless method visibility of internal class 2019-08-07 18:29:13 +02:00
Alexander M. Turek
5892837641 Resilience against file_get_contents() race conditions. 2019-08-07 17:07:08 +02:00
Nicolas Grekas
f3f6b584e4 Merge branch '3.4' into 4.3
* 3.4:
  [FrameworkBundle][Config] Ignore exeptions thrown during reflection classes autoload
2019-08-07 16:08:37 +02:00
Nicolas Grekas
48859fd125 bug #32516 [FrameworkBundle][Config] Ignore exceptions thrown during reflection classes autoload (fancyweb)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle][Config] Ignore exceptions thrown during reflection classes autoload

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/32499 with PHP 7.3+
| License       | MIT
| Doc PR        | -

The behavior when an exception is thrown in a class loader changed in PHP 7.3 (cf https://3v4l.org/OQPk9). That means that the `throwOnRequiredClass` trick that is done in the parent class of these cache warmers (`AbstractPhpFileCacheWarmer`) does not work anymore with PHP7.3+.

Commits
-------

dbd9b75d86 [FrameworkBundle][Config] Ignore exeptions thrown during reflection classes autoload
2019-08-07 16:06:37 +02:00
Nicolas Grekas
1aba480c2d Merge branch '3.4' into 4.3
* 3.4:
  Fix some return type annotations.
2019-08-07 14:28:41 +02:00
Nicolas Grekas
f8a35176da minor #33007 Fix some return type annotations (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

Fix some return type annotations

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

This PR fixed some incorrect return type declarations I discovered while working on #32993.

Commits
-------

0a78dc0f6f Fix some return type annotations.
2019-08-07 14:23:50 +02:00
Alexander M. Turek
0a78dc0f6f Fix some return type annotations. 2019-08-07 14:09:01 +02:00
Nicolas Grekas
b406466221 bug #33010 [TwigBridge] pass translation parameters to the trans filter (xabbuh)
This PR was merged into the 4.3 branch.

Discussion
----------

[TwigBridge] pass translation parameters to the trans filter

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

This was reported by @voltel on the Symfony Slack.

Commits
-------

daac024057 pass translation parameters to the trans filter
2019-08-07 13:55:57 +02:00
Nicolas Grekas
381c995d30 Merge branch '3.4' into 4.3
* 3.4:
  Fix inconsistent return points.
  Fix remaining tests
2019-08-07 13:52:19 +02:00
Nicolas Grekas
b27c9992c7 bug #32981 Fix tests/code for php 7.4 (jderusse)
This PR was merged into the 3.4 branch.

Discussion
----------

Fix tests/code for php 7.4

| 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

Fix remaining tests and deprecation

Commits
-------

05ec8a08b4 Fix remaining tests
2019-08-07 13:49:32 +02:00
Nicolas Grekas
c88d125701 minor #33009 Fix inconsistent return points (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

Fix inconsistent return points

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

This PR fixes some inconsistent return points I've discovered while working on #32993. Adding return types made fixing these inconsistencies necessary, see also [this comment](https://github.com/symfony/symfony/issues/17201#issuecomment-519038719).

Commits
-------

1a83f9beed Fix inconsistent return points.
2019-08-07 13:45:59 +02:00
Alexander M. Turek
1a83f9beed Fix inconsistent return points. 2019-08-07 13:38:48 +02:00
Christian Flothmann
daac024057 pass translation parameters to the trans filter 2019-08-07 13:18:23 +02:00
Fabien Potencier
a3aaaa16e9 bug #32986 [Mime] fixed wrong mimetype (rjwebdev)
This PR was squashed before being merged into the 4.3 branch (closes #32986).

Discussion
----------

[Mime] fixed wrong mimetype

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

When creating a datapart from an odt file (and some other extensions), the explode function for the picked mimetype gives a wrong result since there's no `application/` prefix for the first mimetype of this extension.

In this PR, all mimetypes without a prefix are removed.

Commits
-------

e1722c529a [Mime] fixed wrong mimetype
2019-08-07 12:03:35 +02:00
Ruben Jacobs
e1722c529a [Mime] fixed wrong mimetype 2019-08-07 12:03:27 +02:00
Nicolas Grekas
3cd7726d0d Merge branch '3.4' into 4.3
* 3.4:
  [ProxyManagerBridge] Polyfill for unmaintained version
  SCA: dropped unused mocks, duplicate import and a function alias usage
  [Config] fix test
  Improve fa (persian) translation
2019-08-07 10:30:22 +02:00
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
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
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
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
36466a3ab5 fix merge 2019-08-06 09:38:50 +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
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