Commit Graph

43512 Commits

Author SHA1 Message Date
Fabien Potencier
828ce340f4 bug #32838 [FrameworkBundle] Detect indirect env vars in routing (ro0NL)
This PR was squashed before being merged into the 3.4 branch (closes #32838).

Discussion
----------

[FrameworkBundle] Detect indirect env vars in routing

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| 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 | #32366
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

This detects indirect env parameters in routing, which doesnt work according to #32366.

cc @nicolas-grekas @bendavies please verify, as im not really into routing internals

Commits
-------

ceaa1b33d0 [FrameworkBundle] Detect indirect env vars in routing
2019-08-05 07:22:48 +02:00
Roland Franssen
ceaa1b33d0 [FrameworkBundle] Detect indirect env vars in routing 2019-08-05 07:22:32 +02:00
Fabien Potencier
c754f15205 minor #32934 [Form] type cannot be a FormTypeInterface anymore (Tobion)
This PR was merged into the 4.4 branch.

Discussion
----------

[Form] type cannot be a FormTypeInterface anymore

| Q             | A
| ------------- | ---
| Branch?       | 4.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        |

Found in #32237. This style of adding FormTypes has been removed in sf 3. Could also be merged in 3.4 if preferred. But there was an outdated, broken test. So 4.4 seems enough as well.

Commits
-------

6ee0d53c31 [Form] type cannot be a FormTypeInterface anymore
2019-08-05 07:21:37 +02:00
Fabien Potencier
748dd8eff3 bug #32873 [ErrorRenderer] Add alias to FlattenException to avoid BC break (yceruto)
This PR was merged into the 4.4 branch.

Discussion
----------

[ErrorRenderer] Add alias to FlattenException to avoid BC break

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

Commits
-------

44b0e7d58c Created alias to FlattenException to avoid BC break
2019-08-05 07:19:47 +02:00
Fabien Potencier
8ca5cfcebe bug #32918 [Intl] Order alpha2 to alpha3 mapping (ro0NL)
This PR was merged into the 3.4 branch.

Discussion
----------

[Intl] Order alpha2 to alpha3 mapping

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| 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#discussion_r310201575
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

to move forward with #32676

Commits
-------

724f1f524f [Intl] Order alpha2 to alpha3 mapping
2019-08-05 07:18:30 +02:00
Tobias Schultze
6ee0d53c31 [Form] type cannot be a FormTypeInterface anymore 2019-08-05 00:02:53 +02:00
Fabien Potencier
f152314e28 [Mailer] added support for the profiler 2019-08-04 22:35:18 +02:00
Jérémy Derussé
226bdd18fb
Use PHPunit assertion 2019-08-04 21:00:55 +02:00
Nicolas Grekas
64a2627e9c minor #32931 [PhpUnitBridge] Polyfill assertion method on Filesystem (jderusse)
This PR was merged into the 4.4 branch.

Discussion
----------

[PhpUnitBridge] Polyfill assertion method on Filesystem

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

This PR provide polyfill for assert methods on filesystem (introduced in PhpUnit 5.0)
- assert(File|Directory)?(Not)?Is(Readable|Writable)
- assert(File|Directory)(Not)?exists

Commits
-------

6d625749ca Polyfill assertion method on Filesystem
2019-08-04 20:56:23 +02:00
Jérémy Derussé
6d625749ca
Polyfill assertion method on Filesystem 2019-08-04 20:53:51 +02:00
Fabien Potencier
aa93f0b611 feature #32927 [Mailer] Add message events logger (fabpot)
This PR was merged into the 4.4 branch.

Discussion
----------

[Mailer] Add message events logger

| 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, refs #32409, refs #31947, refs #31747
| License       | MIT
| Doc PR        | n/a

To allow testing emails and for the web profiler, we need a way to store all sent/queued messages.

Commits
-------

7642178d76 [Mailer] added message events logger
2019-08-04 18:10:17 +02:00
Nicolas Grekas
d2c4bf0da8 [HttpClient] use "idle" instead of "inactivity" when telling about the timeout option 2019-08-04 17:49:22 +02:00
Nicolas Grekas
926246ba72 bug #32902 [PhpUnitBridge] Allow sutFqcnResolver to return array (VincentLanglet)
This PR was merged into the 3.4 branch.

Discussion
----------

[PhpUnitBridge] Allow sutFqcnResolver to return array

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

Phpunit handle multiple covers annotation:
```
/**
 * @covers ClassOne
 * @covers ClassTwo
 */
```

The coverage solver was only allowed to return `ClassOne` or `ClassTwo` since it was transformed to `[ClassName]`. Returning `[ClassOne, ClassTwo]` was transform to [[ClassOne, ClassTwo]]` which was creating an error with phpunit. This PR fixed this case.

Commits
-------

1451c0b915  Allow sutFqcnResolver to return array
2019-08-04 17:24:16 +02:00
Nicolas Grekas
dd814bfc87 minor #32923 [PhpUnitBridge] Remove calls to deprecated function assertAttributeX (jderusse)
This PR was merged into the 3.4 branch.

Discussion
----------

[PhpUnitBridge] Remove calls to deprecated function assertAttributeX

| 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 remove unecessary call to assertAttribute and replace assertAttributeX by Reflection when no alternative is available.

Commits
-------

d098c11539 Remove calls to deprecated function assertAttributeX
2019-08-04 17:19:50 +02:00
Fabien Potencier
7642178d76 [Mailer] added message events logger 2019-08-04 17:13:13 +02:00
Fabien Potencier
8b699ae8a8 bug #32814 Create mailBody with only attachments part present (srsbiz)
This PR was squashed before being merged into the 4.3 branch (closes #32814).

Discussion
----------

Create mailBody with only attachments part present

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

Commits
-------

b500f92921 Create mailBody with only attachments part present
2019-08-04 14:19:33 +02:00
Radosław Kowalewski
b500f92921 Create mailBody with only attachments part present 2019-08-04 14:19:23 +02:00
Fabien Potencier
5d60221c5f minor #32915 [Routing] Add a warning about the getRouteCollection() method (fabpot)
This PR was merged into the 3.4 branch.

Discussion
----------

[Routing] Add a warning about the getRouteCollection() method

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

In #19274, we tried to deprecate `RouterInterface::getRouteCollection()`, but failed at doing so. I propose to add a warning about why one should never use it at runtime as a first step.

Commits
-------

8863f0675d [Routing] added a warning about the getRouteCollection() method
2019-08-04 12:46:47 +02:00
Jérémy Derussé
d098c11539
Remove calls to deprecated function assertAttributeX 2019-08-04 11:25:45 +02:00
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