* 3.4: (22 commits)
[appveyor] use PHP 7.1 to run composer
[HttpKernel] Don't clean legacy containers that are still loaded
[VarDumper] Fix HtmlDumper classes match
Make the simple auth provider the same as in Symfony 2.7.
[PhpUnitBridge] silence wget
fix merge
[Security] guardAuthenticationProvider::authenticate cannot return null according to interface specification
[PhpUnitBridge] Fix#26994
[VarDumper] Remove decoration from actual output in tests
[PropertyInfo] Minor cleanup and perf improvement
[Bridge/Doctrine] fix count() notice on PHP 7.2
[Security] Skip user checks if not implementing UserInterface
[DI] Add check of internal type to ContainerBuilder::getReflectionClass
[HttpFoundation] Add HTTP_EARLY_HINTS const
[DoctrineBridge] Improve exception message at `IdReader::getIdValue()`
Add type hints
fixed CS
Use new PHP7.2 functions in hasColorSupport
[VarDumper] Fix dumping of SplObjectStorage
[HttpFoundation] Add functional tests for Response::sendHeaders()
...
This PR was merged into the 3.4 branch.
Discussion
----------
[appveyor] use PHP 7.1 to run composer
| 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 | -
Should make appveyor back to green.
Commits
-------
43e733f [appveyor] use PHP 7.1 to run composer
This PR was merged into the 3.4 branch.
Discussion
----------
[HttpKernel] Don't clean legacy containers that are still loaded
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? |
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #27053
| License | MIT
| Doc PR | -
Commits
-------
be8dbc3 [HttpKernel] Don't clean legacy containers that are still loaded
This PR was merged into the 2.8 branch.
Discussion
----------
Make the simple auth provider the same as in Symfony 2.7
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #27044
| License | MIT
This PR adds the `SimpleAuthenticationProvider` changes made in Symfony 2.7 to Symfony 2.8. See https://github.com/symfony/symfony/pull/27044#issuecomment-384580979
Commits
-------
9afad9d Make the simple auth provider the same as in Symfony 2.7.
This PR was merged into the 4.1-dev branch.
Discussion
----------
[WebProfilerBundle][Messenger] Show bus name in profiler panel
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Now that multiple buses are possible, it would be useful to see which bus was used in the messenger profiler panel.
Commits
-------
edddc73467 [WebProfilerBundle][Messenger] show bus name in profiler panel
This PR was squashed before being merged into the 4.1-dev branch (closes#26864).
Discussion
----------
[Messenger] Define multiple buses from the `framework.messenger.buses` configuration
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #26652
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/issues/9617
Not everybody will benefit from having only one bus, especially with the CQRS-like usages. While keeping the extremely use of use of the single bus, this PR has the following:
- Create multiple buses from the YAML configuration
- Tag middleware only a specific buses
- Register middlewares from the YAML configuration
Even if it's visible in the PR's tests, here's how it will look like, for a completely full-customised version:
```yaml
framework:
messenger:
default_bus: commands
buses:
commands: ~
events:
middlewares:
- validation
- route_messages
- "Your\\Middleware\\Service"
- call_message_handler
```
A few things to note:
1. The YAML configuration creates `messenger.bus.[name]` services for the buses.
2. The YAML configuration for middleware just adds tags to the corresponding middlewares.
3. If the middleware definition does not exists, it creates it. (without any magic on the arguments though, if it isn't auto-wirable, well... "your problem")
4. In the PR, there is this "TolerateNoHandler" middleware that is a great example for event buses
Commits
-------
e5deb8499b [Messenger] Define multiple buses from the `framework.messenger.buses` configuration
This PR was merged into the 4.1-dev branch.
Discussion
----------
[FrameworkBundle] Register all private services on the test service container
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Before this fix, only services explicitly configured with public=false were exposed via the test service container:
```php
$container->register(PrivateService::class, PrivateService::class)->setPublic(false);
```
but not those explicitly configured as private:
```php
$container->register(PrivateService::class, PrivateService::class)->setPrivate(true);
```
nor those implicitly configured as private:
```php
$container->register(PrivateService::class, PrivateService::class);
```
Commits
-------
6677393 [FrameworkBundle] Register all private services on the test service container
Before this fix, only services explicitly configured with public=false were exposed via the test service container:
```
$container->register(PrivateService::class, PrivateService::class)->setPublic(false);
```
but not those explicitly configured as private:
```
$container->register(PrivateService::class, PrivateService::class)->setPrivate(true);
```
nor those implicitly configured as private:
```
$container->register(PrivateService::class, PrivateService::class);
```
* 2.8:
[Security] guardAuthenticationProvider::authenticate cannot return null according to interface specification
[VarDumper] Remove decoration from actual output in tests
[PropertyInfo] Minor cleanup and perf improvement
[Bridge/Doctrine] fix count() notice on PHP 7.2
[Security] Skip user checks if not implementing UserInterface
[HttpFoundation] Add HTTP_EARLY_HINTS const
[DoctrineBridge] Improve exception message at `IdReader::getIdValue()`
fixed CS
Use new PHP7.2 functions in hasColorSupport
[VarDumper] Fix dumping of SplObjectStorage
Fixed being logged out on failed attempt in guard
* 2.7:
[VarDumper] Remove decoration from actual output in tests
[Bridge/Doctrine] fix count() notice on PHP 7.2
[Security] Skip user checks if not implementing UserInterface
[HttpFoundation] Add HTTP_EARLY_HINTS const
[DoctrineBridge] Improve exception message at `IdReader::getIdValue()`
fixed CS
Use new PHP7.2 functions in hasColorSupport
[VarDumper] Fix dumping of SplObjectStorage
This PR was merged into the 2.8 branch.
Discussion
----------
[Security][Guard] GuardAuthenticationProvider::authenticate cannot return null
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #26942
| License | MIT
Authenticate method in GuardAuthenticationProvider returned null when the token does not originate from any of the guard authenticators. This check was not done in the supports method. According to the interface authenticate cannot return null. This patch copies theguard authenticator checks to the supports method.
Commits
-------
9dff22c [Security] guardAuthenticationProvider::authenticate cannot return null according to interface specification
This PR was merged into the 2.7 branch.
Discussion
----------
[Bridge/Doctrine] count(): Parameter must be an array or an object that implements Countable
| Q | A
| ------------- | ---
| Branch? | master |
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Php7.2 will throw a warning on count(null) [http://php.net/manual/en/migration72.incompatible.php](http://php.net/manual/en/migration72.incompatible.php)
Error:
```
count(): Parameter must be an array or an object that implements Countable
```
when no result returned on validating unique constraint
For example, on an entity with annotation uniqueEntity:
```
@UniqueEntity(
fields={"email"},
repositoryMethod="findMemberWithPasswordFromEmail",
)
```
And in repository, a method ``findMemberWithPasswordFromEmail`` which return null if no entity found (``getOneOrNullResult``)
Commits
-------
715373f [Bridge/Doctrine] fix count() notice on PHP 7.2
This PR was merged into the 2.7 branch.
Discussion
----------
[HttpKernel] Remove decoration from actual output in tests
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes green again
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
AppVeyor has color support since #26910, that breaks the build.
Fixes it by removing decoration from tested DumpDataCollector CLI outputs, same as what's already done for HTML dumps
Commits
-------
c4daef9 [VarDumper] Remove decoration from actual output in tests
This PR was merged into the 2.7 branch.
Discussion
----------
[Security] Skip user checks if not implementing UserInterface
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #26871
| License | MIT
| Doc PR | n/a
Commits
-------
384acf9f7f [Security] Skip user checks if not implementing UserInterface
This PR was squashed before being merged into the 2.8 branch (closes#27003).
Discussion
----------
[PropertyInfo] Minor cleanup and perf improvement
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | no
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to 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
Commits
-------
4a8306e [PropertyInfo] Minor cleanup and perf improvement
This PR was merged into the 4.1-dev branch.
Discussion
----------
[Serializer] Allow to access to the context and various other infos in callbacks and max depth handler
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes<!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to 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
Allows to access to the context, format, parent object and attribute name in max depth handlers and callbacks.
ping @meyerbaptiste
Commits
-------
0e5f74071a [Serializer] Allow to access to the context and various other infos in callbacks and max depth handler
This PR was squashed before being merged into the 4.1-dev branch (closes#27001).
Discussion
----------
[Messenger] Typecast the auto-setup as a bool.
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #26996
| License | MIT
| Doc PR |
Commits
-------
566a8be35b [Messenger] Typecast the auto-setup as a bool.
This PR was merged into the 4.1-dev branch.
Discussion
----------
[DI] Handle invalid extension configuration class
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | yes
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #27040
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
cc @iltar @stof
Commits
-------
5ce90bd251 [DI] Handle invalid bundle configuration class
This PR was submitted for the 4.0 branch but it was merged into the 3.4 branch instead (closes#27025).
Discussion
----------
[DI] Add check of internal type to ContainerBuilder::getReflectionClass
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #27018
| License | MIT
| Doc PR | no
This PR fixes bug described in #27018 issue.
I think that `getReflectionClass` should return `NULL` when internal type was used instead class name but not throws exception. As well as it does when class is empty. If someone have other opinion we can discuss it.
Commits
-------
314e8813b3 [DI] Add check of internal type to ContainerBuilder::getReflectionClass
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes#27013).
Discussion
----------
[HttpFoundation] Add HTTP_EARLY_HINTS const
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Commits
-------
c606d60c54 [HttpFoundation] Add HTTP_EARLY_HINTS const