Commit Graph

34838 Commits

Author SHA1 Message Date
Amrouche Hamza
ff0c14171b
[Console] Update to inherit and add licence 2019-07-08 07:40:49 +02:00
Alexis Lefebvre
0c326d0b55 Add missing test for workflow dump description 2019-07-08 07:36:18 +02:00
Roland Franssen
8ffc61692d
[Intl] Remove --dev from intl compile autoloader 2019-07-07 09:15:14 +02:00
Tobias Schultze
50b3ec4dc5 [Messenger] fix publishing headers set on AmqpStamp 2019-07-07 01:21:29 +02:00
Tobias Schultze
52e8523f4a bug #32398 [Messenger] Removes deprecated call to ReflectionType::__toString() on MessengerPass (brunowowk)
This PR was merged into the 4.2 branch.

Discussion
----------

[Messenger] Removes deprecated call to ReflectionType::__toString() on MessengerPass

Closes #32397

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

Removes deprecated call to ReflectionType::__toString() for 7.4 support

Commits
-------

0c52a531e2 Remove call to deprecated method
2019-07-06 21:00:30 +02:00
Bruno Nogueira Nascimento Wowk
0c52a531e2 Remove call to deprecated method 2019-07-06 14:57:33 -03:00
Jan Schädlich
ea4817677b [Stopwatch] Deprecate passing null in Section::get() method. 2019-07-06 16:19:02 +02:00
Roland Franssen
5e26d96a6b [Intl] Init compile tmp volume 2019-07-06 10:17:29 +02:00
Tobias Schultze
6811aaa8e0 Merge branch '4.3' into 4.4 2019-07-05 23:02:06 +02:00
Tobias Schultze
d27c5307f0 Merge branch '4.2' into 4.3 2019-07-05 23:01:41 +02:00
Tobias Schultze
6a1bae27d1 fix merge 2019-07-05 22:59:32 +02:00
Tobias Schultze
5cf221707f Merge branch '3.4' into 4.2 2019-07-05 22:53:03 +02:00
Tobias Schultze
42899cdd67 feature #32295 [FrameworkBundle] Add autowiring alias for PSR-14 (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle] Add autowiring alias for PSR-14

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

Commits
-------

2d5bcda9e7 [FrameworkBundle] Add autowiring alias for PSR-14
2019-07-05 21:50:21 +02:00
Alexander M. Turek
e110603e5e Don't pass objects as class name to ContainerBuilder::register. 2019-07-05 21:20:21 +02:00
Alexander M. Turek
edfc9d6f34 Deprecated passing Parameter instances as class name to Definition. 2019-07-05 21:06:26 +02:00
Christian Flothmann
416502df4e pass default cache lifetime as an integer 2019-07-05 12:25:01 +02:00
Robin Chalas
7f4368114c bug #32379 [SecurityBundle] conditionally register services (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[SecurityBundle] conditionally register services

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

Commits
-------

8fbcdf250e conditionally register services
2019-07-05 11:26:59 +02:00
Nicolas Grekas
f33c67bfc1 [Mime] add check for openssl when using SMime 2019-07-05 09:42:08 +02:00
Nicolas Grekas
ec5d7346b3 Fix CS regarding nullable arguments 2019-07-05 09:04:50 +02:00
Nicolas Grekas
09e3cef7a0 Merge branch '4.3' into 4.4
* 4.3:
  [PhpUnitBridge] fix running simple-phpunit on Windows
  fixed phpdocs
  [Messenger] fix broken key normalization
2019-07-05 08:35:10 +02:00
Nicolas Grekas
b78816d647 Merge branch '4.2' into 4.3
* 4.2:
  [PhpUnitBridge] fix running simple-phpunit on Windows
  fixed phpdocs
2019-07-05 08:35:01 +02:00
Nicolas Grekas
44e82520ee Merge branch '3.4' into 4.2
* 3.4:
  [PhpUnitBridge] fix running simple-phpunit on Windows
  fixed phpdocs
2019-07-05 08:33:37 +02:00
Nicolas Grekas
d9833ace32 [PhpUnitBridge] fix running simple-phpunit on Windows 2019-07-05 08:33:19 +02:00
Nicolas Grekas
a59e0af24a [HttpClient] Add $response->toStream() to cast responses to regular PHP streams 2019-07-05 07:37:18 +02:00
Fabien Potencier
b515107870 feature #32106 [FrameworkBundle] Use default_locale as default value for translator.fallbacks (dunglas)
This PR was merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle] Use default_locale as default value for translator.fallbacks

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

Simplify translator's config:

Before:

```yaml
    default_locale: fr
    translator:
        default_path: '%kernel.project_dir%/translations'
        fallbacks:
            - fr
```

After:

```yaml
    default_locale: fr
    translator:
        default_path: '%kernel.project_dir%/translations'
```

Commits
-------

e0ef35973d [FrameworkBundle] Use default_locale as default value for translator.fallbacks
2019-07-05 07:36:15 +02:00
Fabien Potencier
77747a9472 fixed phpdocs 2019-07-05 06:54:49 +02:00
Fabien Potencier
d292b133a5 minor #32382 Fix phpdocs (fabpot)
This PR was merged into the 4.4 branch.

Discussion
----------

Fix phpdocs

| 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

Backported from #32286

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

4acddef91b fixed phpdocs
2019-07-05 06:53:43 +02:00
Fabien Potencier
4acddef91b fixed phpdocs 2019-07-05 06:51:06 +02:00
Fabien Potencier
a672bbc209 feature #32294 [FrameworkBundle] Allow creating chained cache pools by providing several adapters (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle] Allow creating chained cache pools by providing several adapters

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

Replaces #30984, follows https://github.com/symfony/symfony-docs/pull/11813

This PR allows defining several adapters for one pool. When doing so, this defines a chain pool.
The benefit is that all chained pools get automatic namespace and lifetime, so things are transparent:

```yaml
pools:
    my_chained_pool:
        default_lifetime: 12
        adapters:
          - cache.adapter.array
          - cache.adapter.filesystem
          - {name: cache.adapter.redis, provider: 'redis://foo'}
```

(see fixtures for example of PHP/XML config)

