Commit Graph

35871 Commits

Author SHA1 Message Date
Fabien Potencier
aa53a71e03 minor #33204 [Workflow] Added doc block for Registry::supports() (derrabus)
This PR was merged into the 4.3 branch.

Discussion
----------

[Workflow] Added doc block for Registry::supports()

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

Follows #33197, prepares #33198.

Commits
-------

c76fd13848 Added doc block for Registry::supports().
2019-08-18 20:04:08 +02:00
Fabien Potencier
8eef7a7417 minor #33221 [Process] Doc block backport (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

[Process] Doc block backport

| 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/33154/files#r314600658

Commits
-------

fed395de4e [Process] Doc block backport.
2019-08-18 19:35:43 +02:00
Fabien Potencier
acb1373ac2 minor #33222 [Process] Added missing return type (derrabus)
This PR was merged into the 4.3 branch.

Discussion
----------

[Process] Added missing return type

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

Commits
-------

20ff512269 [Process] Added missing return type.
2019-08-18 19:18:45 +02:00
Fabien Potencier
d1d0943f80 bug #32497 [Messenger] DispatchAfterCurrentBusMiddleware does not cancel messages from delayed handlers (Nyholm, BastienClement)
This PR was merged into the 4.3 branch.

Discussion
----------

[Messenger] DispatchAfterCurrentBusMiddleware does not cancel messages from delayed handlers

| Q             | A
| ------------- | ---
| Branch?       | 4.3 for bug fixes
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? |no
| Tests pass?   | yes  (thanks @Nyholm)
| Fixed tickets | #32370
| License       | MIT
| Doc PR        | -

This is a fix for #32370. There is no need for anything sophisticated. There is no recursion or fancy stuff going on, just a queue of message handled sequentially. A simple variable is enough to keep track of the queue state.

Thanks @Nyholm for the test, it would clearly have been the hardest part of the job.

Commits
-------

1f5c8a6790 Cancel delayed message if handler fails
35c76a385d Added tests for #32370
2019-08-18 19:13:21 +02:00
Cedrick Oka
3211caa5b5 Allow exchange type headers binding 2019-08-18 17:49:22 +01:00
Amine Yakoubi
f6623c11bd Add missing translations for Armenian locale 2019-08-18 17:34:57 +01:00
Alexander M. Turek
1b880677d4 Add types to private and final methods. 2019-08-18 11:59:28 +02:00
Alexander M. Turek
20ff512269 [Process] Added missing return type. 2019-08-18 11:18:30 +02:00
Alexander M. Turek
fed395de4e [Process] Doc block backport. 2019-08-18 11:12:38 +02:00
Alexander M. Turek
c76fd13848 Added doc block for Registry::supports(). 2019-08-18 10:46:59 +02:00
Fabien Potencier
ff63bb325d feature #32783 [Messenger] InMemoryTransport handle acknowledged and rejected messages (tienvx)
This PR was merged into the 4.4 branch.

Discussion
----------

[Messenger] InMemoryTransport handle acknowledged and rejected messages

| Q             | A
| ------------- | ---
| Branch?       | 4.4 <!-- see below -->
| Bug fix?      | no
| New feature?  | yes <!-- 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 | #...   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs/pull/12045 <!-- required for new features -->

This PR do 2 things:
* Limit receiving messages from InMemoryTransport to 1 (reverted, another PR will fix the bug: worker does not stop when receiver return more messages than the number specify by the `--limit` option)
* Handle acknowledged and rejected messages in InMemoryTransport. Currently, it does not care about acknowledged and rejected messages. So it always return all messages that have been sent. So if we run console command `messenger:consume`, it will never stop, even though we set the `--limit` option.

