Commit Graph

43644 Commits

Author SHA1 Message Date
Nicolas Grekas 271211b1f6 [PhpUnitBridge] make the bridge act as a polyfill for newest PHPUnit features 2019-08-04 11:09:22 +02:00
Nicolas Grekas 6cc20ba088 fix typo 2019-08-04 10:28:30 +02:00
Nicolas Grekas 884669b83b minor #32920 [PhpUnitBridge] fix internal annotation (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[PhpUnitBridge] fix internal annotation

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

This should fix tests. It may require emptying the cache on Travis.

Commits
-------

f19b0abe0d [PhpUnitBridge] fix internal annotation
2019-08-04 09:02:16 +02:00
Nicolas Grekas f19b0abe0d [PhpUnitBridge] fix internal annotation 2019-08-04 08:59:43 +02:00
Roland Franssen 867e3de92f [Intl] Order alpha2 to alpha3 mapping + phpdoc fixes 2019-08-04 08:27:02 +02:00
Roland Franssen 724f1f524f [Intl] Order alpha2 to alpha3 mapping 2019-08-04 08:13:19 +02:00
Fabien Potencier 37265de54d feature #32916 [Mailer] Add a name to the transports (fabpot)
This PR was merged into the 4.4 branch.

Discussion
----------

[Mailer] Add a name to the transports

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

Having a name for Transports helps identify them (useful for instance in the profiler when one uses several mailers).

Commits
-------

2412dfe71f [Mailer] added a name to the transport
2019-08-04 07:00:35 +02:00
Fabien Potencier 1ce83dab34 feature #32917 [Mime] Add AbstractPart::asDebugString() (fabpot)
This PR was merged into the 4.4 branch.

Discussion
----------

[Mime] Add AbstractPart::asDebugString()

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

That helps debugging issues and will be displayed in the web profiler Mailer panel.

Commits
-------

