Commit Graph

43047 Commits

Author SHA1 Message Date
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
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
Jérémy Derussé
058ef39bae
Use assertStringContainsString when needed 2019-08-06 08:15:37 +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
Nicolas Grekas
ccb3a4c2d5 Merge branch '3.4' into 4.3
* 3.4:
  [Form] Fix inconsistencies
  Use Phpunit FQDN in tests comments
2019-08-05 16:23:38 +02:00
Nicolas Grekas
1c8b067c17 minor #32954 Use PHPUnit short class name in tests comments (jderusse)
This PR was merged into the 3.4 branch.

Discussion
----------

Use PHPUnit short class name in tests comments

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

Commits
-------

92bd9ec4b7 Use Phpunit FQDN in tests comments
2019-08-05 16:22:00 +02:00
Nicolas Grekas
6dfeeb5593 minor #32935 [Form] Fix inconsistencies (vudaltsov)
This PR was squashed before being merged into the 3.4 branch (closes #32935).

Discussion
----------

[Form] Fix inconsistencies

| 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

- ~~Use `@inheritdoc` in `Button` and `ButtonBuilder` where the method does satisfy the contract.~~
- ~~Add `This method should not be invoked` in all unsupported methods in `Button` and `ButtonBuilder` for consistency.~~
- ~~Fix the misused `idempotent` term in implementations of the `getFormConfig` method. It is wrong in the sense that the method does not always return the same result. You can `setAttribute` for instance and `getFormConfig` will return a different config object.~~
- ~~Add `if ($this->locked)` checks in the supported mutators.~~
- ~~Fix the arguments contract in the `ChoiceListFactoryInterface` — now it supports `PropertyPathInterface` explicitly. The downside of it — breaking LSP in the `DefaultChoiceListFactory`.~~
- Fix the `$label` phpdoc of the `ChoiceView` (arised in https://github.com/symfony/symfony/pull/32237).
- Use `PropertyPathInterface` instead of `PropertyPath` in `PropertyAccessDecorator` of the choice factory.
- Fix `ArrayChoiceList::flatten` type hints.

These changes are debatable, so feel free to correct me if I am wrong at some point.

Ping @xabbuh , @HeahDude , @yceruto , @nicolas-grekas

Commits
-------

360711ce4e [Form] Fix inconsistencies
2019-08-05 16:17:43 +02:00
Valentin Udaltsov
360711ce4e [Form] Fix inconsistencies 2019-08-05 16:17:38 +02:00
Jérémy Derussé
92bd9ec4b7
Use Phpunit FQDN in tests comments 2019-08-05 16:11:35 +02:00
Nicolas Grekas
d4df6cfd8d Merge branch '3.4' into 4.3
* 3.4:
  Minor fixes
  Use namespaced Phpunit classes
  [Form] remove leftover int child phpdoc
  Support DateTimeInterface in IntlDateFormatter::format
  [PhpUnitBridge] fixed PHPUnit 8.3 compatibility: method handleError was renamed to __invoke
  Use PHPunit assertion
2019-08-05 15:52:12 +02:00
Nicolas Grekas
b1312781e2 Minor fixes 2019-08-05 15:40:23 +02:00
Nicolas Grekas
3a185e2519 minor #32948 [HttpClient] Minor fixes (fancyweb)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient] Minor fixes

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

Commits
-------

356341bc19 [HttpClient] Minor fixes
2019-08-05 15:17:38 +02:00
Nicolas Grekas
b5e99f3b65 bug #32933 [PhpUnitBridge] fixed PHPUnit 8.3 compatibility: method handleError was renamed to __invoke (karser)
This PR was merged into the 3.4 branch.

Discussion
----------

[PhpUnitBridge] fixed PHPUnit 8.3 compatibility: method handleError was renamed to __invoke

| 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?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #32879   <!-- #-prefixed issue number(s), if any -->
| License       | MIT

The PHPUnit method  [handleError](https://github.com/sebastianbergmann/phpunit/blob/8.2.5/src/Util/ErrorHandler.php#L38) was renamed to [__invoke](https://github.com/sebastianbergmann/phpunit/blob/8.3/src/Util/ErrorHandler.php#L71) in v8.3.

So we should check in Symfony [DeprecationErrorHandler](https://github.com/symfony/symfony/blob/v4.3.3/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php) if method `handleError` exists, otherwise call `__invoke`

It works with phpunit v8.2.5 and 8.3.2.
The PHPUnit handler is called when I trigger some error, e.g `iconv('fdsfs', 'fsdfds', '');`

Commits
-------

0c9539fdb4 [PhpUnitBridge] fixed PHPUnit 8.3 compatibility: method handleError was renamed to __invoke
2019-08-05 15:16:20 +02:00
Nicolas Grekas
f38f6e72eb bug #32947 [Intl] Support DateTimeInterface in IntlDateFormatter::format (pierredup)
This PR was merged into the 3.4 branch.

Discussion
----------

[Intl] Support DateTimeInterface in IntlDateFormatter::format

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

Add support for `DateTimeInterface` to `IntlDateFormatter::format` which is supported since PHP 7.1.5.

Since this component supports PHP from 7.1.3, should version checks be added, to only support DateTimeInterface if PHP is >= 7.1.5 or should the minimum required PHP version bumped to 7.1.5?

Commits
-------

b1e160c41e Support DateTimeInterface in IntlDateFormatter::format
2019-08-05 15:13:53 +02:00
Thomas Calvet
356341bc19 [HttpClient] Minor fixes 2019-08-05 15:12:03 +02:00
Nicolas Grekas
f752416fea minor #32941 Use namespaced Phpunit classes (jderusse)
This PR was squashed before being merged into the 3.4 branch (closes #32941).

Discussion
----------

Use namespaced Phpunit classes

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

This PR simplify tests by using PhpUnit namespace introduced in #32940
It also makes compatible with PHPUnit 8 (removed class PHPUnit_Framework_MockObject_MockObject)

Commits
-------

797ea2e4e2 Use namespaced Phpunit classes
2019-08-05 15:11:48 +02:00
Jérémy Derussé
797ea2e4e2 Use namespaced Phpunit classes 2019-08-05 15:11:42 +02:00
Fabien Potencier
cf459e5ff2 minor #32949 [Form] remove leftover int child phpdoc (Tobion)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] remove leftover int child phpdoc

| 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 leftover from #32828

Commits
-------

4cd60d61cc [Form] remove leftover int child phpdoc
2019-08-05 15:03:58 +02:00
Fabien Potencier
b6d6c6b03f minor #32946 [Messenger] Fixed ConsumeMessagesCommand configuration (lyrixx)
This PR was merged into the 4.3 branch.

Discussion
----------

[Messenger] Fixed ConsumeMessagesCommand configuration

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

Commits
-------

e9293108c4 [Messenger] Fixed ConsumeMessagesCommand configuration
2019-08-05 15:02:42 +02:00
Grégoire Pineau
e9293108c4 [Messenger] Fixed ConsumeMessagesCommand configuration 2019-08-05 14:38:03 +02:00
Tobias Schultze
4cd60d61cc [Form] remove leftover int child phpdoc 2019-08-05 14:35:29 +02:00
Pierre du Plessis
b1e160c41e
Support DateTimeInterface in IntlDateFormatter::format 2019-08-05 14:17:55 +02:00
karser
0c9539fdb4 [PhpUnitBridge] fixed PHPUnit 8.3 compatibility: method handleError was renamed to __invoke 2019-08-05 12:06:06 +02:00
Fabien Potencier
c7aad8d800 fixed phpdocs 2019-08-05 07:56:08 +02:00
Fabien Potencier
5925e59ff3 bug #32919 [Intl] Order alpha2 to alpha3 mapping + phpdoc fixes (ro0NL)
This PR was merged into the 4.3 branch.

Discussion
----------

[Intl] Order alpha2 to alpha3 mapping + phpdoc fixes

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | https://github.com/symfony/symfony/pull/32676#pullrequestreview-270269786
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

includes #32918

Commits
-------

867e3de92f [Intl] Order alpha2 to alpha3 mapping + phpdoc fixes
2019-08-05 07:54:54 +02:00
Fabien Potencier
2f97ab1643 minor #32924 [cs-fixer] Use PhpUnit native assertions in filsystem checks (jderusse)
This PR was merged into the 3.4 branch.

Discussion
----------

[cs-fixer] Use PhpUnit native assertions in filsystem checks

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

This PR change the minimal value of PhpUnit introduced in #32885 in branche 3.4.
Note: `5.6` is the highest value at the time.

Commits
-------

226bdd18fb Use PHPunit assertion
2019-08-05 07:53:47 +02:00
Fabien Potencier
16a4620d1f Merge branch '3.4' into 4.3
* 3.4:
  [FrameworkBundle] Detect indirect env vars in routing
  Remove calls to deprecated function assertAttributeX
  [Intl] Order alpha2 to alpha3 mapping
  [Routing] added a warning about the getRouteCollection() method
  Allow sutFqcnResolver to return array
  [HttpFoundation] Revert getClientIp @return docblock
2019-08-05 07:50:27 +02:00