For more information, please check the [reproduction](https://github.com/tienvx/symfony-messenger-in-memory-reproduction) project for the expected behavior.

See also my [messenger-memory-transport](https://github.com/tienvx/messenger-memory-transport) project

Commits
-------

71e7bdff22 [Messenger] InMemoryTransport handle acknowledged and rejected messages
2019-08-18 10:25:08 +02:00
Fabien Potencier
431ead273a bug #33127 [Messenger] make delay exchange and queues durable like the normal ones by default (Tobion)
This PR was merged into the 4.3 branch.

Discussion
----------

[Messenger] make delay exchange and queues durable like the normal ones by default

| 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 | #32891
| License       | MIT
| Doc PR        |

This also imrproves BC of #32631 by only adding the new expiry argument in case the delay queue name was not overwritten using the options. I will remove the checks in 4.4 again. Please merge this PR before releasing the new 4.3 version so that 32631 and this PR are part of one release.

Commits
-------

e5ecda6de1 [Messenger] make delay exchange and queues durable like the normal ones by default
2019-08-18 10:19:16 +02:00
Fabien Potencier
9130c6ad1a bug #33140 [Intl] Full alpha3 language support (ro0NL)
This PR was merged into the 4.4 branch.

Discussion
----------

[Intl] Full alpha3 language support

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

I'll validate some more cases with tests.

Commits
-------

29aee2ddf2 [Intl] Full alpha3 language support
2019-08-18 10:17:19 +02:00
Fabien Potencier
98e86816ad feature #33155 [ErrorHandler] Added call() method utility to turns any PHP error into \ErrorException (yceruto)
This PR was merged into the 4.4 branch.

Discussion
----------

[ErrorHandler] Added call() method utility to turns any PHP error into \ErrorException

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

**Issue**

There is no easy way to catch PHP warnings, though some progress has been made in this area for PHP 8.0 (https://wiki.php.net/rfc/consistent_type_errors).

**Before**
```php
$file = file_get_contents('unknown.txt');
// PHP Warning:  file_get_contents(unknown.txt): failed to open stream: No such file or directory

// workaround:
$file = @file_get_contents('unknown.txt');
if (false === $file) {
    $e = error_get_last();
    throw new \ErrorException($e['message'], 0, $e['type'], $e['file'], $e['line']);
}
```

**After**
```php
$file = ErrorHandler::call('file_get_contents', 'unknown.txt');

// or
$file = ErrorHandler::call(static function () {
    return file_get_contents('unknown.txt');
});

// or (PHP 7.4)
$file = ErrorHandler::call(fn () => file_get_contents('unknown.txt'));
```

All credits to @nicolas-grekas https://github.com/symfony/symfony/issues/32936#issuecomment-518152681 and @vudaltsov for the idea.

Commits
-------

0faa855b5e Added ErrorHandler::call() method utility to turns any PHP warnings into `\ErrorException`
2019-08-18 10:09:38 +02:00
Fabien Potencier
6ee1f0b6f2 bug #33187 [Intl] Validate country preferred alpha code mapping (ro0NL)
This PR was merged into the 4.4 branch.

Discussion
----------

[Intl] Validate country preferred alpha code mapping

| Q             | A
| ------------- | ---
| Branch?       | 4.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 | #...   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

Use the same approach for the preferred alpha2-to-alpha3 code mapping, like Languages does. It provides us some more support in terms of maintenance.

The added `CD => COD` was previously implied based on ordering upstream.

Commits
-------

345305904b [Intl] Validate region preferred alpha code mapping
2019-08-18 10:05:02 +02:00
Nicolas Grekas
76bb1fca5c minor #33197 Fix some docblocks (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

Fix some docblocks

| 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

Backports from #33154.

Commits
-------

df89373e62 Fix some docblocks.
2019-08-18 09:33:13 +02:00
Quynh Xuan Nguyen
99f73fcca8 [Cache] Fix predis test 2019-08-18 09:29:35 +02:00
tien.xuan.vo
71e7bdff22 [Messenger] InMemoryTransport handle acknowledged and rejected messages 2019-08-18 09:00:51 +07:00
Fabien Potencier
d77d89d74f bug #33210 [Mailer] Don't duplicate addresses in Sendgrid Transport (pierredup)
This PR was merged into the 4.3 branch.

Discussion
----------

[Mailer] Don't duplicate addresses in Sendgrid Transport

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

Sendgrid requires the `to`, `cc` and `bcc` fields to be unique

Commits
-------

2706a9763f Don't duplicate addresses in Sendgrid Transport
2019-08-17 13:06:15 +02:00
Fabien Potencier
afb1c04c35 [Mailer] added a way to test the number of queued emails 2019-08-16 21:31:41 +02:00
Pierre du Plessis
2706a9763f
Don't duplicate addresses in Sendgrid Transport 2019-08-16 20:11:33 +02:00
david-binda
cde223ad2a Remove unnecessary statement
The casting of `$id` to string inside the second foreach loop in `\Symfony\Component\DependencyInjection\Dumper\PhpDumper::addMethodMap` is redundant, as the variable is not used after the casting inside nor outside the loop (while still in the loop, it gets overriden upon next iteration).

Fixes #33206
2019-08-16 17:14:15 +02:00
Nicolas Grekas
940eabb121 Merge branch '4.3' into 4.4
* 4.3:
  [VarDumper] Remove useless variable
  [Console] Fix incomplete output mock.
  [Serializer] Fixed docblocks and parameter names.
2019-08-16 08:37:15 +02:00
Nicolas Grekas
6d6cea2baa Merge branch '3.4' into 4.3
* 3.4:
  [VarDumper] Remove useless variable
  [Serializer] Fixed docblocks and parameter names.
2019-08-16 08:36:19 +02:00
Nicolas Grekas
bb41d53c06 minor #33182 [VarDumper] Add types to private methods (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

[VarDumper] Add types to private methods

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

backport from #33153

Commits
-------

065acc816f [VarDumper] Add types to private methods.
2019-08-16 08:22:44 +02:00
Nicolas Grekas
73dcf71378 minor #33186 [Serializer] Fixed docblocks and parameter names (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

[Serializer] Fixed docblocks and parameter names

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

Backports from #33185.

Commits
-------

50701fed9f [Serializer] Fixed docblocks and parameter names.
2019-08-16 08:19:18 +02:00
Smaine Milianni
df47058c55 [VarDumper] Remove useless variable 2019-08-16 07:42:55 +02:00
Alexander M. Turek
df89373e62 Fix some docblocks. 2019-08-16 02:50:45 +02:00
Alexander M. Turek
6ecbcf6f22 [Console] Fix incomplete output mock. 2019-08-16 01:33:50 +02:00
Roland Franssen
345305904b [Intl] Validate region preferred alpha code mapping 2019-08-15 15:06:57 +02:00
Alexander M. Turek
50701fed9f [Serializer] Fixed docblocks and parameter names. 2019-08-15 13:43:21 +02:00
Nicolas Grekas
26cc652a79 bug #33184 [DI] fix dumping lazy proxies (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[DI] fix dumping lazy proxies

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

Commits
-------

2ec1dd9628 [DI] fix dumping lazy proxies
2019-08-15 12:47:29 +02:00
Nicolas Grekas
2ec1dd9628 [DI] fix dumping lazy proxies 2019-08-15 11:38:48 +02:00
Nicolas Grekas
604a69fee7 Merge branch '4.3' into 4.4
* 4.3:
  [ProxyManagerBridge] remove false positive test case
2019-08-15 11:20:30 +02:00
Nicolas Grekas
97148313fe Merge branch '3.4' into 4.3
* 3.4:
  [ProxyManagerBridge] remove false positive test case
2019-08-15 11:18:47 +02:00
Nicolas Grekas
628271db2f [ProxyManagerBridge] remove false positive test case 2019-08-15 11:17:58 +02:00
Alexander M. Turek
065acc816f [VarDumper] Add types to private methods. 2019-08-15 11:17:12 +02:00
Nicolas Grekas
3fa8ad0859 Merge branch '4.3' into 4.4
* 4.3:
  [ProxyManager] fix closure binding
  [VarDumper] fix annotations
  [Console] fixed a PHP notice when there is no function
2019-08-15 10:52:52 +02:00
Nicolas Grekas
8aff3ad611 Merge branch '3.4' into 4.3
* 3.4:
  [ProxyManager] fix closure binding
  [VarDumper] fix annotations
  [Console] fixed a PHP notice when there is no function
2019-08-15 10:50:12 +02:00
Nicolas Grekas
1e47f0fe47 minor #33180 [ProxyManager] fix closure binding (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[ProxyManager] fix closure binding

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

Follows #32992

Commits
-------

31f920850a [ProxyManager] fix closure binding
2019-08-15 10:47:41 +02:00
Nicolas Grekas
31f920850a [ProxyManager] fix closure binding 2019-08-15 10:42:18 +02:00
Nicolas Grekas
08147ddb9b bug #33172 [Console] fixed a PHP notice when there is no function in the stack trace of an Exception (fabpot)
This PR was merged into the 3.4 branch.

Discussion
----------

[Console] fixed a PHP notice when there is no function in the stack trace of an Exception

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

Under certain circumstances, the `function` is not present in the stack trace. That's the case for instance when an error occurs on a line like this one `return require "somefile";`.

Commits
-------

ddb47358ae [Console] fixed a PHP notice when there is no function
2019-08-15 10:36:31 +02:00
Nicolas Grekas
82f4766498 [VarDumper] fix annotations 2019-08-15 10:03:47 +02:00
Christian Flothmann
21554aa8a5 trigger a deprecation not a notice 2019-08-15 09:51:39 +02:00
Fabien Potencier
ddb47358ae [Console] fixed a PHP notice when there is no function 2019-08-14 18:49:41 +02:00
Fabien Potencier
876cec7c45 [Mailer] fixed missing property assignment 2019-08-14 17:19:53 +02:00
Nicolas Grekas
320e49576e feature #30323 [ErrorHandler] trigger deprecation in DebugClassLoader when child class misses a return type (fancyweb, nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[ErrorHandler] trigger deprecation in DebugClassLoader when child class misses a return type

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

I wanted to push something to show the advancement and get feedback.

I pushed two versions : one with dedicated functions for code clarity (DebugClassLoader.php) and one withtout (DebugClassLoader___.php). It would be nice if some people with Blackfire could compare the performances.

So let's be clear, we are never gonna be able to cover all cases! We can however cover the vast majority.

Current non covered cases and problems :
- We assume that if there is more than 2 returned types, we cannot do anything. Even if it could technically be possible.
- We assume that any returned type that doesn't fit our "returnable" types list is a class. We don't check at all if this class actualy exists.
- We don't handle spaces in types. The types stop at the first space.
- That means we don't handle (yet) the callable type with spaces (cf https://github.com/symfony/symfony/issues/29969)
- Vendor code extending other vendor core triggers the deprecations 😕

Commits
-------

aa338c8b42 Import return annotations from vendors
10fc13e4a7 [ErrorHandler] Handle return types in DebugClassLoader
2019-08-14 15:35:48 +02:00
Nicolas Grekas
aa338c8b42 Import return annotations from vendors 2019-08-14 15:27:41 +02:00
Nicolas Grekas
c8e15e182a Merge branch '4.3' into 4.4
* 4.3:
  cs fix
2019-08-14 15:26:12 +02:00
Thomas Calvet
10fc13e4a7 [ErrorHandler] Handle return types in DebugClassLoader 2019-08-14 15:12:11 +02:00
Yonel Ceruto
0faa855b5e Added ErrorHandler::call() method utility to turns any PHP warnings into \ErrorException 2019-08-14 09:05:47 -04:00
Nicolas Grekas
bec6ebc352 cs fix 2019-08-14 14:40:06 +02:00
Nicolas Grekas
507223dc73 Merge branch '4.3' into 4.4
* 4.3:
  Remove superfluous phpdoc tags
2019-08-14 14:37:46 +02:00
Nicolas Grekas
b3467e641c Merge branch '3.4' into 4.3
* 3.4:
  Remove superfluous phpdoc tags
2019-08-14 14:26:46 +02:00
Philippe Segatori
608e23c09a Remove superfluous phpdoc tags 2019-08-14 13:59:53 +02:00
Roland Franssen
29aee2ddf2 [Intl] Full alpha3 language support 2019-08-14 13:08:30 +02:00
Nicolas Grekas
0bdf10a886 Merge branch '4.3' into 4.4
* 4.3:
  cs fix
  Partially Revert "Remove trailing space in all markdown files"
  [Intl] Explicit check
  Fix getMaxFilesize() returning zero
  [DI] fix docblocks in Container*
  Fixed markdown file
  [TwigBridge] Replaced plain doc block copies with inheritdoc.
  [DomCrawler] Fixed CHANGELOG markup
  [Intl] Cleanup unused language aliases entry
2019-08-14 13:04:46 +02:00
Nicolas Grekas
cda8a67df8 Merge branch '3.4' into 4.3
* 3.4:
  cs fix
  Partially Revert "Remove trailing space in all markdown files"
  [Intl] Explicit check
  Fix getMaxFilesize() returning zero
  [DI] fix docblocks in Container*
  Fixed markdown file
  [TwigBridge] Replaced plain doc block copies with inheritdoc.
  [Intl] Cleanup unused language aliases entry
2019-08-14 13:02:36 +02:00
Nicolas Grekas
990a149edc minor #33158 [Intl] Explicit check (ro0NL)
This PR was merged into the 3.4 branch.

Discussion
----------

[Intl] Explicit check

| 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 | #...   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

This avoids a little conflict with #33140

data is not impacted (today), but i like to make our data selection as explicit as possible and avoid ever pulling in `deprecated` or e.g. `legacy` languages.

Commits
-------

fbd4ce4c5c [Intl] Explicit check
2019-08-14 12:59:22 +02:00
Grégoire Pineau
1587e9a4e2 [Monolog] Added ElasticsearchLogstashHandler 2019-08-14 12:08:23 +02:00
Nicolas Grekas
644edb0e93 cs fix 2019-08-14 11:39:58 +02:00
Nicolas Grekas
f23d1396dd minor #33160 Partially Revert "Remove trailing space in all markdown files" (lyrixx)
This PR was merged into the 3.4 branch.

Discussion
----------

Partially Revert "Remove trailing space in all markdown files"

This reverts commit 5a3c19846e22399f5ce43d366346dd404e2f825f.

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

Commits
-------

2aec7df12c Partially Revert "Remove trailing space in all markdown files"
2019-08-14 10:47:17 +02:00
Nicolas Grekas
663ba5b479 minor #33149 [DI] fix docblocks in Container* (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] fix docblocks in Container*

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

Backport from master.
Internally, services can be of any kind, but only `object|null` is allowed for public services.

Commits
-------

8e4d08fe95 [DI] fix docblocks in Container*
2019-08-14 10:46:52 +02:00
Grégoire Pineau
2aec7df12c Partially Revert "Remove trailing space in all markdown files"
This reverts commit 5a3c19846e22399f5ce43d366346dd404e2f825f.
2019-08-14 10:40:35 +02:00
Fabien Potencier
b382e622cf bug #33157 Fix getMaxFilesize() returning zero (ausi)
This PR was merged into the 3.4 branch.

Discussion
----------

Fix getMaxFilesize() returning zero

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

With #32790 a BC break got introduced. Previously an empty `upload_max_filesize` returned `PHP_INT_MAX` but after the changes from #32790 it returns `0`.

Setting `upload_max_filesize` or `post_max_size` to `0` or `''` disables the limit so for both cases `PHP_INT_MAX` should be returned.

Commits
-------

f4c2ea5b73 Fix getMaxFilesize() returning zero
2019-08-14 09:48:19 +02:00
Roland Franssen
fbd4ce4c5c [Intl] Explicit check 2019-08-14 08:36:48 +02:00
Martin Auswöger
f4c2ea5b73 Fix getMaxFilesize() returning zero 2019-08-14 08:35:19 +02:00
Nicolas Grekas
8e4d08fe95 [DI] fix docblocks in Container* 2019-08-13 22:10:42 +02:00
Fabien Potencier
7ae7a66f05 minor #33142 Fixed markdown file (lyrixx)
This PR was squashed before being merged into the 3.4 branch (closes #33142).

Discussion
----------

Fixed markdown file

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

136972506e Fixed markdown file
2019-08-13 19:39:17 +02:00
Grégoire Pineau
136972506e Fixed markdown file 2019-08-13 19:39:09 +02:00
Fabien Potencier
b06231fd24 minor #33141 [DomCrawler] Fixed CHANGELOG markup (lyrixx)
This PR was merged into the 4.3 branch.

Discussion
----------

[DomCrawler] Fixed CHANGELOG markup

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

3c56b12538 [DomCrawler] Fixed CHANGELOG markup
2019-08-13 19:38:16 +02:00
Fabien Potencier
04b411695e minor #33145 [TwigBridge] Replaced plain doc block copies with inheritdoc (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

[TwigBridge] Replaced plain doc block copies with inheritdoc

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

Commits
-------

e50d3bcf31 [TwigBridge] Replaced plain doc block copies with inheritdoc.
2019-08-13 18:39:16 +02:00
Michael Lutz
b3928d5ac3 [HttpFoundation] Fix deprecation message in ::isMethodSafe() 2019-08-13 12:17:15 -04:00
Alexander M. Turek
e50d3bcf31 [TwigBridge] Replaced plain doc block copies with inheritdoc. 2019-08-13 17:56:37 +02:00
Tobias Schultze
e5ecda6de1 [Messenger] make delay exchange and queues durable like the normal ones by default 2019-08-13 17:14:16 +02:00
Grégoire Pineau
3c56b12538 [DomCrawler] Fixed CHANGELOG markup 2019-08-13 17:04:37 +02:00
Roland Franssen
1689f77ef0 [Intl] Cleanup unused language aliases entry 2019-08-13 16:04:50 +02:00
Nicolas Grekas
50c5911229 feature #33137 [DI] deprecate support for non-object services (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[DI] deprecate support for non-object services

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

Follows #32432 /cc @derrabus
Prepares for adding the `?object` return-type on master.

Commits
-------

7c01c4c80c [DI] deprecate support for non-object services
2019-08-13 15:30:43 +02:00
Nicolas Grekas
32e0a25200 feature #32845 [HttpKernel][FrameworkBundle] Add alternative convention for bundle directories (yceruto)
This PR was squashed before being merged into the 4.4 branch (closes #32845).

Discussion
----------

[HttpKernel][FrameworkBundle] Add alternative convention for bundle directories

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

We already know that bundles must be compatible with many Symfony's versions, so it is very likely that current bundles won't be able to use this feature soon, unless they create symbolic links to support both structures.

The point is that this is already happening, so in the future when our bundles stop to support <=4.3 then you'll be sure to change the current directory structure.

We have recently added the `getPublicDir()` method in https://github.com/symfony/symfony/pull/31975, here I'm removing it in favor of hardcoding a new convention.

I've added some functional tests in which I've changed everything to this structure:
```
-- ModernBundle
   |-- config/
   |-- public/
   |-- src/
       |-- ModernBundle.php
   |-- templates/
   |-- translations/
```
WDYT?

Commits
-------

6996e1cbe2 [HttpKernel][FrameworkBundle] Add alternative convention for bundle directories
2019-08-13 15:29:11 +02:00
Yonel Ceruto
6996e1cbe2 [HttpKernel][FrameworkBundle] Add alternative convention for bundle directories 2019-08-13 15:29:02 +02:00
Nicolas Grekas
7c01c4c80c [DI] deprecate support for non-object services 2019-08-13 15:22:18 +02:00
Nicolas Grekas
d6773bc547 feature #32548 [Translation] XliffLintCommand: allow .xliff file extension (codegain)
This PR was merged into the 4.4 branch.

Discussion
----------

[Translation] XliffLintCommand: allow .xliff file extension

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

I ran into a problem with XLIFF files having an *.xliff extension and a "target-language" attribute.
The command always outputted: There is a mismatch between the language included in the file name and the value used used in the "target-language" attribute of the file.

The "target-language" attribute was set to "en" and the filename was also "menu.en.xliff".
After reading the source code, I realized that this regex does not respect other valied file extensions such as "xliff" for these files and therefore throws this (rather confusing) error.

Commits
-------

dba6a21eac [Translation] XliffLintCommand: allow .xliff file extension
2019-08-13 09:17:21 +02:00
Michael Steininger
dba6a21eac [Translation] XliffLintCommand: allow .xliff file extension 2019-08-13 09:15:19 +02:00
Fabien Potencier
44f6e947fc feature #28363 [Serializer] Encode empty objects as objects, not arrays (mcfedr)
This PR was merged into the 4.4 branch.

Discussion
----------

[Serializer] Encode empty objects as objects, not arrays

Allows Normalizers to return a representation of an empty object that the encoder recognizes as such.

Often PHP code is relaxed about the difference betweens arrays and objects, and particularly empty arrays are ambiguous. This preserves objects that would otherwise have turned into arrays as objects in the encoding.

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | No
| Deprecations? | No
| Tests pass?   | yes
| Fixed tickets | #23019
| License       | MIT
| Doc PR        | I'll do it if/when this might be merged

Commits
-------

f28e826627 [Serializer] Encode empty objects as objects, not arrays
2019-08-13 09:09:56 +02:00
Nicolas Grekas
046aff2c04 minor #33132 [Form] Add type declarations to private DefaultChoiceListFactory methods (vudaltsov)
This PR was merged into the 4.4 branch.

Discussion
----------

[Form] Add type declarations to private DefaultChoiceListFactory methods

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

These are the type declarations that can be safely added to private methods of the `DefaultChoiceListFactory` without breaking BC.

Commits
-------

9fc6ba66b3 Add type declarations to private DefaultChoiceListFactory methods
2019-08-13 08:55:08 +02:00
Nicolas Grekas
3ec91065f7 Merge branch '4.3' into 4.4
* 4.3:
  cs fix
  Fix return statements
  [TwigBridge] add missing dep
  Add false type to ChoiceListFactoryInterface::createView $label argument
  Update UPGRADE guide of 4.3 for EventDispatcher
  [SecurityBundle] display the correct class name on the deprecated notice
2019-08-13 08:48:26 +02:00
Nicolas Grekas
ad8c35feec bug #33126 [SecurityBundle] display the correct class name on the deprecated notice (maxhelias)
This PR was merged into the 4.3 branch.

Discussion
----------

[SecurityBundle] display the correct class name on the deprecated notice

| 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 -->
| Fixed tickets | -  <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | - <!-- 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
-------

8e64b9a7ec [SecurityBundle] display the correct class name on the deprecated notice
2019-08-13 08:39:28 +02:00
Nicolas Grekas
7d0795d0b8 Merge branch '3.4' into 4.3
* 3.4:
  Fix return statements
  [TwigBridge] add missing dep
  Add false type to ChoiceListFactoryInterface::createView $label argument
2019-08-13 08:39:03 +02:00
Nicolas Grekas
e6b52cc48a minor #33130 Fix return statements (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

Fix return statements

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

Discovered while working on #30323
This will sync the code from 3.4 up to master, where adding return types will require these.

Commits
-------

2bc05c83b4 Fix return statements
2019-08-13 08:33:19 +02:00
Nicolas Grekas
2bc05c83b4 Fix return statements 2019-08-13 08:33:05 +02:00
Nicolas Grekas
e72ae347a7 [TwigBridge] add missing dep 2019-08-13 08:30:45 +02:00
Valentin Udaltsov
9fc6ba66b3 Add type declarations to private DefaultChoiceListFactory methods 2019-08-13 09:07:15 +03:00
Valentin Udaltsov
8f5d1ca794 Add false type to ChoiceListFactoryInterface::createView $label argument 2019-08-13 09:00:22 +03:00
Maxime Helias
8e64b9a7ec [SecurityBundle] display the correct class name on the deprecated notice 2019-08-12 17:48:20 +02:00
Nicolas Grekas
b570ee1103 [WebLink] implement PSR-13 directly 2019-08-12 15:51:36 +02:00
Fred Cox
f28e826627 [Serializer] Encode empty objects as objects, not arrays
Allows Normalizers to return a representation of an empty object that the encoder recognizes as such.
2019-08-12 16:06:27 +03:00
Nicolas Grekas
1aa41ed918 Merge branch '4.3' into 4.4
* 4.3:
  [Form] fix return type on FormDataCollector
  [Cache][DI] cleanup
2019-08-12 13:55:02 +02:00
Nicolas Grekas
cca22c4a20 Merge branch '3.4' into 4.3
* 3.4:
  [Form] fix return type on FormDataCollector
2019-08-12 13:52:55 +02:00
Maxime Helias
de6b9efddd [Form] fix return type on FormDataCollector 2019-08-12 11:55:03 +02:00
Nicolas Grekas
ef2db217e2 [Cache][DI] cleanup 2019-08-12 09:38:14 +02:00
Nicolas Grekas
43739dbf53 Merge branch '4.3' into 4.4
* 4.3:
  [HttpFoundation] fix typo
2019-08-11 11:51:46 +02:00
Nicolas Grekas
f51f7e7b74 [HttpFoundation] fix typo 2019-08-11 11:51:13 +02:00
azjezz
f62a3c0810 [HttpFoundation] some cleanups 2019-08-11 11:22:42 +02:00
Nicolas Grekas
ed590ca16b Revert "bug #33092 [DependencyInjection] Improve an exception message (fabpot)"
This reverts commit 2f2d1aa053, reversing
changes made to 07cf927237.
2019-08-10 23:23:27 +02:00
Nicolas Grekas
e37f672c2b Merge branch '4.3' into 4.4
* 4.3:
  Bump minimal requirements
2019-08-10 23:16:51 +02:00
Jérémy Derussé
c874d3b778 Bump minimal requirements 2019-08-10 23:01:55 +02:00
Nicolas Grekas
50167b9509 Merge branch '4.3' into 4.4
* 4.3:
  cleanups
  Disable PHPUnit result cache on the CI
  [Security] Cleanup "Digest nonce has expired." translation
  [Translation] Highlight invalid translation status
  Added translations in validator for Serbian Cyrillic
  Added translations in validator for Serbian Latin
  [EventDispatcher] wrong Request class
  [DependencyInjection] improved exception message
2019-08-10 22:49:34 +02:00
Nicolas Grekas
9d9f5582b2 Merge branch '3.4' into 4.3
* 3.4:
  cleanups
  Disable PHPUnit result cache on the CI
  [Translation] Highlight invalid translation status
2019-08-10 22:47:15 +02:00
Nicolas Grekas
7fb7f59385 cleanups 2019-08-10 22:41:30 +02:00
Nicolas Grekas
d45b903935 minor #33110 Disable PHPUnit result cache on the CI (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

Disable PHPUnit result cache on the CI

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

We don't need it and disabling it works around the segfault on 4.3

Commits
-------

912d7db7dd Disable PHPUnit result cache on the CI
2019-08-10 21:57:59 +02:00
Nicolas Grekas
912d7db7dd Disable PHPUnit result cache on the CI 2019-08-10 20:59:22 +02:00
Roland Franssen
7aa1120993 [Security] Cleanup "Digest nonce has expired." translation 2019-08-10 09:37:37 +02:00
Roland Franssen
2d8015551e [Translation] Highlight invalid translation status 2019-08-10 09:29:37 +02:00
Fabien Potencier
1ca00893f6 Merge branch '3.4' into 4.3
* 3.4:
  Added translations in validator for Serbian Cyrillic
  Added translations in validator for Serbian Latin
2019-08-10 07:38:01 +02:00
Fabien Potencier
5e3bfad8c8 minor #33096 Added translations in validator for Serbian Cyrillic (Kristijan Kanalas)
This PR was squashed before being merged into the 3.4 branch (closes #33096).

Discussion
----------

Added translations in validator for Serbian Cyrillic

Resolves #30188

Should be able for merges in branches >3.4, not sure how to do that tho :(

Commits
-------

23d4a23b46 Added translations in validator for Serbian Cyrillic
2019-08-10 07:37:06 +02:00
Kristijan Kanalas
23d4a23b46 Added translations in validator for Serbian Cyrillic 2019-08-10 07:36:57 +02:00
Fabien Potencier
143789cabe minor #33097 Added translations in validator for Serbian Latin (Kristijan Kanalas)
This PR was squashed before being merged into the 3.4 branch (closes #33097).

Discussion
----------

Added translations in validator for Serbian Latin

[Validator] Added translations
Related to #30188

Working on Serbian Cyrillic I saw that Latin translations are also missing some translations so this is a PR related to that. As said in the Cyrillic PR this should be able to be merged in all branches above 3.4, but I am not sure how to do that.

Commits
-------

fbe7362362 Added translations in validator for Serbian Latin
2019-08-10 07:35:48 +02:00
Kristijan Kanalas
fbe7362362 Added translations in validator for Serbian Latin 2019-08-10 07:35:39 +02:00
Maxime Helias
97d6184123 [EventDispatcher] wrong Request class 2019-08-09 15:57:59 +02:00
Fabien Potencier
2f2d1aa053 bug #33092 [DependencyInjection] Improve an exception message (fabpot)
This PR was merged into the 4.3 branch.

Discussion
----------

[DependencyInjection] Improve an exception message

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

When defining a service with an id that is also a class name, you might have an error message like `Class “” used for service “\App\Some\Service” cannot be found.` if your is starts with a backslash.

The new error message is now hopefully less cryptic: `Service definition "\App\Some\Service" has no class, and its name looks like a FQCN but it starts with a backslash; remove the leading backslash.`

Commits
-------

3647ccaeca [DependencyInjection] improved exception message
2019-08-09 14:54:19 +02:00
Nicolas Grekas
24858f2aee Merge branch '4.3' into 4.4
* 4.3:
  Bump minimal requirements
  Use PHPUnit 8.3 on Travis when possible
2019-08-09 14:40:26 +02:00
Nicolas Grekas
07cf927237 Merge branch '3.4' into 4.3
* 3.4:
  Bump minimal requirements
  Use PHPUnit 8.3 on Travis when possible
2019-08-09 14:37:48 +02:00
Fabien Potencier
3647ccaeca [DependencyInjection] improved exception message 2019-08-09 14:35:59 +02:00
Fabien Potencier
8c91e7e48a Merge branch '4.3' into 4.4
* 4.3:
  [HttpKernel] fixed class having a leading \ in a route controller
  [HttpKernel] trim the leading backslash in the controller init
2019-08-09 14:17:13 +02:00
Fabien Potencier
3c8d395d0d [HttpKernel] fixed class having a leading \ in a route controller 2019-08-09 14:15:48 +02:00
Amrouche Hamza
6fdf2527d6 [HttpKernel] trim the leading backslash in the controller init 2019-08-09 14:15:48 +02:00
Jérémy Derussé
41d94c3226
Bump minimal requirements 2019-08-09 13:59:47 +02:00
Nicolas Grekas
1964016d07 Merge branch '4.3' into 4.4
* 4.3:
  Fix typo
  Fix unitialized variable in DeprecationErrorHandler
  fix Danish translations
  Added the missing translations for the Slovak 'sk' locale.
  [HttpFoundation] Clear invalid session cookie
  Fix tst patern to handle callstack with/without return typehint
  Fix negative DateInterval
2019-08-09 13:48:22 +02:00
Nicolas Grekas
ece1532f27 Merge branch '3.4' into 4.3
* 3.4:
  Fix typo
  Fix unitialized variable in DeprecationErrorHandler
  fix Danish translations
  Added the missing translations for the Slovak 'sk' locale.
  Fix negative DateInterval
2019-08-09 13:45:54 +02:00
Nicolas Grekas
d851a794fc Fix typo 2019-08-09 13:44:41 +02:00
Nicolas Grekas
7bfd7bb664 minor #33087 Fix unitialized variable in DeprecationErrorHandler (jderusse)
This PR was merged into the 3.4 branch.

Discussion
----------

Fix unitialized variable in DeprecationErrorHandler

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

In some case the variable `isAtLeastPhpUnit83` were not initialized (see https://github.com/symfony/symfony/pull/33079/files#r312406060).
This PR initialize it when needed.

Commits
-------

310e5c7549 Fix unitialized variable in DeprecationErrorHandler
2019-08-09 13:31:42 +02:00
Jérémy Derussé
310e5c7549
Fix unitialized variable in DeprecationErrorHandler 2019-08-09 11:49:26 +02:00
Christian Flothmann
6e0c916eaf fix Danish translations 2019-08-09 11:35:22 +02:00
Fabien Potencier
121f426418 feature #33078 Add compatibility trait for PHPUnit constraint classes (alcaeus)
This PR was merged into the 4.4 branch.

Discussion
----------

Add compatibility trait for PHPUnit constraint classes

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

Similar to the SetUpTearDownTrait, this trait removes the pain of dealing with method signature changes. The `PHPUnit\Framework\Constraint\Constraint` class added return type hints in PHPUnit 7 which this trait will take care of.

Commits
-------

908c8c1f15 Add compatibility trait for PHPUnit constraint classes
2019-08-09 11:30:34 +02:00
Fabien Potencier
32b2a5251d feature #32988 [Intl] Support ISO 3166-1 Alpha-3 country codes (terjebraten-certua)
This PR was merged into the 4.4 branch.

Discussion
----------

[Intl] Support ISO 3166-1 Alpha-3 country codes

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

This is a pre-requiste for fixing #20313 and only handles the changes to the INTL component.

Commits
-------

848f60e905 Support ISO 3166-1 Alpha-3 country codes
2019-08-09 11:14:26 +02:00
Terje Bråten
848f60e905 Support ISO 3166-1 Alpha-3 country codes 2019-08-09 09:42:26 +01:00
Jan Vernarsky
32a085a75f Added the missing translations for the Slovak 'sk' locale. 2019-08-09 10:35:07 +02:00
Jérémy Derussé
56d5d6d0e6
Add deprecation for method signature 2019-08-09 10:19:49 +02:00
Andreas Braun
908c8c1f15
Add compatibility trait for PHPUnit constraint classes 2019-08-09 09:31:28 +02:00
Yanick Witschi
b22a7263b9 [HttpFoundation] Clear invalid session cookie 2019-08-09 09:08:17 +02:00
Fabien Potencier
8c255923d8 feature #32598 [FrameworkBundle][Routing] Private service route loaders (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle][Routing] Private service route loaders

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

Continuation of https://github.com/symfony/symfony/pull/30926.

~Please review only the 2nd commit, I'm building this on top of https://github.com/symfony/symfony/pull/32582.~

Commits
-------

64aa2c8529 [FrameworkBundle][Routing] Private service route loaders
2019-08-09 08:48:02 +02:00
Fabien Potencier
865e4d7fdf feature #32486 [DoctrineBridge] Invokable event listeners (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

[DoctrineBridge] Invokable event listeners

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

Invokable Doctrine entity listeners will likely be supported in the next version of the DoctrineBundle (cf https://github.com/doctrine/DoctrineBundle/pull/989).

I think it would also be great to support it for Doctrine event listeners.

Commits
-------

47e872a826 [DoctrineBridge] Allow invokable event listeners
2019-08-09 08:38:52 +02:00
Fabien Potencier
5ce3a61660 feature #31083 [Validator] Allow objects implementing __toString() to be used as violation messages (mdlutz24)
This PR was merged into the 4.4 branch.

Discussion
----------

[Validator] Allow objects implementing __toString() to be used as violation messages

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        | I didn't see a doc on violations to update, but I'm happy to do documentation if somone can suggest the best place to do it.

Currently in the Drupal project we use Translatable Markup object to hold most strings and currently pass them in as Constraint Violation messages. In Symfony 3 this works but with the added typehinting in Symfony 4, these markup objects are rendered into strings at the time of the violation creation.  This causes any html in the message string to be considered unsafe by twig later in our rendering process.  This pr explicitly allows objects implementing a __toString() method to be used as violation messages, and the violation will save and return the original stringable object.

See https://www.drupal.org/project/drupal/issues/3029540 For our Drupal issue on the subject.

Commits
-------

79f4dcd2dc [Validator] Allow objects implementing __toString() to be used as violation messages
2019-08-09 08:10:48 +02:00
Fabien Potencier
e848729ba7 bug #33066 [Serializer] Fix negative DateInterval (jderusse)
This PR was merged into the 3.4 branch.

Discussion
----------

[Serializer] Fix negative DateInterval

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

This PR adds support for negative and signed DateInterval

Commits
-------

abb8a676ba Fix negative DateInterval
2019-08-09 08:01:14 +02:00
Nicolas Grekas
1b98df7c64 minor #33067 [VarDumper] Fix test patern to handle callstack with/without return typehint (jderusse)
This PR was merged into the 4.3 branch.

Discussion
----------

[VarDumper] Fix test patern to handle callstack with/without return typehint

| 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 TestCase::tearDownAfterClass methods does not always have the same signature which change the output of the reflection. This use another methods for testing

Commits
-------

feaadd1c0b Fix tst patern to handle callstack with/without return typehint
2019-08-08 23:10:45 +02:00
Nicolas Grekas
6888e702b9 Merge branch '4.3' into 4.4
* 4.3:
  Replace warning by isolated test
2019-08-08 22:52:24 +02:00
Nicolas Grekas
85c50119f1 Merge branch '3.4' into 4.3
* 3.4:
  Replace warning by isolated test
2019-08-08 22:52:04 +02:00
Jérémy Derussé
9c45a8e093 Replace warning by isolated test 2019-08-08 22:45:38 +02:00
Jérémy Derussé
05640456c6
Fix deprecation in 4.4 branche 2019-08-08 21:31:13 +02:00
Jérémy Derussé
feaadd1c0b
Fix tst patern to handle callstack with/without return typehint 2019-08-08 21:16:30 +02:00
Jérémy Derussé
abb8a676ba
Fix negative DateInterval 2019-08-08 20:43:11 +02:00
Nicolas Grekas
29dbbe1b2d feature #32122 [HttpFoundation] deprecate HeaderBag::get() returning an array and add all($key) instead (Simperfit)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpFoundation] deprecate HeaderBag::get() returning an array and add all($key) instead

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | yes <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | maybe <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #31317  <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | todo <!-- 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.
-->

the $first param has been deprecated in the get methid
and we are adding a $key parameter to all to get all values from a key as arrays
Do we deprecated the get method ? if so this will be a little bigger in terms of changes.

Commits
-------

2c5a8f1bdf [HttpFoundation] deprecate using $first in get and added key in all
2019-08-08 20:15:43 +02:00
Amrouche Hamza
2c5a8f1bdf [HttpFoundation] deprecate using $first in get and added key in all 2019-08-08 20:14:46 +02:00
Michael Lutz
79f4dcd2dc [Validator] Allow objects implementing __toString() to be used as violation messages
[Validator] updated changelog

[Validator] updated typehint for ConstraintViolationInterface::getMessage()

[Validator] fixed spacing issue inadvertantly added in previous commit

[Validator] fixed coding standard issues

[Validator] Address feedback

[Validator] Fix coding standard violation

[Validator] update tests

[Validator] Address feedback, Round 2

[Validator] Document ConstraintViolationBuilder::__construct()  parameter

[Validator] Update changelog

[Validator] Adjust parameter documentation order
2019-08-08 13:18:47 -04:00
Nicolas Grekas
cf57007425 Merge branch '4.3' into 4.4
* 4.3:
  [Intl] use strict comparisons
  Fix s-maxage=3 transient test
2019-08-08 19:11:47 +02:00
Nicolas Grekas
38f08ba9dc Merge branch '3.4' into 4.3
* 3.4:
  [Intl] use strict comparisons
  Fix s-maxage=3 transient test
2019-08-08 19:11:28 +02:00
Tobias Schultze
02a90d2066 [Intl] use strict comparisons 2019-08-08 19:01:37 +02:00
Nicolas Grekas
d84ee870c2 minor #33051 [HttpKernel] Fix s-maxage=3 transient test (jderusse)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpKernel] Fix s-maxage=3 transient test

| 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

sometime the http server returns a `s-maxage=3` header (https://travis-ci.org/symfony/symfony/jobs/569326531)
This PR fixes tests to allow both 2 and 3

Commits
-------

f019b5214d Fix s-maxage=3 transient test
2019-08-08 17:36:09 +02:00
Nicolas Grekas
e0ccbf667a minor #33056 cleanup remaining param $options and internal Intl FullTransformer (Tobion)
This PR was merged into the 4.4 branch.

Discussion
----------

cleanup remaining param $options and internal Intl FullTransformer

| 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 |#...   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        |

Continuation of #33020 and #33019

Commits
-------

5dbcdc6ff4 cleanup remaining param  and internal Intl FulLTransformer
2019-08-08 17:14:45 +02:00
Nicolas Grekas
f91fa10c6c bug #33058 [HttpClient] fix data loss when streaming as a PHP resource (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] fix data loss when streaming as a PHP resource

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

I've just experienced failures like:
> StreamWrapper::stream_read - read 822 bytes more data than requested (9014 read, 8192 max) - excess data will be lost

This fixes it.

Commits
-------

99884e63b5 [HttpClient] fix data loss when streaming as a PHP resource
2019-08-08 17:14:06 +02:00
Nicolas Grekas
bf73bd4942 Merge branch '4.3' into 4.4
* 4.3:
  Improve some URLs
  Fix test compatibility with 4.x components
  [Cache] cs fix
2019-08-08 17:13:31 +02:00
Nicolas Grekas
fdf6fc349c Merge branch '3.4' into 4.3
* 3.4:
  Improve some URLs
  Fix test compatibility with 4.x components
  [Cache] cs fix
2019-08-08 17:11:33 +02:00
Nicolas Grekas
e4bb3a24c3 minor #32800 Improve some URLs (Arman-Hosseini)
This PR was squashed before being merged into the 3.4 branch (closes #32800).

Discussion
----------

Improve some URLs

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

fab17a4487 Improve some URLs
2019-08-08 17:01:55 +02:00
Arman Hosseini
fab17a4487 Improve some URLs 2019-08-08 17:01:12 +02:00
Tobias Schultze
5dbcdc6ff4 cleanup remaining param and internal Intl FulLTransformer 2019-08-08 16:35:53 +02:00
Nicolas Grekas
99884e63b5 [HttpClient] fix data loss when streaming as a PHP resource 2019-08-08 16:08:32 +02:00
Jérémy Derussé
bb3cb64e64
Fix test compatibility with 4.x components 2019-08-08 15:49:16 +02:00
Jérémy Derussé
f019b5214d
Fix s-maxage=3 transient test 2019-08-08 15:12:35 +02:00
Nicolas Grekas
053ad8d0a4 [Cache] fix merge 2019-08-08 14:32:45 +02:00
Nicolas Grekas
e95b8a3291 [Cache] cs fix 2019-08-08 14:31:29 +02:00
Nicolas Grekas
32389f8b7f Merge branch '4.3' into 4.4
* 4.3:
  Disable phpunit typehint patch on 4.3 branch
  Fix deprecation on 4.3
2019-08-08 14:07:40 +02:00
Nicolas Grekas
f773217622 minor #33000 Fix deprecations on 4.3 (jderusse)
This PR was merged into the 4.3 branch.

Discussion
----------

Fix deprecations on 4.3

| 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

Fix deprecations in branch 4.3
note: remaining deprecation `assertStringContainsString` will be fixed in #32977

* [ ] fix tests in branch 3.4 in #32981

Commits
-------

8fd16a6bee Fix deprecation on 4.3
2019-08-08 14:05:37 +02:00
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
11fab74e5c Merge branch '4.3' into 4.4
* 4.3:
  Fix compatibility with PHPUnit 8
2019-08-08 12:05:21 +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
Fabien Potencier
692a6e7495 Remove unneeded phpdocs 2019-08-08 11:37:48 +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
2273de0011 Merge branch '4.3' into 4.4
* 4.3:
  consistently throw NotSupportException
  [HttpKernel] Clarify error handler restoring process again
  [HttpClient] Remove CURLOPT_CONNECTTIMEOUT_MS curl opt
  [Intl] fix nullable phpdocs and useless method visibility of internal class
  Resilience against file_get_contents() race conditions.
2019-08-08 11:18:35 +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
fbaf4acf25 minor #33018 remove some more useless phpdocs (Tobion)
This PR was merged into the 4.4 branch.

Discussion
----------

remove some more useless phpdocs

| 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 | #...   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

Fix some leftovers from #32974 and #32786

Commits
-------

9be4d171e0 remove some more useless phpdocs
2019-08-08 11:14: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
b0444f28b2 minor #32993 Turned return type annotations of private methods into php return types (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

Turned return type annotations of private methods into php return types

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

As discussed with @nicolas-grekas in https://github.com/symfony/symfony/pull/30323#issuecomment-518638124, this PR attempts to turn `@return` annotations on private methods into return type declarations.

Commits
-------

f54ca001fe Turned return type annotations of private methods into php return types.
2019-08-08 10:48:45 +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
c61b4f239a minor #33030 [Console] add missing conflict rule (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[Console] add missing conflict rule

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

The LockableTrait uses the LockFactory introduced in Symfony 4.4.

Commits
-------

a63df9c2c6 add missing conflict rule
2019-08-08 09:55:50 +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
Christian Flothmann
90b5dca192 remove wrongly added legacy group from test
This was missed to be removed when tests from the legacy implementation
where copied from the Security component.
2019-08-08 08:51:31 +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
Christian Flothmann
a63df9c2c6 add missing conflict rule
The LockableTrait uses the LockFactory introduced in Symfony 4.4.
2019-08-08 08:34:09 +02:00
Jérémy Derussé
8fd16a6bee
Fix deprecation on 4.3 2019-08-08 00:24:12 +02:00
Nicolas Grekas
700167e626 Merge branch '4.3' into 4.4
* 4.3:
  remove deprecated cache pool arguments
2019-08-07 19:20:22 +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
Tobias Schultze
9be4d171e0 remove some more useless phpdocs 2019-08-07 17:39:12 +02:00
Alexander M. Turek
5892837641 Resilience against file_get_contents() race conditions. 2019-08-07 17:07:08 +02:00
Alexander M. Turek
f54ca001fe Turned return type annotations of private methods into php return types. 2019-08-07 16:19:54 +02:00
Nicolas Grekas
f4f2fda81f Merge branch '4.3' into 4.4
* 4.3:
  [FrameworkBundle][Config] Ignore exeptions thrown during reflection classes autoload
2019-08-07 16:10:16 +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
Yonel Ceruto
38ff26449c minor #33013 [ErrorRenderer] Fix timestamp on logs view (maxhelias)
This PR was merged into the 4.4 branch.

Discussion
----------

[ErrorRenderer] Fix timestamp on logs view

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

This syntax raises a php exception :
```php
(new \DateTime($log['timestamp']))->format('H:i:s');
```

```
<br />
<b>Fatal error</b>:  Uncaught Exception: DateTime::__construct(): Failed to parse time string (1565179387) at position 7 (3): Unexpected character in [...][...]:4
Stack trace:
#0 [...][...](4): DateTime-&gt;__construct('1565179387')
#1 {main}
  thrown in <b>[...][...]</b> on line <b>4</b><br />
```

Commits
-------

a0ad2d0 [ErrorRenderer] Fix timestamp on logs view
2019-08-07 09:14:15 -04:00
Maxime Helias
a0ad2d0caa [ErrorRenderer] Fix timestamp on logs view 2019-08-07 15:04:17 +02:00
Nicolas Grekas
d3a7be81b4 Merge branch '4.3' into 4.4
* 4.3:
  Fix some return type annotations.
2019-08-07 14:31:40 +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
158482fdc3 fix merge 2019-08-07 14:06:11 +02:00
Nicolas Grekas
a0c2aa8302 Merge branch '4.3' into 4.4
* 4.3:
  Fix inconsistent return points.
  pass translation parameters to the trans filter
  [Mime] fixed wrong mimetype
  [ProxyManagerBridge] Polyfill for unmaintained version
  [HttpClient] Declare `$active` first to prevent weird issue
  Remove deprecated assertContains
  [HttpClient] fix tests
  SCA: dropped unused mocks, duplicate import and a function alias usage
  Added correct plural for box -> boxes
  [Config] fix test
  Fix remaining tests
  Improve fa (persian) translation
2019-08-07 14:00:28 +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
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
3d6eb4075a [HttpClient] fix tests 2019-08-07 09:35:08 +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
d94c4b4c6d bug #32963 [Mailer] fix getName() when transport is null (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[Mailer] fix getName() when transport is null

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

Commits
-------

ee4192ebc7 fix getName() when transport is null
2019-08-06 22:00:28 +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
Robin Chalas
6723bb9cdf bug #32957 [Console] Check for ErrorHandler classes (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

[Console] Check for ErrorHandler classes

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

Commits
-------

48b358d036 [Console] Check for ErrorHandler classes
2019-08-06 17:45:20 +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
Nicolas Grekas
b59c8654b5 minor #32984 [HttpClient] Relax max duration test assertion (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] Relax max duration test assertion

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

cf https://travis-ci.org/symfony/symfony/jobs/568304532 - It looks like with the curl client, the actual duration can be a little less than the configured max duration. Note that the same test did not fail on the PR...

Commits
-------

3cbb978b00 [HttpClient] Relax max duration test assertion
2019-08-06 14:20:22 +02:00
Nicolas Grekas
fc8872fca3 minor #32964 add yceruto as code owner of the ErrorRenderer component (yceruto)
This PR was squashed before being merged into the 4.4 branch (closes #32964).

Discussion
----------

add yceruto as code owner of the ErrorRenderer component

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

Commits
-------

df6e73dd2d add yceruto as code owner of the ErrorRenderer component
2019-08-06 14:17:09 +02:00
Yonel Ceruto
df6e73dd2d add yceruto as code owner of the ErrorRenderer component 2019-08-06 14:17:02 +02:00
Thomas Calvet
3cbb978b00 [HttpClient] Relax max duration test assertion 2019-08-06 14:14:26 +02:00
Nicolas Grekas
3498259b12 feature #32807 [HttpClient] add "max_duration" option (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] add "max_duration" option

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

Commits
-------

a4178f1369 [HttpClient] add "max_duration" option
2019-08-06 10:45:25 +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
405c64c16d Merge branch '4.3' into 4.4
* 4.3:
  fix merge
2019-08-06 09:39:58 +02:00
Nicolas Grekas
36466a3ab5 fix merge 2019-08-06 09:38:50 +02:00
Christian Flothmann
2070e30018 feature #31546 [Dotenv] Use default value when referenced variable is not set (j92)
This PR was squashed before being merged into the 4.4 branch (closes #31546).

Discussion
----------

[Dotenv] Use default value when referenced variable is not set

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | yes <!-- 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 | #...   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/11956 <!-- required for new features -->

In bash you have the option to define a default variable like this:
```bash
FOO=${VARIABLE:-default}
```

When VARIABLE is not set
```bash
FOO=${VARIABLE:-default} #FOO=default
```

When VARIABLE is set:
```bash
VARIABLE=test
FOO=${VARIABLE:-default} #FOO=test
```

If others find this also a good idea, I will write documentation and add the Doc PR. But first I would like some feedback to check if anyone agrees with this feature.

Commits
-------

790dbad149 [Dotenv] Use default value when referenced variable is not set
2019-08-06 09:27:26 +02:00
Joost van Driel
790dbad149 [Dotenv] Use default value when referenced variable is not set 2019-08-06 09:27:04 +02:00
Nicolas Grekas
94a0719bfc minor #32974 "An instance of X" phpdocs removal (fabpot)
This PR was merged into the 4.4 branch.

Discussion
----------

"An instance of X" phpdocs removal

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

That's #32973 on 4.4 :P

Commits
-------

7a44ed6544 removed unneeded phpdocs
2019-08-06 09:13:58 +02:00
Nicolas Grekas
34e86761f4 Merge branch '4.3' into 4.4
* 4.3:
  bump phpunit-bridge cache-id
  Use assertStringContainsString when needed
  Use assert assertContainsEquals when needed
  Use assertEqualsWithDelta when required
2019-08-06 09:11:23 +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
Christian Flothmann
ee4192ebc7 fix getName() when transport is null 2019-08-06 09:00:18 +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
Fabien Potencier
7a44ed6544 removed unneeded phpdocs 2019-08-06 08:19:29 +02:00
Jérémy Derussé
058ef39bae
Use assertStringContainsString when needed 2019-08-06 08:15:37 +02:00
Jérémy Derussé
e2c847fbbb
Fix name of logical classes 2019-08-06 01:58:57 +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
Thomas Calvet
48b358d036 [Console] Check for ErrorHandler classes 2019-08-05 19:43:14 +02:00
Fabien Potencier
4aeca4ec9c [Mailer] made the message logger permanent 2019-08-05 18:46:42 +02:00
Fabien Potencier
23f237b92f added PHPUnit constraints and assertions for the Mailer 2019-08-05 18:16:42 +02:00
Fabien Potencier
fdaf0e0cf4 feature #32912 [Mailer] Add support for the profiler (fabpot)
This PR was merged into the 4.4 branch.

Discussion
----------

[Mailer] Add support for the profiler

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

Web profiler for the Mailer.

Commits
-------

f152314e28 [Mailer] added support for the profiler
2019-08-05 17:51:23 +02:00
Nicolas Grekas
38143c604f Merge branch '4.3' into 4.4
* 4.3:
  [Form] Fix inconsistencies
  Use Phpunit FQDN in tests comments
2019-08-05 16:24:36 +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
5ef437b5f4 Merge branch '4.3' into 4.4
* 4.3:
  Minor fixes
  [HttpClient] Minor fixes
  Use namespaced Phpunit classes
  [Messenger] Fixed ConsumeMessagesCommand configuration
  [Form] remove leftover int child phpdoc
  Support DateTimeInterface in IntlDateFormatter::format
  [PhpUnitBridge] fixed PHPUnit 8.3 compatibility: method handleError was renamed to __invoke
  fixed phpdocs
  Use PHPunit assertion
  [Intl] Order alpha2 to alpha3 mapping + phpdoc fixes
2019-08-05 16:07:36 +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
Fabien Potencier
77951de0e3 [Mailer] fixed dispatcher not available in Mailer 2019-08-05 15:28:06 +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
Nicolas Grekas
0c95aad721 feature #32940 [PhpUnitBridge] Add polyfill for PhpUnit namespace (jderusse)
This PR was merged into the 4.4 branch.

Discussion
----------

[PhpUnitBridge] Add polyfill for PhpUnit namespace

| 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 provides PhpUnit >= 6 Namespaces class.

This will simplify tests that have to be compatible with multiple version of PHPUnit

```diff
- if (class_exists('PHPUnit_Foo')) {
-   PHPUnit_Foo::bar():
- } else {
-   \PHPUnit\Foo::bar();
- }
+ \PHPUnit\Foo::bar();
```

WIP  => waiting for #32941 to be green

Commits
-------

b7520f738d Add polyfill for PhpUnit namespace
2019-08-05 15:08:36 +02:00
Jérémy Derussé
b7520f738d
Add polyfill for PhpUnit namespace 2019-08-05 15:03:15 +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
Thomas Calvet
64aa2c8529 [FrameworkBundle][Routing] Private service route loaders 2019-08-05 14:35:27 +02:00
Robin Chalas
f6ea70491c feature #31843 [Security] add support for opportunistic password migrations (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[Security] add support for opportunistic password migrations

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #31139
| License       | MIT
| Doc PR        | -
| Maker PR | symfony/maker-bundle#389

With this last piece, we'll provide opportunistic password migrations out of the box.
This finishes the story drafted in #31153, see there for more info.

Commits
-------

2cfc5c7dd6 [Security] add support for opportunistic password migrations
2019-08-05 14:30:57 +02:00
Pierre du Plessis
b1e160c41e
Support DateTimeInterface in IntlDateFormatter::format 2019-08-05 14:17:55 +02:00
Thomas Calvet
47e872a826 [DoctrineBridge] Allow invokable event listeners 2019-08-05 14:08:18 +02:00
Thomas Calvet
a4178f1369 [HttpClient] add "max_duration" option 2019-08-05 12:08:40 +02:00
karser
0c9539fdb4 [PhpUnitBridge] fixed PHPUnit 8.3 compatibility: method handleError was renamed to __invoke 2019-08-05 12:06:06 +02:00
Pierre du Plessis
fbef8543cd [Yaml] Removed unused $nullAsTilde property 2019-08-05 11:41:41 +02:00
Nicolas Grekas
2cfc5c7dd6 [Security] add support for opportunistic password migrations 2019-08-05 10:47:47 +02:00
Robin Chalas
f64d3fc23e minor #32938 [Lock] Legacy test should implement legacy interface (Simperfit)
This PR was merged into the 4.4 branch.

Discussion
----------

[Lock] Legacy test should implement legacy interface

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

This was updated wrongly when working on the removing the interface usage.

Commits
-------

920db2fc18 [Lock] Legacy test should implement legacy interface
2019-08-05 10:18:50 +02:00
Amrouche Hamza
920db2fc18
[Lock] Legacy test should implement legacy interface 2019-08-05 09:00:45 +02:00
Robin Chalas
3e523ddd51 fix case 2019-08-05 08:30:47 +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
94f588a706 Merge branch '4.3' into 4.4
* 4.3:
  [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:38 +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
Fabien Potencier
8b9de7d967 Merge branch '4.3' into 4.4
* 4.3:
  [Messenger] Removed named parameters and replaced with `?` placeholders for sqlsrv compatibility
  [HttpClient] use "idle" instead of "inactivity" when telling about the timeout option
  Create mailBody with only attachments part present
  [Messenger] Fix incompatibility with FrameworkBundle <4.3.1
2019-08-05 07:48:44 +02:00
Fabien Potencier
02c1decd3c minor #32928 [HttpClient] use "idle" instead of "inactivity" when telling about the timeout option (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient] use "idle" instead of "inactivity" when telling about the timeout option

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

I feel like this might be easier to understand.
This is also the word I used in the doc.

Commits
-------

d2c4bf0da8 [HttpClient] use "idle" instead of "inactivity" when telling about the timeout option
2019-08-05 07:44:07 +02:00
Fabien Potencier
b13e6affe4 bug #32792 [Messenger] Fix incompatibility with FrameworkBundle <4.3.1 (chalasr)
This PR was merged into the 4.3 branch.

Discussion
----------

[Messenger] Fix incompatibility with FrameworkBundle <4.3.1

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

Aims to fix an edge case where you install (or upgrade to) symfony/messenger >=4.3.1 while having symfony/framework-bundle <4.3.1 installed.

Commits
-------

5d739704f2 [Messenger] Fix incompatibility with FrameworkBundle <4.3.1
2019-08-05 07:38:57 +02:00
Fabien Potencier
84d5996c41 feature #32824 [Ldap] Add security LdapUser and provider (chalasr)
This PR was merged into the 4.4 branch.

Discussion
----------

[Ldap] Add security LdapUser and provider

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

Moves `LdapUserProvider` from `Security\Core` to the Ldap component, the provider now deals with a new `LdapUser` aware of its ldap `Entry` (should help in #31843).

Commits
-------

6736cdfec3 [Ldap] Add security LdapUser and provider
2019-08-05 07:37:48 +02:00
Fabien Potencier
b74ccda2cb feature #32922 [PhpUnitBridge] make the bridge act as a polyfill for newest PHPUnit features (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[PhpUnitBridge] make the bridge act as a polyfill for newest PHPUnit features

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

It's been quite a tunnel these days with @jderusse but here we are: the phpunit-bridge is now a fully working polyfill for newest PHPUnit features. All related PRs have been merged as "minor" but they are now ready for prime time, hence this PR that I'd like to be merged as "feature", to make it part of the changelog of Symfony 4.4.

As of version 4.4, the `simple-phpunit` script will run an augmented version of PHPUnit, that will provide the newest assertions of PHPUnit 8 even if you happen to be running PHPUnit 4.8+ (because you still need to test on PHP 5.5, as Symfony does.)

The bridge currently provides polyfills for the methods that are needed to make our tests pass on PHP 7.4 with no deprecations:
- #32878 #32907 `assertString(Not)ContainsString(IgnoringCase)`, `assertEqualsWithDelta` and `assert(Not)ContainsEquals`
- #32875 `expectException*`, which replace `@expectedException*` annotations
- #32846 `assertIs*`, which replace `assertInternalType`
- #32865 `create(Partial)Mock`
- #32931 `assert(File|Directory)(Not)(Exists|IsReadable|IsWritable)`

More polyfills might be added if you need them. PRs welcome as usual.

As of #32882, when the `SYMFONY_PHPUNIT_REMOVE_RETURN_TYPEHINT` is set to `1`, `simple-phpunit` will also [patch](884669b83b/src/Symfony/Bridge/PhpUnit/bin/simple-phpunit.php (L149)) the source of PHPUnit 8 to remove the `void` return-type on `setUp*`/`tearDown*`. This is required when the same codebase must be tested against PHP 5.5 up to 7.4+ (as does our branch 3.4). For codebases that don't want or can't run their tests with `simple-phpunit` but want to run their PHP 5.5 tests with PHPUnit 8, the bridge provides a new `SetUpTearDownTrait` that allows a [smooth transition](c59a4d2dec/src/CachePoolTest.php (L21)) to it.

Along the path, we also created a new tool for our CI: it's now possible to submit a new polyfill on the current feature-branch (4.4 these days) and test it with a PR on another branch. See #32887 for the patch.

All these new features have been added to achieve PHP 7.4 support on branch 3.4. There are still many deprecations that need to be fixed, all tracked in #32844. It should be a pretty nice list of "good first issues". Thank you @luispabon, @tweichart, @Alexander1000 BTW.

A big specific thank you to @jderusse for the help!

Let's rock PHP 7.4, can't wait for your PRs, see you on #32844 :)

Commits
-------

271211b1f6 [PhpUnitBridge] make the bridge act as a polyfill for newest PHPUnit features
2019-08-05 07:28:35 +02:00
Fabien Potencier
c674042a4a bug #32836 [Messenger] Removed named parameters and replaced with ? placeholders for sqlsrv compatibility (David Legatt)
This PR was squashed before being merged into the 4.3 branch (closes #32836).

Discussion
----------

[Messenger] Removed named parameters and replaced with `?` placeholders for sqlsrv compatibility

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

I edited the Doctrine Transport Connection class to use `?` placeholders in the query builder instead of named repositories as this resulted in a compatibility issue with SQL Server.

Commits
-------

fc0e4baf2f [Messenger] Removed named parameters and replaced with `?` placeholders for sqlsrv compatibility
2019-08-05 07:25:00 +02:00
David Legatt
fc0e4baf2f [Messenger] Removed named parameters and replaced with ? placeholders for sqlsrv compatibility 2019-08-05 07:24:51 +02:00
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
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
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
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
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
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