Commit Graph

37362 Commits

Author SHA1 Message Date
Nicolas Grekas 9188261014 bug #32910 [Yaml] PHP-8: Uncaught TypeError: abs() expects parameter 1 to be int or float, string given (Aleksandr Dankovtsev)
This PR was merged into the 3.4 branch.

Discussion
----------

[Yaml] PHP-8: Uncaught TypeError: abs() expects parameter 1 to be int or float, string given

[Yaml] PHP-8: Uncaught TypeError: abs() expects parameter 1 to be int or float, string given

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

In additional for PR: https://github.com/symfony/symfony/pull/32862

Commits
-------

faef73888e [Yaml] PHP-8: Uncaught TypeError: abs() expects parameter 1 to be int or float, string given
2019-08-04 00:13:25 +02:00
Nicolas Grekas 9b41f67a1b minor #32913 [travis] Fix path to phpunit binary (jderusse)
This PR was merged into the 3.4 branch.

Discussion
----------

[travis] Fix path to phpunit binary

| 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

Phpunit cache path change in 4.4 branch. This PR fixes it path

Commits
-------

3b3582eeaf Fix path to phpunit binary
2019-08-04 00:10:26 +02:00
Nicolas Grekas f1cb5559c9 cs fix 2019-08-04 00:08:43 +02:00
Jérémy Derussé 3b3582eeaf
Fix path to phpunit binary 2019-08-03 23:41:59 +02:00
Nicolas Grekas ce30848f15 minor #32889 [PhpUnitBridge] Remove use of ForwardCompatTrait (jderusse)
This PR was merged into the 3.4 branch.

Discussion
----------

[PhpUnitBridge] Remove use of ForwardCompatTrait

| 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

With #32882 the ForwardCompatibilityTrait is injected in TestCase which now act as a true polyfill

Commits
-------

ac6242f36b Remove use of ForwardCompatTrait
2019-08-03 23:29:20 +02:00
Jérémy Derussé ac6242f36b
Remove use of ForwardCompatTrait 2019-08-03 23:15:25 +02:00
Nicolas Grekas 6604a3e70a minor #32909 [PhpUnitBridge] Remove deprecated methods assertArraySubset (jderusse)
This PR was merged into the 3.4 branch.

Discussion
----------

[PhpUnitBridge] Remove deprecated methods assertArraySubset

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

This PR removes the 2 occurrences of assertArraySubset

Commits
-------