/cc @Nyholm @pborreli FYI

Commits
-------

29ba091898 [FrameworkBundle] Allow creating chained cache pools by providing several adapters
2019-07-05 06:43:41 +02:00
Yonel Ceruto
08aa16f729 minor #32369 [ErrorCatcher] Fixed some escaping in error renderers (javiereguiluz)
This PR was merged into the 4.4 branch.

Discussion
----------

[ErrorCatcher] Fixed some escaping in error renderers

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

Fixes this: https://github.com/symfony/symfony/pull/32364/files#r300394620

Commits
-------

1413bdc [ErrorCatcher] Fixed some escaping in XML errors
2019-07-04 17:25:02 -04:00
Javier Eguiluz
1413bdcab8 [ErrorCatcher] Fixed some escaping in XML errors 2019-07-04 17:23:09 -04:00
Christian Flothmann
adcdd938a4 PHP 5 compat 2019-07-04 23:04:55 +02:00
Tobias Schultze
9931b3e183 [Messenger] fix broken key normalization 2019-07-04 22:25:02 +02:00
Christian Flothmann
8fbcdf250e conditionally register services 2019-07-04 21:53:41 +02:00
Nicolas Grekas
29ba091898 [FrameworkBundle] Allow creating chained cache pools by providing several adapters 2019-07-04 19:09:10 +02:00
Nicolas Grekas
2f6c7c507f Merge branch '4.3' into 4.4
* 4.3:
  bump phpunit-bridge cache ids
2019-07-04 19:07:39 +02:00
Nicolas Grekas
511fc93640 Merge branch '4.2' into 4.3
* 4.2:
  bump phpunit-bridge cache ids
2019-07-04 19:07:21 +02:00
Nicolas Grekas
e30800df2c Merge branch '3.4' into 4.2
* 3.4:
  bump phpunit-bridge cache ids
2019-07-04 19:06:45 +02:00
Nicolas Grekas
ea34d6dcf5 bump phpunit-bridge cache ids 2019-07-04 19:06:26 +02:00
Nicolas Grekas
6ab0488a54 [Messenger] fix missing dep 2019-07-04 18:31:08 +02:00
Nicolas Grekas
910db453f3 Merge branch '4.3' into 4.4
* 4.3:
  [Bridge/PhpUnit] fix running composer to install phpunit
2019-07-04 18:10:48 +02:00
Nicolas Grekas
1e6231b41d Merge branch '4.2' into 4.3
* 4.2:
  [Bridge/PhpUnit] fix running composer to install phpunit
2019-07-04 18:10:28 +02:00
Nicolas Grekas
e0850631fc Merge branch '3.4' into 4.2
* 3.4:
  [Bridge/PhpUnit] fix running composer to install phpunit
2019-07-04 18:09:15 +02:00
Nicolas Grekas
af850146a4 [Bridge/PhpUnit] fix running composer to install phpunit 2019-07-04 18:09:01 +02:00
Yonel Ceruto
0151279cfe minor #32359 [ErrorCatcher] Pretty print JSON formatted errors (javiereguiluz)
This PR was merged into the 4.4 branch.

Discussion
----------

[ErrorCatcher] Pretty print JSON formatted errors

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | not needed

A long string with JSON contents is not very useful to quickly parse the error contents, so I propose to "pretty print" the JSON errors.

Commits
-------

ab926d2 [ErrorCatcher] Pretty print JSON formatted errors
2019-07-04 11:27:52 -04:00
Javier Eguiluz
ab926d2065 [ErrorCatcher] Pretty print JSON formatted errors 2019-07-04 11:24:36 -04:00
Nicolas Grekas
b9b03fe1d3 Merge branch '4.3' into 4.4
* 4.3:
  [DI] fix processing of regular parameter bags by MergeExtensionConfigurationPass
  [FrameworkBundle] reset cache pools between requests
2019-07-04 15:46:31 +02:00
Nicolas Grekas
f59bc48850 Merge branch '4.2' into 4.3
* 4.2:
  [DI] fix processing of regular parameter bags by MergeExtensionConfigurationPass
  [FrameworkBundle] reset cache pools between requests
2019-07-04 15:45:39 +02:00
Nicolas Grekas
e9852bd9a1 Merge branch '3.4' into 4.2
* 3.4:
  [DI] fix processing of regular parameter bags by MergeExtensionConfigurationPass
  [FrameworkBundle] reset cache pools between requests
2019-07-04 15:45:20 +02:00
Nicolas Grekas
a383649ad7 bug #32363 [FrameworkBundle] reset cache pools between requests (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] reset cache pools between requests

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

Looks like we missed this part: cache pools should all be reset between requests, at least to persist any deferred items. Replaces #32361 (which should be applied when merging 3.4 into 4.2).

Commits
-------

5ff45bac66 [FrameworkBundle] reset cache pools between requests
2019-07-04 15:42:09 +02:00
Nicolas Grekas
db05791ceb bug #32365 [DI] fix processing of regular parameter bags by MergeExtensionConfigurationPass (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] fix processing of regular parameter bags by MergeExtensionConfigurationPass

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

Spotted in and needed by #32294

Commits
-------

b06d0003a3 [DI] fix processing of regular parameter bags by MergeExtensionConfigurationPass
2019-07-04 15:33:02 +02:00
Nicolas Grekas
b06d0003a3 [DI] fix processing of regular parameter bags by MergeExtensionConfigurationPass 2019-07-04 11:26:59 +02:00
Nicolas Grekas
5ff45bac66 [FrameworkBundle] reset cache pools between requests 2019-07-04 11:11:41 +02:00
Fabien Potencier
e3927b6294 minor #32354 [Messenger] Use ConnectionRegistry instead of RegistryInterface (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

[Messenger] Use ConnectionRegistry instead of RegistryInterface

| 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

This PR changes the constructor type-hint on `DoctrineTransportFactory` from `Symfony\Bridge\Doctrine\RegistryInterface` to the smaller `Doctrine\Common\Persistence\ConnectionRegistry`. Since we only call the `getConnection()` method, this interface is sufficient.

This change allows to use the factory without the Doctrine bridge and makes it easier to use it stand-alone.

Commits
-------