f36c8c9881 [Mime] added AbstractPart::asDebugString()
2019-08-04 06:58:40 +02:00
Fabien Potencier f36c8c9881 [Mime] added AbstractPart::asDebugString() 2019-08-04 06:55:52 +02:00
Fabien Potencier 2412dfe71f [Mailer] added a name to the transport 2019-08-04 06:22:04 +02:00
Fabien Potencier 158fe2aaec [Mailer] added missing entry in the CHANGELOG 2019-08-04 06:13:47 +02:00
Fabien Potencier 8863f0675d [Routing] added a warning about the getRouteCollection() method 2019-08-04 04:46:49 +02:00
Fabien Potencier 35bf2fa9b5 feature #32543 [FrameworkBundle] add config translator cache_dir (Raulnet)
This PR was submitted for the 4.3 branch but it was squashed and merged into the 4.4 branch instead (closes #32543).

Discussion
----------

[FrameworkBundle] add config translator cache_dir

| Q             | A
| ------------- | ---
| Branch?       |  4.4 (be careful when merging)
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #32542
| License       | MIT

Now the parameter cache_dir of Translator constructor can be change or disable on config

```yaml
#framework.yaml
framework:
    ...
    translator:
        cache_dir: null #(cache disable)
    ...
```

Commits
-------

7613c7d1de [FrameworkBundle] add config translator cache_dir
2019-08-04 04:36:15 +02:00
Raulnet 7613c7d1de [FrameworkBundle] add config translator cache_dir 2019-08-04 04:35:31 +02:00
Fabien Potencier 7479543f9a feature #32669 [Yaml] Add flag to dump NULL as ~ (OskarStark)
This PR was merged into the 4.4 branch.

Discussion
----------

[Yaml] Add flag to dump NULL as ~

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #...   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/12071

This PR adds the ability to dump `null` as `~` by a new Flag `Yaml::DUMP_NULL_AS_TILDE`:
```diff
- foo: null
+ foo: ~
```

Todos:
- [x] Fix/add tests

Commits
-------

749c11d94c [Yaml] Add flag to dump NULL as ~
2019-08-04 04:32:09 +02:00
Fabien Potencier 2b0f2de485 bug #32682 [HttpFoundation] Revert getClientIp @return docblock (ossinkine)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpFoundation] Revert getClientIp @return docblock

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

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

This PR reverts https://github.com/symfony/symfony/pull/22418, see the comment https://github.com/symfony/symfony/pull/22418#issuecomment-513256687

Commits
-------

7568d3452d [HttpFoundation] Revert getClientIp @return docblock
2019-08-04 04:30:15 +02:00
Nicolas Grekas 5eed0d7619 fix merge 2019-08-04 00:51:07 +02:00
Nicolas Grekas 6328eff652 Merge branch '4.3' into 4.4
* 4.3:
  Fix tests on console
  cs fix
  Fix path to phpunit binary
  [Yaml] PHP-8: Uncaught TypeError: abs() expects parameter 1 to be int or float, string given
2019-08-04 00:33:03 +02:00
Nicolas Grekas 69ef436481 Merge branch '3.4' into 4.3
* 3.4:
  Fix tests on console
  cs fix
  Fix path to phpunit binary
  [Yaml] PHP-8: Uncaught TypeError: abs() expects parameter 1 to be int or float, string given
2019-08-04 00:32:39 +02:00
Nicolas Grekas 8f87a85c07 minor #32914 [Console] Fix tests not executed (jderusse)
This PR was merged into the 3.4 branch.

Discussion
----------

[Console] Fix tests not executed

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

bfd5d4e362 Fix tests on console
2019-08-04 00:31:35 +02:00
Jérémy Derussé bfd5d4e362
Fix tests on console 2019-08-04 00:21:34 +02:00
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
Nicolas Grekas d588be203a Merge branch '4.3' into 4.4
* 4.3:
  Remove use of ForwardCompatTrait
  Remove deprecated methods assertArraySubset
2019-08-03 23:59:26 +02:00
Nicolas Grekas 64e3a327bc Merge branch '3.4' into 4.3
* 3.4:
  Remove use of ForwardCompatTrait
  Remove deprecated methods assertArraySubset
2019-08-03 23:50:52 +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 9279f04b47 minor #32882 [PhpUnitBridge] Inject ForwardCompatibiliy in TestCase (jderusse)
This PR was merged into the 4.4 branch.

Discussion
----------

[PhpUnitBridge] Inject ForwardCompatibiliy in TestCase

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

This PR replace the previous trait `ForwardCompatTestTrait` by injecting forward compatibility code in phpunit itself which allow to use the polyfill methods in tests without changing the code.

when using `simple_phpunit` the env variable  `$PHPUNIT_REMOVE_RETURN_TYPEHINT=1` (default 0) removes the `: void` typehint in public and protected methods (allow to use 7.4 8 in 3.4 branch)

note: once merged, all tests have to be fixed. see #32889

Commits
-------

016bd8dd91 Inject ForwardCompatibiliy in TestCase
2019-08-03 22:42:42 +02:00
Jérémy Derussé 016bd8dd91
Inject ForwardCompatibiliy in TestCase 2019-08-03 22:14:29 +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 9614f488b2 Merge branch '4.3' into 4.4
* 4.3:
  #32853 Check if $this->parameters is array.
  [Validator] Improve Fa translations
2019-08-03 20:30:27 +02:00
Nicolas Grekas c7afa28b6b Merge branch '3.4' into 4.3
* 3.4:
  #32853 Check if $this->parameters is array.
  [Validator] Improve Fa translations
2019-08-03 20:28:12 +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 f1801a4f8d bug #32908 [Mailer] Add debug info on HTTP transport exceptions (fabpot)
This PR was merged into the 4.4 branch.

Discussion
----------

[Mailer] Add debug info on HTTP transport exceptions

| 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

Same as #32896 but for HTTP transports.

Commits
-------

4cfb4b95d6 [Mailer] added debug info on HTTP transport exceptions
2019-08-03 17:48:11 +02:00
Fabien Potencier 4cfb4b95d6 [Mailer] added debug info on HTTP transport exceptions 2019-08-03 17:35:50 +02:00
Nicolas Grekas 5d5e04bea9 minor #32907 [PhpUnitBridge] add more assert*() polyfills (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[PhpUnitBridge] add more assert*() polyfills

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

Commits
-------

54ddfd2ef0 [PhpUnitBridge] add more assert*() polyfills
2019-08-03 17:33:56 +02:00
Nicolas Grekas 54ddfd2ef0 [PhpUnitBridge] add more assert*() polyfills 2019-08-03 17:32:30 +02:00
Nicolas Grekas d01ec68bd9 minor #32878 [PhpUnitBridge] added polyfill for assertStringContainsString*() (Tobias Weichart)
This PR was merged into the 4.4 branch.

Discussion
----------

[PhpUnitBridge] added polyfill for assertStringContainsString*()

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

this PR provides a polyfill for methods assertStringContainsString and assertStringContainsStringIgnoringCase in preparation for the PHPUnit 9 deprecations.
PR follows the pattern of [this PR](https://github.com/symfony/symfony/pull/32869), hence the PR to master

Commits
-------

1602441b22 [PhpUnitBridge] added polyfill for assertStringContainsString*()
2019-08-03 17:04:24 +02:00
Tobias Weichart 1602441b22 [PhpUnitBridge] added polyfill for assertStringContainsString*() 2019-08-03 16:58:01 +02:00
Nicolas Grekas 42a4de07ce minor #32905 [PhpUnitBridge] cleanup implementation of expectException*() (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[PhpUnitBridge] cleanup implementation of expectException*()

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

d56bc3bc18 [PhpUnitBridge] cleanup implementation of expectException*()
2019-08-03 16:35:01 +02:00
Nicolas Grekas d56bc3bc18 [PhpUnitBridge] cleanup implementation of expectException*() 2019-08-03 16:33:35 +02: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 83f1dca60c Merge branch '4.3' into 4.4
* 4.3:
  Adopt `@PHPUnit55Migration:risky` rule of php-cs-fixer
2019-08-03 16:05:30 +02:00
Nicolas Grekas 07bade03e4 Merge branch '3.4' into 4.3
* 3.4:
  Adopt `@PHPUnit55Migration:risky` rule of php-cs-fixer
2019-08-03 16:00:31 +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