114ec6c41b Remove deprecated methods assertArraySubset
2019-08-03 21:11:55 +02:00
Nicolas Grekas 8890be6a96 bug #32870 #32853 Check if $this->parameters is array. (ABGEO07)
This PR was submitted for the 4.3 branch but it was squashed and merged into the 3.4 branch instead (closes #32870).

Discussion
----------

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

Commits
-------

7cf9ed613b #32853 Check if $this->parameters is array.
2019-08-03 20:20:39 +02:00
ABGEO 7cf9ed613b #32853 Check if $this->parameters is array. 2019-08-03 20:11:58 +02:00
Jérémy Derussé 114ec6c41b
Remove deprecated methods assertArraySubset 2019-08-03 19:55:54 +02:00
Aleksandr Dankovtsev faef73888e [Yaml] PHP-8: Uncaught TypeError: abs() expects parameter 1 to be int or float, string given 2019-08-03 20:55:11 +03:00
Fabien Potencier d4e97c0f6c minor #32892 [Validator] Improve Fa translations (Arman-Hosseini)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] Improve Fa translations

| Q             | A
| ------------- | ---
| Branch?       | >= 3.4 <!-- 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 -->
| Fixed tickets | N/A   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A <!-- required for new features -->

The following lines contain bugs:

675d463cf5/src/Symfony/Component/Validator/Resources/translations/validators.fa.xlf (L291)

675d463cf5/src/Symfony/Component/Validator/Resources/translations/validators.fa.xlf (L295)

675d463cf5/src/Symfony/Component/Validator/Resources/translations/validators.fa.xlf (L299)

Commits
-------

2e7f43ed7f [Validator] Improve Fa translations
2019-08-03 16:14:10 +02:00
Nicolas Grekas 61894106d4 minor #32885 [PhpUnitBridge] Use PHPUnit75Migration in CS fixer (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[PhpUnitBridge] Use PHPUnit75Migration in CS fixer

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes (not yet) need #32882, #32886, #32893
| Fixed tickets | #32844
| License       | MIT
| Doc PR        | NA

Bump php-cs-fixer rule to PHPUnit75Migration:risky which add
- php_unit_dedicate_assert_internal_type
- php_unit_expectation
- php_unit_mock
- php_unit_no_expectation_annotation

which are (or will be) all polyfillyed

- [x] need to polyfill `createPartialMock`

Commits
-------

9fb1c421f3 Adopt `@PHPUnit55Migration:risky` rule of php-cs-fixer
2019-08-03 15:51:03 +02:00
Nicolas Grekas 9fb1c421f3 Adopt `@PHPUnit55Migration:risky` rule of php-cs-fixer 2019-08-03 15:46:27 +02:00
Arman Hosseini 2e7f43ed7f
[Validator] Improve Fa translations 2019-08-03 01:59:27 +04:30
Nicolas Grekas 5d0711f26c minor #32887 Run the phpunit-bridge from a PR (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

Run the phpunit-bridge from a PR

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

7bdd8ff872 Run the phpunit-bridge from a PR
2019-08-02 17:54:47 +02:00
Nicolas Grekas 7bdd8ff872 Run the phpunit-bridge from a PR 2019-08-02 17:46:19 +02:00
Nicolas Grekas 8173dafda4 minor #32875 [PhpUnitBridge] Remove @expectedException annotation (jderusse)
This PR was squashed before being merged into the 3.4 branch (closes #32875).

Discussion
----------

[PhpUnitBridge] Remove @expectedException annotation

| 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 the deprecated annotation `@expectedException` by calls to the method `expectException`.

To automate the process, I used rector/rector:
```
./vendor/bin/rector process src/Symfony --set phpunit60 -a .phpunit/phpunit-6.5/vendor/autoload.php
```
Which also replace `PHPUnit_Framework_Error_X` by `\PHPUnit\Framework\Error\X`

Commits
-------

a22a9c453f Fix tests
3a626e8778 Fix deprecated phpunit annotation
2019-08-02 09:38:25 +02:00
Jérémy Derussé a22a9c453f
Fix tests 2019-08-02 01:40:18 +02:00
Jérémy Derussé 3a626e8778
Fix deprecated phpunit annotation 2019-08-02 00:48:42 +02:00
Nicolas Grekas 725187ff77 cs fix 2019-08-01 23:06:09 +02:00
Nicolas Grekas 6d499132c0 minor #32872 Replace calls to setExpectedException by Pollyfill (jderusse)
This PR was merged into the 3.4 branch.

Discussion
----------

Replace calls to setExpectedException by Pollyfill

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

PhpUnit method `setExceptionException` has been deprecated seens 5.7. This PR replace theme by `exceptException` provide by the pollyfill.

Commits
-------

41c02d7ead Replace calls to setExpectedException by Pollyfill
2019-08-01 23:04:58 +02:00
Jérémy Derussé 41c02d7ead
Replace calls to setExpectedException by Pollyfill 2019-08-01 22:42:50 +02:00
Nicolas Grekas b5df8819b2 bug #32868 [PhpUnitBridge] Allow symfony/phpunit-bridge > 4.2 to be installed with phpunit 4.8 (jderusse)
This PR was merged into the 3.4 branch.

Discussion
----------

[PhpUnitBridge] Allow symfony/phpunit-bridge > 4.2 to be installed with phpunit 4.8

| 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

phpunit/phpunit 4.8 defined the composer.json config.platform to php 5.3 which is not compatible with symfony/phpunit-bridge > 4.2

This PR removes the config from composer.json

Commits
-------

a0f68aa554 Fix symfony/phpunit-bridge not up to date in phpunit 4.8 test suite
2019-08-01 16:29:42 +02:00
Jérémy Derussé a0f68aa554
Fix symfony/phpunit-bridge not up to date in phpunit 4.8 test suite 2019-08-01 16:28:16 +02:00
Nicolas Grekas 9f40b100e5 [Yaml] fix test for PHP 7.4 2019-08-01 14:52:58 +02:00
Nicolas Grekas 82aace3228 minor #32865 Add polyfill for TestCase::createMock() (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

Add polyfill for TestCase::createMock()

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

Commits
-------

abcd45a587 Add polyfill for TestCase::createMock()
2019-08-01 14:51:37 +02:00
Nicolas Grekas 1fca6c2b91 minor #32864 Skip tests that fatal-error on PHP 7.4 because of missing parent classes (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

Skip tests that fatal-error on PHP 7.4 because of missing parent classes

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

See #32395 and  https://bugs.php.net/78351 for more background.

This skips the affected tests with a warning, which means tests won't pass so we won't forget about them.

Commits
-------

c2c7ba82df Skip tests that fatal-error on PHP 7.4 because of missing parent classes
2019-08-01 14:51:03 +02:00
Nicolas Grekas abcd45a587 Add polyfill for TestCase::createMock() 2019-08-01 14:47:19 +02:00
Nicolas Grekas c2c7ba82df Skip tests that fatal-error on PHP 7.4 because of missing parent classes 2019-08-01 14:19:46 +02:00
Nicolas Grekas c06454827d fix tests 2019-08-01 12:14:38 +02:00
Nicolas Grekas 1ad26825dc minor #32846 [PhpUnitBridge] Fix deprecation assertInternalType (jderusse)
This PR was merged into the 3.4 branch.

Discussion
----------

[PhpUnitBridge] Fix deprecation assertInternalType

| 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 fixes PhpUnit deprecation :
> assertInternalType() is deprecated and will be removed in PHPUnit 9. Refactor your test to use assertIsArray(), assertIsBool(), assertIsFloat(), assertIsInt(), assertIsNumeric(), assertIsObject(), assertIsResource(), assertIsString(), assertIsScalar(), assertIsCallable(), or assertIsIterable() instead

- update all tests to use `assertIsX` instead of `assertInternalType('x'`
- adds methods `assertIsX` in `ForwardCompatTestTraitForV5`

Commits
-------

4c8442462a Fix assertInternalType deprecation in phpunit 9
2019-08-01 11:17:11 +02:00
Jérémy Derussé 4c8442462a
Fix assertInternalType deprecation in phpunit 9 2019-08-01 09:40:28 +02:00
Nicolas Grekas 4af1fd66c3 minor #32843 Micro-typo fix (BenMorel)
This PR was submitted for the master branch but it was merged into the 3.4 branch instead (closes #32843).

Discussion
----------

Micro-typo fix

Commits
-------

9e2d683423 Micro-typo fix
2019-08-01 00:45:58 +02:00
Benjamin Morel 9e2d683423 Micro-typo fix 2019-08-01 00:45:52 +02:00
Nicolas Grekas 629d21736d [Cache] fix cs 2019-08-01 00:26:30 +02:00
Nicolas Grekas 5fa9ed40e7 minor #32842 Make tests support phpunit 8 (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

Make tests support phpunit 8

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

Having `void` on setUp/tearDown is **really** painful /cc @sebastianbergmann FYI

This works around the issue by adding a new trait to the phpunit-bridge: `SetUpTearDownTrait`.
Another reason why the bridge is so useful...

With this change, we should have the same codebase be able to run under phpunit 4.8 (used with PHP5.5) up to phpunit 8.2 (used with PHP7.4).

🤞 🤕

One more step towards PHP 7.4 support.

Commits
-------

81af97f398 Make tests support phpunit 8
2019-08-01 00:10:00 +02:00
Nicolas Grekas 81af97f398 Make tests support phpunit 8 2019-07-31 23:55:24 +02:00
Nicolas Grekas f0c666925a minor #32289 Allow Travis CI to build on PHP 7.4 (phansys)
This PR was merged into the 3.4 branch.

Discussion
----------

Allow Travis CI to build on PHP 7.4

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

1ca61d3aec Allow Travis CI to build on PHP 7.4
2019-07-31 19:02:45 +02:00
Javier Spagnoletti 1ca61d3aec Allow Travis CI to build on PHP 7.4 2019-07-31 18:59:46 +02:00
Nicolas Grekas bcfc7a4ada minor #32828 [Form] update type of form $name arguments (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] update type of form $name arguments

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

An alternative to #32821: where a string is expected, passing an int is fine, per PHP casting rules.

Commits
-------

6d4dcadd66 [Form] update type of form $name arguments
2019-07-31 17:02:16 +02:00
Nicolas Grekas dfce45bf2e Fix travis script 2019-07-31 14:40:56 +02:00
Nicolas Grekas 6d4dcadd66 [Form] update type of form $name arguments 2019-07-31 13:55:54 +02:00
Yonel Ceruto e4082fa6fa minor #32826 [Debug] minor fix for wrong method name case (Tobias Weichart)
This PR was merged into the 3.4 branch.

Discussion
----------

[Debug] minor fix for wrong method name case

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

Minor replacement of wrong case for function name, needs to be fixed in 3.4 as hinten [here](https://github.com/symfony/symfony/pull/32812#discussion_r308815666).

Commits
-------

8b2d67b minor fix for wrong case
2019-07-31 07:51:26 -04:00
Tobias Weichart 8b2d67bb3d minor fix for wrong case 2019-07-31 08:13:25 +01:00
Nicolas Grekas f1cb4b59b9 bug #32767 [Yaml] fix comment in multi line value (soufianZantar)
This PR was merged into the 3.4 branch.

Discussion
----------

[Yaml] fix comment in multi line value

| Q             | A
| ------------- | ---
| Branch?       |  4.3 and lower <!-- see below -->
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #32667    <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- 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.
-->
Comments after blank lines are read as value in yaml.

```
`$yaml = <<<YAML
parameters:
    abc

# Comment
YAML;

var_dump(Symfony\Component\Yaml\Yaml::parse($yaml));`
```

**Result before fix:**

```
array(1) {
  ["parameters"]=>
  string(13) "abc
# Comment"
}
```
**Result after fix:**

```
array(1) {
  ["parameters"]=>
  string(3) "abc"
}
```

Commits
-------

dd945e375c fix(yml): fix comment in milti line value
2019-07-30 19:38:11 +02:00
Nicolas Grekas 1143b02188 bug #32790 [HttpFoundation] Fix `getMaxFilesize` (bennyborn)
This PR was squashed before being merged into the 3.4 branch (closes #32790).

Discussion
----------

[HttpFoundation] Fix `getMaxFilesize`

When checking for the maximum size of an uploaded file you can't just rely on `upload_max_filesize` since the request might also exceed `post_max_size`. Also discussed in contao/contao#498

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

Commits
-------

54107bac33 [HttpFoundation] Fix `getMaxFilesize`
2019-07-30 19:35:47 +02:00
Benny Born 54107bac33 [HttpFoundation] Fix `getMaxFilesize` 2019-07-30 19:35:39 +02:00
Nicolas Grekas b706372cd4 bug #32796 [Cache] fix warning on PHP 7.4 (jpauli)
This PR was merged into the 3.4 branch.

Discussion
----------

[Cache] fix warning on PHP 7.4

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | not all, still some missing I cant find
| Fixed tickets |
| License       | MIT
| Doc PR        |

Some fixes in tests for PHP 7.4

Commits
-------

3324505b51 [Cache] fix warning on PHP 7.4
2019-07-30 19:32:00 +02:00
Julien Pauli 3324505b51 [Cache] fix warning on PHP 7.4 2019-07-30 19:30:37 +02:00