ce6a5ad235 Use ConnectionRegistry instead of RegistryInterface.
2019-07-04 09:48:35 +02:00
Fabien Potencier
b7c9fcf7a1 bug #32348 [HttpFoundation] Accept must take the lead for Request::getPreferredFormat() (dunglas)
This PR was squashed before being merged into the 4.4 branch (closes #32348).

Discussion
----------

[HttpFoundation] Accept must take the lead for Request::getPreferredFormat()

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

Follow up PR to #32344: if both `Accept` and `Content-Type` are defined, `Accept` must take the lead because it explicitly tells what format the client expect as a response.

Before:

```
$ curl -H 'Accept: application/json' -H 'Content-Type: text/xml' -i 'https://127.0.0.1:8000/userinfo'

[snip]
content-type: text/xml
```

After:

```
$ curl -H 'Accept: application/json' -H 'Content-Type: text/xml' -i 'https://127.0.0.1:8000/userinfo'

[snip]
content-type: application/json
```

Actually, I'm not sure that inferring the content type of the response using the `Content-Type` provided for the request body is a good idea. The HTTP RFC explicitly states that `Accept` must be used to hint a preferred response format (`Content-Type` on the request indicates the type of associated its the body). I would be in favor of being more conservative: use `Accept` if provided (a best practice anyway), and fallback to the default value (HTML by default) otherwise. WDYT?

Commits
-------

60d997df75 [HttpFoundation] Accept must take the lead for Request::getPreferredFormat()
2019-07-04 09:46:57 +02:00
Kévin Dunglas
60d997df75 [HttpFoundation] Accept must take the lead for Request::getPreferredFormat() 2019-07-04 09:46:50 +02:00
Kévin Dunglas
cd0341e69b [FrameworkBundle] Allow to use the BrowserKit assertions with Panther and API Platform's test client 2019-07-04 08:46:07 +02:00
Alexander M. Turek
ce6a5ad235 Use ConnectionRegistry instead of RegistryInterface. 2019-07-04 02:03:26 +02:00
Fabien Potencier
b79a1bf229 Merge branch '4.3' into 4.4
* 4.3:
  Fixes windows error
  [Messenger] Added more test for MessageBus
  fixed typo
  [Filesystem] added missing deprecations to UPGRADE-4.3.md
  Fix authentication for redis transport
  only decorate when an event dispatcher was passed
  [FrmaeworkBundle] More simplifications in the DI configuration
  Fixing validation for messenger transports retry_strategy service key
  Removed unused field.
  Remove @internal annotations for the serilize methods
  [Lock] Stores must implement `putOffExpiration`
  Annotated correct return type for getInEdges()/getOutEdges().
  deprecate the framework.templating option
2019-07-03 19:15:45 +02:00
Fabien Potencier
98c36025cd Merge branch '4.2' into 4.3
* 4.2:
  Fixes windows error
  Removed unused field.
  [Lock] Stores must implement `putOffExpiration`
  Annotated correct return type for getInEdges()/getOutEdges().
2019-07-03 19:15:34 +02:00
Fabien Potencier
02a25fe518 Merge branch '3.4' into 4.2
* 3.4:
  Fixes windows error
  Annotated correct return type for getInEdges()/getOutEdges().
2019-07-03 19:14:02 +02:00
misterx
1f8927a9a6 Fixes windows error 2019-07-03 19:13:23 +02:00
Fabien Potencier
10449cb493 feature #32344 [HttpFoundation][HttpKernel] Improving the request/response format autodetection (yceruto)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpFoundation][HttpKernel] Improving the request/response format autodetection

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

Mainly for API-based apps, currently the response header `Content-Type` (if no provided) is guessed based on the request format (`_format` attribute), falling back to `html` by default.

Especially for the new error renderer system, where any kind of error can occur and it becomes an http response, this PR improves this guesser mechanism by taking into account also the `Content-type` of the request.

Example:
```bash
$ curl -X POST -H 'Content-Type: application/json' -i 'https://127.0.0.1:8000/login'
```
**before:**
```bash
HTTP/2 500
cache-control: no-cache, private
content-type: text/html; charset=UTF-8 # <- inaccurate
...

{"title":"Internal Server Error","status":500,"detail":"Invalid credentials!"}
```
Most of the 3rd-party bundles that I know (`api-platform/core`, `FOSRestBundle`) need a dedicated listener to achieve it right.

**after:**
```bash
HTTP/2 500
cache-control: no-cache, private
content-type: application/json
...

{"title":"Internal Server Error","status":500,"detail":"Invalid credentials!"}
```
Of course, this applies to all kind of responses, as long as the `Content-Type` is not explicitly provided. So, as a last chance, the `Accept` heading of the request is also taken into account to detect the preferred format:
```bash
$ curl -H 'Accept: application/json' -i 'https://127.0.0.1:8000/userinfo'
HTTP/2 404
cache-control: no-cache, private
content-type: application/json
...

{"title":"Not Found","status":404,"detail":"No route found for \"GET \/userinfo\""}
```
They could be other places in the code where this new method could also be useful, please advise :)

WDYT?

Commits
-------

1952928471 Improving the request/response format autodetection
2019-07-03 19:09:44 +02:00
Yonel Ceruto
1952928471 Improving the request/response format autodetection 2019-07-03 12:46:41 -04:00
Fabien Potencier
c33c396a63 bug #32299 [Lock] Stores must implement putOffExpiration (jderusse)
This PR was merged into the 4.2 branch.

Discussion
----------

[Lock] Stores must implement `putOffExpiration`

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

Following https://github.com/symfony/symfony/pull/32198#pullrequestreview-256165051 every stores MUST implement the method `putOffExpiration` either by ignoring the arguments (by design they lock forever) or using a mechanism to define the expiration.

It was a mistake to add the dockblock `@throws NotSupportedException` tell me if it's a BC break, I'll create a dedicated PR for it.

Commits
-------

c986c86d1c [Lock] Stores must implement `putOffExpiration`
2019-07-03 18:27:50 +02:00
Fabien Potencier
50dfcaa8ef bug #32302 [Mime] Remove @internal annotations for the serialize methods (francoispluchino)
This PR was merged into the 4.3 branch.

Discussion
----------

[Mime] Remove @internal annotations for the serialize methods

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes (it's not really a bug)
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | ~
| License       | MIT
| Doc PR        | ~

Currently, when we extend the `Symfony\Component\Mime\Message` and `Symfony\Component\Mime\MessageRaw` classes of the Mime component, we get 2 deprecation messages:

```
The "Symfony\Component\Mime\Message::__serialize()" method is considered internal. It may change without further notice. You should not extend it from "Vendor\FooMessage".
```
and
```
The "Symfony\Component\Mime\Message::__unserialize()" method is considered internal. It may change without further notice. You should not extend it from "Vendor\FooMessage".
```

However, we need to add properties to the new class, and so, we need to extend `__serialize()` and `__unserialize()` methods in the same way as `Symfony\Bridge\Twig\Mime\TemplatedEmail`, to know, retrieve the serialization of the parent class:

```php
    public function __serialize(): array
    {
        return [$this->foo, $this->bar, $this->baz, parent::__serialize()];
    }

    public function __unserialize(array $data): void
    {
        [$this->foo, $this->bar, $this->baz, $parentData] = $data;

        parent::__unserialize($parentData);
    }
```

But given that the third-party components use another namespace, we get the 2 deprecation messages, while the 2 methods must be inevitably used and extended. Of course, the methods `serialize()` and `unserialize()` are always marked by the `@internal` annotation and the `final` keyword.

This PR so deletes the 2 deprecation messages that should not be displayed.

Commits
-------

8544a35e52 Remove @internal annotations for the serilize methods
2019-07-03 18:27:00 +02:00
Fabien Potencier
f5a0633b40 minor #32338 [Messenger] Added more test for MessageBus (lyrixx)
This PR was merged into the 4.3 branch.

Discussion
----------

[Messenger] Added more test for MessageBus

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

[This code](bed50fd542/src/Symfony/Component/Messenger/MessageBus.php (L33-L49)) is quite hard to understand. So It must be covered by tests.

More over, it will help people to understand how it works

Commits
-------

5f4ab23991 [Messenger] Added more test for MessageBus
2019-07-03 18:25:48 +02:00
Fabien Potencier
d65a5e26cf minor #32340 [Messager] Simplified MessageBus::__construct() (lyrixx)
This PR was merged into the 4.4 branch.

Discussion
----------

[Messager] Simplified MessageBus::__construct()

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

The third path deals with generator (or other king of iterator that are

not an IteratorAggregate). It means, very few cases in practice

The previous code saved one object on the first call of `self::dispatch()`
by replacing it at runtime. More over, this object (anon. class) is very
light in memory.

The performance optimization (even if fun) is not useful here. Let's
make the code readable to everyone.

Commits
-------

6b5671f5ae [Messager] Simplified MessageBus::__construct()
2019-07-03 18:24:36 +02:00
Grégoire Pineau
6b5671f5ae [Messager] Simplified MessageBus::__construct()
The third path deals with generator (or other king of iterator that are
not an IteratorAggregate). It means, very few cases in practice

The previous code saved one object on the first call of `self::dispatch()`
by replacing it at runtime. More over, this object (anon. class) is very
light in memory.

The performance optimization (even if fun) is not useful here. Let's
make the code readable to everyone.
2019-07-03 15:46:19 +02:00
Fabien Potencier
2452ef8978 minor #32188 [PropertyInfo] add static cache to ContextFactory (bastnic)
This PR was merged into the 4.4 branch.

Discussion
----------

[PropertyInfo] add static cache to ContextFactory

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no (performance...)
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #32073, https://github.com/api-platform/api-platform/issues/1159
| License       | MIT
| Doc PR        | no

The issue is very very well described here #32073, and was also discussed a few weeks ago with @dunglas here https://github.com/api-platform/api-platform/issues/1159.

`ContextFactory::createFromReflector` is heavy, and it's called redundanlty
by `Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor` for each property
and methods. Avoid that by parsing it only once and then use static cache

This is a quite big performance problem.

![Deepin Capture-écran_zone de sélection _20190626142041](https://user-images.githubusercontent.com/84887/60179692-8471c480-981e-11e9-9e3c-3f9c0b83b01b.png)

Commits
-------

063e880861 [PropertyInfo] add static cache to ContextFactory
2019-07-03 15:36:04 +02:00
Fabien Potencier
df13b506eb feature #32231 [HttpClient] Add support for NTLM authentication (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] Add support for NTLM authentication

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

Someone mentioned NTLM auth on Twitter, so here we are, this adds support for it.
Requires curl.

Commits
-------

548f4fd0ea [HttpClient] Add support for NTLM authentication
2019-07-03 15:28:45 +02:00
Fabien Potencier
6abaa8c5a2 feature #32265 [Validator] deprecate non-string constraint violation codes (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[Validator] deprecate non-string constraint violation codes

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

Commits
-------

e217729066 deprecate non-string constraint violation codes
2019-07-03 15:25:50 +02:00
Fabien Potencier
09e762e819 bug #32334 [Messenger] Fix authentication for redis transport (alexander-schranz)
This PR was merged into the 4.3 branch.

Discussion
----------

[Messenger] Fix authentication for redis transport

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #32304
| License       | MIT
| Doc PR        | symfony/symfony-docs#... TODO

This will implement support for password in redis stream transport.

Commits
-------

bedae5dde9 Fix authentication for redis transport
2019-07-03 15:20:24 +02:00
Fabien Potencier
927a3341c0 minor #32281 [DependencyInjection] Annotated correct return type for getInEdges()/getOutEdges() (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

[DependencyInjection] Annotated correct return type for getInEdges()/getOutEdges()

| 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 changed annotation was quite helpful when analyzing `PhpDumper` for #32266.

Commits
-------

28882f52cb Annotated correct return type for getInEdges()/getOutEdges().
2019-07-03 15:17:20 +02:00
Fabien Potencier
4e32643bdf feature #31528 [Validator] Add a Length::$allowEmptyString option to reject empty strings (ogizanagi)
This PR was merged into the 4.4 branch.

Discussion
----------

[Validator] Add a Length::$allowEmptyString option to reject empty strings

| 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? | yes <!-- 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        | Todo (change the warning on top of https://symfony.com/doc/current/reference/constraints/Length.html)

which defaults to `true` in 4.4 but will trigger a deprecation if not set explicitly
in order to make the default `false` in 5.0.

While it could be solved now thanks to #29641 by using both `@Length(min=1)` & `@NotBlank(allowNull=true)` constraints,
as expressed in https://github.com/symfony/symfony/issues/27876#issuecomment-403307783 and following comments, the `@Length(min=1)` behavior doesn't match our expectations when reading it: it feels logical to invalidate empty strings, but it actually doesn't.
Hence the proposal of making the behavior of rejecting empty strings the default in 5.0.

In my opinion, the flag could even be removed later.

Commits
-------

e113e7f812 [Validator] Add a Length::$allowEmptyString option to reject empty strings
2019-07-03 15:15:57 +02:00
Fabien Potencier
ea0656a4f4 minor #32305 [HttpKernel][DX] Improve the error message when not defining the controller as a service but using construct parameters (Simperfit)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpKernel][DX] Improve the error message when not defining the controller as a service but using construct parameters

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

I'm working with newcomers to the symfony framework ATM and one of them has got stuck in this errors trying to understand why the constructor argument declared as a a service would not work and didn't check if the controller was declared as a service itself.

I feel like this could be improve to be really specific since "such" is not that specific ;).

Commits
-------

c670d5120e [HttpKernel][DX] Improve the error message when not defining the controller as a service but using contruct parameters
2019-07-03 15:05:19 +02:00
Fabien Potencier
7b9c026153 feature #32081 [WIP][Mailer] Overwrite envelope sender and recipients from config (Devristo)
This PR was squashed before being merged into the 4.4 branch (closes #32081).

Discussion
----------

[WIP][Mailer] Overwrite envelope sender and recipients from config

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #31592 #31733   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

# Description

This MR adds the following configuration, example:

```yaml
# config/packages/mailer.yaml
framework:
  mailer:
    envelope:
      sender: 'sender@example.org'
      recipients: ['redirected@example.org']
```
In turn the `\Symfony\Component\Mailer\EventListener\EnvelopeListener` will be configured to alter the sender and recipient addresses before the message has been sent.

Note: it will only alter the envelope, thus rerouting the message to the correct mailbox. However the message itself will still have the original 'from' and 'to' headers.

# Todos

- [x] Alter configuration and dependency injection
- [x] Create test case
- [ ] Update XML config schema?
- [ ] Doc PR

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

8e0c8006d8 [WIP][Mailer] Overwrite envelope sender and recipients from config
2019-07-03 14:59:34 +02:00
Chris Tanaskoski
8e0c8006d8 [WIP][Mailer] Overwrite envelope sender and recipients from config 2019-07-03 14:59:24 +02:00
Fabien Potencier
bed50fd542 minor #32323 [FrmaeworkBundle] More simplifications in the DI configuration (javiereguiluz)
This PR was merged into the 4.3 branch.

Discussion
----------

[FrmaeworkBundle] More simplifications in the DI configuration

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| 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        | not needed

This is the continuation of #32322 for the 4.3 branch.

Commits
-------

fa6ae8ce50 [FrmaeworkBundle] More simplifications in the DI configuration
2019-07-03 14:57:34 +02:00
Grégoire Pineau
5f4ab23991 [Messenger] Added more test for MessageBus 2019-07-03 14:56:57 +02:00
Fabien Potencier
802dc1b1b2 minor #32315 [Filesystem] deprecate calling isAbsolutePath with a null (smoench)
This PR was merged into the 4.4 branch.

Discussion
----------

[Filesystem] deprecate calling isAbsolutePath with a null

| 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? | yes <!-- 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

This PR is a result of #32247 and deprecates calling `Filesystem::isAbsolutePath()` with a `null` value.

Commits
-------

93190182f6 [Filesystem] depreacte calling isAbsolutePath with a null
2019-07-03 14:56:33 +02:00
Fabien Potencier
c3e914c6eb minor #32316 [Ldap] Document the new exceptions thrown by the code (javiereguiluz)
This PR was merged into the 4.4 branch.

Discussion
----------

[Ldap] Document the new exceptions thrown by the code

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

While deciding if we should document #31547 I saw that the new exceptions weren't documented in the code. I don't know if this is the place where this should be added.

Commits
-------

0d27af93ea [Ldap] Document the new exceptions thrown by the code
2019-07-03 14:43:13 +02:00
Fabien Potencier
34c50c0963 minor #32306 [DependencyInjection] Removed unused field (derrabus)
This PR was merged into the 4.2 branch.

Discussion
----------

[DependencyInjection] Removed unused field

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

A minor issue I discovered while analyzing the DI component for #32238: `AnalyzeServiceReferencesPass` defines a private field `$expressionLanguage` that is not used.

Commits
-------

58651409b4 Removed unused field.
2019-07-03 14:39:02 +02:00
Fabien Potencier
74bd8b6bca bug #32309 Fixing validation for messenger transports retry_strategy service key (weaverryan)
This PR was merged into the 4.3 branch.

Discussion
----------

Fixing validation for messenger transports retry_strategy service key

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

Manually tested locally. `validate()` is too because the defaults are already applied.

Commits
-------

c6e18374a2 Fixing validation for messenger transports retry_strategy service key
2019-07-03 14:37:49 +02:00
Fabien Potencier
e0e476da71 minor #32317 [Mime] Updated some PHPDoc contents (javiereguiluz)
This PR was squashed before being merged into the 4.4 branch (closes #32317).

Discussion
----------

[Mime] Updated some PHPDoc contents

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

While documenting #30981 I found some PHPDoc info not clear enough. This "improves" it, but if you don't like it, it's OK to close this. Thanks.

Commits
-------

9432f1f970 [Mime] Updated some PHPDoc contents
2019-07-03 14:35:36 +02:00
Javier Eguiluz
9432f1f970 [Mime] Updated some PHPDoc contents 2019-07-03 14:35:29 +02:00
Fabien Potencier
ec3e66dc1b minor #32269 [PropertyAccess] Adds entries to CHANGELOG and UPGRADE (jschaedl)
This PR was squashed before being merged into the 4.4 branch (closes #32269).

Discussion
----------

[PropertyAccess] Adds entries to CHANGELOG and UPGRADE

| 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? | yes <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #32179   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

In PR #32241 I missed to add entries to the CHANGELOG and UPGRADE file.

Commits
-------

c4afbf376f [PropertyAccess] Adds entries to CHANGELOG and UPGRADE
2019-07-03 14:34:57 +02:00
Jan Schädlich
c4afbf376f [PropertyAccess] Adds entries to CHANGELOG and UPGRADE 2019-07-03 14:34:50 +02:00
Fabien Potencier
51f01bdd9d minor #32267 [FrameworkBundle] deprecate the framework.templating option (xabbuh)
This PR was merged into the 4.3 branch.

Discussion
----------

[FrameworkBundle] deprecate the framework.templating option

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

The config node has already been removed in the `master` branch in #31800. For DX it would have been better to have this deprecation in 4.3 (see e.g. #32120), but it's probably too late to ship this as a bugfix.

Commits
-------

ba241ce3cc deprecate the framework.templating option
2019-07-03 14:31:16 +02:00
Javier Eguiluz
e6d76bae9f [FrameworkBundle] Simplified some code in the DI configuration 2019-07-03 14:23:51 +02:00
Fabien Potencier
70318b4647 feature #32255 [HttpFoundation] Drop support for ApacheRequest (lyrixx)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpFoundation] Drop support for ApacheRequest

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

`ApacheUrlMatcher` has been [deprecated in 2.7](https://github.com/symfony/symfony/pull/12728) and removed in 3.0
I think we forgot to remove this class too.

This class in never used in symfony, and there are no more reference in
the documentation.

Commits
-------

f82e28c533 [HttpFoundation] Deprecated ApacheRequest
2019-07-03 14:15:47 +02:00
smoench
93190182f6
[Filesystem] depreacte calling isAbsolutePath with a null 2019-07-03 13:25:24 +02:00
Alexander Schranz
bedae5dde9 Fix authentication for redis transport 2019-07-03 11:22:31 +02:00
Christian Flothmann
f19f28a41d only decorate when an event dispatcher was passed 2019-07-03 09:52:02 +02:00
Samuel ROZE
7bd0a2720f feature #31825 [Messenger] Added support for auto trimming of redis streams (Toflar)
This PR was squashed before being merged into the 4.4 branch (closes #31825).

Discussion
----------

[Messenger] Added support for auto trimming of redis streams

| 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        | will submit if concept is okay

Right now the Redis stream will just grow indefinitely. However, there are means to have it delete old entries from time to time.
Note: I could not use the `XADD mystream MAXLEN ~ 1000 *` notation because the PHP redis extension does not support the `MAXLEN` option afaics so I went for the extra `XTRIM` command.
I explicitly enabled the approximate flag because it makes absolutely no sense to hardcode the limit for us although we could even have this configurable too (but I don't think we should).
The whole idea of this PR is to enable occasional trimming of the stream so it doesn't grow forever, so when you configure something like `20000` it may well happen that trimming only happens at `25000` depending on your settings.

Ping @soyuka @alexander-schranz @chalasr :)

Commits
-------

7fe06bc5f6 [Messenger] Added support for auto trimming of redis streams
2019-07-02 21:18:22 +01:00
Yanick Witschi
7fe06bc5f6 [Messenger] Added support for auto trimming of redis streams 2019-07-02 21:18:11 +01:00
Javier Eguiluz
fa6ae8ce50 [FrmaeworkBundle] More simplifications in the DI configuration 2019-07-02 17:10:36 +02:00
Tobias Schultze
d97f9ab131 Merge branch '4.3' into 4.4 2019-07-02 16:37:50 +02:00
Tobias Schultze
205cd7a0fb minor #32288 fix invalid call to PhpFileLoader::load() in a test (Tobion)
This PR was merged into the 4.3 branch.

Discussion
----------

fix invalid call to PhpFileLoader::load() in a test

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yno
| New feature?  | yno <!-- 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 was calling `\Symfony\Component\DependencyInjection\Loader\PhpFileLoader::load($resource, string $type = null)` with the container object as $type which I found in #32286

Commits
-------

8930335934 fix invalid call to PhpFileLoader::load() in a test
2019-07-02 16:37:00 +02:00
Tobias Schultze
2bc88ee744 Merge branch '4.2' into 4.3 2019-07-02 16:28:51 +02:00
Tobias Schultze
44fa22056f Merge branch '3.4' into 4.2 2019-07-02 15:59:44 +02:00
Javier Eguiluz
0d27af93ea [Ldap] Document the new exceptions thrown by the code 2019-07-02 09:12:04 +02:00
Maxime Steinhausser
26048bc498 minor #32046 [FrameworkBundle] Unconditionally register the DateIntervalNormalizer (ogizanagi)
This PR was merged into the 4.2 branch.

Discussion
----------

[FrameworkBundle] Unconditionally register the DateIntervalNormalizer

| Q             | A
| ------------- | ---
| Branch?       | 4.2 <!-- 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

Fwb conflicts with serializer <4.2 37fa45bbd1/src/Symfony/Bundle/FrameworkBundle/composer.json (L74)

so we can remove this obsolete condition from the extension (DateIntervalNormalizer exists since 3.4).

Commits
-------

c7cc780373 [FrameworkBundle] Unconditionally register the DateIntervalNormalizer
2019-07-01 17:04:24 +02:00
Ryan Weaver
c6e18374a2 Fixing validation for messenger transports retry_strategy service key 2019-07-01 10:32:47 -04:00
Alexander M. Turek
58651409b4 Removed unused field. 2019-07-01 14:42:30 +02:00
Amrouche Hamza
c670d5120e
[HttpKernel][DX] Improve the error message when not defining the controller as a service but using contruct parameters 2019-07-01 14:02:11 +02:00
François Pluchino
8544a35e52 Remove @internal annotations for the serilize methods 2019-07-01 10:51:14 +02:00
Grégoire Pineau
f82e28c533 [HttpFoundation] Deprecated ApacheRequest 2019-07-01 10:07:19 +02:00
Jérémy Derussé
c986c86d1c
[Lock] Stores must implement putOffExpiration 2019-07-01 09:24:46 +02:00
Maxime Steinhausser
e113e7f812 [Validator] Add a Length::$allowEmptyString option to reject empty strings
which defaults to `true` in 4.4 but will trigger a deprecation if not set explicitly
in order to make the default `false` in 5.0.
2019-07-01 09:11:48 +02:00
Tobias Schultze
8930335934 fix invalid call to PhpFileLoader::load() in a test 2019-07-01 01:09:42 +02:00
Tobias Schultze
a03b5d8089 fix invalid call to PhpFileLoader::load() in a test 2019-07-01 01:07:21 +02:00
Alex Bowers
6c49a0c758 Add test case 2019-06-30 23:48:04 +01:00
Nicolas Grekas
2d5bcda9e7 [FrameworkBundle] Add autowiring alias for PSR-14 2019-06-30 19:00:07 +02:00
Nicolas Grekas
ad6f6cf900 [Cache] Add argument $prefix to AdapterInterface::clear() 2019-06-30 18:22:11 +02:00
Fabien Potencier
081c601243 minor #32257 [Security] [Guard] Removed useless param annotations (thomasbisignani)
This PR was merged into the 3.4 branch.

Discussion
----------

[Security] [Guard] Removed useless param annotations

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/32254#issuecomment-506719957
| License       | MIT
| Doc PR        |

The PR removes useless `@param` annotation, it is linked with the https://github.com/symfony/symfony/pull/32254#issuecomment-506719957

Commits
-------

848e881d5d [Security] [Guard] Removed useless param annotations
2019-06-30 15:25:31 +02:00
Thomas Bisignani
848e881d5d [Security] [Guard] Removed useless param annotations 2019-06-30 11:22:15 +02:00
Alexander M. Turek
28882f52cb Annotated correct return type for getInEdges()/getOutEdges(). 2019-06-29 18:43:59 +02:00
Fabien Potencier
191cb52902 removed @experimental annotations 2019-06-29 18:43:50 +02:00
Christian Flothmann
ba241ce3cc deprecate the framework.templating option 2019-06-29 12:12:19 +02:00
Sebastiaan Stok
6e70d12d3b
[Mime] Added SMimeSigner and Encryptor 2019-06-29 10:53:13 +02:00
Fabien Potencier
ca566a5110 Merge branch '4.3' into 4.4
* 4.3:
  [Workflow] Deprecated DefinitionBuilder::setInitialPlace()
2019-06-29 09:02:53 +02:00
Fabien Potencier
8dd5464c2e feature #32180 [Lock] add an InvalidTTLException to be more accurate (Simperfit)
This PR was merged into the 4.4 branch.

Discussion
----------

[Lock] add an InvalidTTLException to be more accurate

| 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 | none   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | not needed<!-- 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 adds a new exception to be more precise when using wrong ttl.

Commits
-------

37509192d8 [Lock] add an InvalidTTLException to be more accurate
2019-06-29 08:25:21 +02:00
Christian Flothmann
e217729066 deprecate non-string constraint violation codes 2019-06-28 19:01:10 +02:00
Tobias Schultze
b3e3247557 [FrameworkBundle] better message for disabled sessions 2019-06-28 18:44:52 +02:00
Fabien Potencier
3644b70d42 feature #32241 [PropertyAccess] Deprecate null as allowed value for defaultLifetime argument in createCache method (jschaedl)
This PR was squashed before being merged into the 4.4 branch (closes #32241).

Discussion
----------

[PropertyAccess] Deprecate null as allowed value for defaultLifetime argument in createCache method

| 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? | yes <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #32179   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A<!-- required for new features -->

This PR is related to https://github.com/symfony/symfony/pull/32234#discussion_r298415012

Commits
-------

9aac42698a [PropertyAccess] Deprecate null as allowed value for defaultLifetime argument in createCache method
2019-06-28 17:46:18 +02:00
Jan Schädlich
9aac42698a [PropertyAccess] Deprecate null as allowed value for defaultLifetime argument in createCache method 2019-06-28 17:46:08 +02:00
Amrouche Hamza
37509192d8
[Lock] add an InvalidTTLException to be more accurate 2019-06-28 17:30:17 +02:00
Grégoire Pineau
4d002e8397 [Workflow] Deprecated DefinitionBuilder::setInitialPlace()
Added missing part of #30468
2019-06-28 17:00:47 +02:00
Thomas Calvet
a751629eb1 [Debug] Fix CHANGELOG after ErrorCatcher renaming 2019-06-28 16:44:50 +02:00
Nicolas Grekas
b40f6b5e72 fix merge 2019-06-28 15:25:44 +02:00
Nicolas Grekas
ab1bc87e43 Merge branch '4.3' into 4.4
* 4.3:
  [HttpFoundation] Throw exception when the \"session\" extension is not loaded
  remove invalid test case
  remove invalid test cases
  [Serializer] Fixed PHP of DenormalizableInterface::denormalize
  [Cache] work aroung PHP memory leak
  [Finder] docblock fixes
  pass error code as a string
  Catch JsonException and rethrow in JsonEncode
2019-06-28 15:17:39 +02:00
Nicolas Grekas
a218efebee Merge branch '4.2' into 4.3
* 4.2:
  [HttpFoundation] Throw exception when the \"session\" extension is not loaded
  remove invalid test cases
  [Serializer] Fixed PHP of DenormalizableInterface::denormalize
  [Cache] work aroung PHP memory leak
  [Finder] docblock fixes
  pass error code as a string
  Catch JsonException and rethrow in JsonEncode
2019-06-28 15:16:30 +02:00
Nicolas Grekas
e62e2ddb38 minor #32250 [Validator] remove invalid test case (xabbuh)
This PR was merged into the 4.3 branch.

Discussion
----------

[Validator] remove invalid test case

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

Spotted while working on #32179 for the Validator component. Using property paths for comparison when validating arrays simply does not work.

Commits
-------

9000c1eab4 remove invalid test case
2019-06-28 14:57:32 +02:00
Nicolas Grekas
b8c4809a49 Merge branch '3.4' into 4.2
* 3.4:
  [HttpFoundation] Throw exception when the \"session\" extension is not loaded
  remove invalid test cases
  [Serializer] Fixed PHP of DenormalizableInterface::denormalize
  [Finder] docblock fixes
  pass error code as a string
  Catch JsonException and rethrow in JsonEncode
2019-06-28 14:55:49 +02:00
Nicolas Grekas
3f165064eb bug #32236 [Cache] work aroung PHP memory leak (nicolas-grekas)
This PR was merged into the 4.2 branch.

Discussion
----------

[Cache] work aroung PHP memory leak

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

Works around  https://bugs.php.net/76982, as identified by @goetas in the linked issue.

Commits
-------

5d55b91fae [Cache] work aroung PHP memory leak
2019-06-28 14:49:32 +02:00
Nicolas Grekas
b6e8b17dc4 minor #32215 [HttpFoundation] Throw exception when the "session" extension is not loaded (vudaltsov)
This PR was squashed before being merged into the 3.4 branch (closes #32215).

Discussion
----------

[HttpFoundation] Throw exception when the "session" extension is not loaded

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

Should I target `3.4` or `master` instead? This change does not alter behavior, but makes the failure more clear.

Commits
-------

b0c663071b [HttpFoundation] Throw exception when the \"session\" extension is not loaded
2019-06-28 14:47:57 +02:00
Valentin Udaltsov
b0c663071b [HttpFoundation] Throw exception when the \"session\" extension is not loaded 2019-06-28 14:47:50 +02:00
Nicolas Grekas
9bc8b39709 minor #32249 [Validator] remove invalid test cases (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] remove invalid test cases

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

Spotted while working on #32179 for the Validator component. Using property paths for comparison when validating arrays simply does not work.

Commits
-------

d1261e78a4 remove invalid test cases
2019-06-28 14:46:12 +02:00
Nicolas Grekas
3f53044b42 minor #32244 [Validator] pass error code as a string (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] pass error code as a string

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

901fe0d7c5 pass error code as a string
2019-06-28 14:40:38 +02:00
Nicolas Grekas
278bfbaea0 minor #32230 [Serializer] Fixed PHP of DenormalizableInterface::denormalize (lyrixx)
This PR was merged into the 3.4 branch.

Discussion
----------

[Serializer] Fixed PHP of DenormalizableInterface::denormalize

It can return an array of objects

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

379bbee370 [Serializer] Fixed PHP of DenormalizableInterface::denormalize
2019-06-28 14:36:51 +02:00
Nicolas Grekas
a670098879 minor #32245 [Finder] docblock fixes (smoench)
This PR was merged into the 3.4 branch.

Discussion
----------

[Finder] docblock fixes

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | N/A
| License       | MIT
| Doc PR        | N/A

This PR provides some docblock fixes found in #32243

Commits
-------

02ee4d0b05 [Finder] docblock fixes
2019-06-28 14:36:03 +02:00
Bastien Jaillot
063e880861 [PropertyInfo] add static cache to ContextFactory
ContextFactory::createFromReflector is heavy, and it's called redundanlty
by Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor for each property
and methods. Avoid that by parsing it only once and then use static cache
2019-06-28 14:35:26 +02:00
Christian Flothmann
61d180e7de Merge branch '4.3' into 4.4
* 4.3:
  fix Debug component dependencies
  [travis] not all components have a master branch
  [HttpKernel] Add @method PHPDoc for getRequest and getResponse back to Client
2019-06-28 14:32:50 +02:00
Christian Flothmann
a1de01c6ff Merge branch '4.2' into 4.3
* 4.2:
  fix Debug component dependencies
  [travis] not all components have a master branch
2019-06-28 14:12:54 +02:00
Christian Flothmann
5edac837a0 Merge branch '3.4' into 4.2
* 3.4:
  fix Debug component dependencies
  [travis] not all components have a master branch
2019-06-28 14:00:38 +02:00
Nicolas Grekas
2bab37d64f bug #32206 Catch JsonException and rethrow in JsonEncode (phil-davis)
This PR was merged into the 3.4 branch.

Discussion
----------

Catch JsonException and rethrow in JsonEncode

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | adjustment to implementation of previous PRs for issue #31447
| License       | MIT
| Doc PR        | not applicable

PR #31860 provided handling of PHP  7.3 `JSON_THROW_ON_ERROR` behavior in the various `JsonEncode` and related classes/methods.

PR #31869 adjusted that. In particular, it adjusted ` src/Symfony/Component/Serializer/Encoder/JsonDecode.php` so that it catches any `JsonException` and re-throws it as `NotEncodableValueException`. That preserves the previous behavior of `JsonDecode:decode` - it always throws `NotEncodableValueException` when something goes wrong.

IMO `JsonEncode:encode` needs the same logic. At the moment, if a caller specifies `JSON_THROW_ON_ERROR` then the method can throw `JsonException`, but actually the "standard" for `JsonEncode:encode` is that it throws `NotEncodableValueException`

Adjust `JsonEncode:encode` to catch `JsonException` and rethrow it as `NotEncodableValueException`

Commits
-------

9c76790ee8 Catch JsonException and rethrow in JsonEncode
2019-06-28 13:57:22 +02:00
Nicolas Grekas
9c668d9282 minor #32213 [HttpKernel] Add @method PHPDoc for getRequest and getResponse back to Client (teohhanhui)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpKernel] Add @method PHPDoc for getRequest and getResponse back to Client

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

As the deprecated `Symfony\Component\HttpKernel\Client` does not extend `Symfony\Component\HttpKernel\HttpKernelBrowser`, it has not retained the correct PHPDoc from before.

The order of inheritance was changed in https://github.com/symfony/symfony/pull/31881, but the PHPDoc was never restored.

Commits
-------

332135186a [HttpKernel] Add @method PHPDoc for getRequest and getResponse back to Client
2019-06-28 13:56:05 +02:00
Christian Flothmann
9000c1eab4 remove invalid test case 2019-06-28 12:20:30 +02:00
Christian Flothmann
d1261e78a4 remove invalid test cases 2019-06-28 12:15:37 +02:00