Commit Graph

36834 Commits

Author SHA1 Message Date
Nicolas Grekas
15a7bbd92c bug #24805 [Security] Fix logout (MatTheCat)
This PR was squashed before being merged into the 2.7 branch (closes #24805).

Discussion
----------

[Security] Fix logout

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | no
| Fixed tickets | #6751, #7104
| License       | MIT

Commits
-------

9e88eb5aa9 [Security] Fix logout
2018-05-15 17:39:51 +02:00
MatTheCat
9e88eb5aa9 [Security] Fix logout 2018-05-15 17:39:41 +02:00
smaine
cb5ce8f32e fix bug when imported routes are prefixed 2018-05-15 11:43:27 +02:00
Nicolas Grekas
10a2d39365 bug #27265 [DI] Shared services should not be inlined in non-shared ones (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] Shared services should not be inlined in non-shared ones

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

[Already good on 2.7/2.8.](https://github.com/symfony/symfony/blob/2.7/src/Symfony/Component/DependencyInjection/Compiler/InlineServiceDefinitionsPass.php#L152)

Commits
-------

6f8b8625f4 [DI] Shared services should not be inlined in non-shared ones
2018-05-15 10:55:40 +02:00
Nicolas Grekas
932dbd232d minor #27243 [Config] Fix tests when path contains UTF chars (ostrolucky)
This PR was merged into the 3.4 branch.

Discussion
----------

[Config] Fix tests when path contains UTF chars

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

Commits
-------

b2a97ea00f [Config] Fix tests when path contains UTF chars
2018-05-15 10:54:45 +02:00
Nicolas Grekas
b7feafcf58 bug #27141 [Process] Suppress warnings when open_basedir is non-empty (cbj4074)
This PR was merged into the 2.7 branch.

Discussion
----------

[Process] Suppress warnings when open_basedir is non-empty

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

If PHP is configured *with a non-empty open_basedir* value that does not permit access to the target location, these calls to is_executable() throw warnings.

While Symfony may not raise exceptions for warnings in production environments, other frameworks (such as Laravel) do, in which case any of these checks causes a show-stopping 500 error.

We fixed a similar issue in the ExecutableFinder class via symfony/symfony#16182 .

This has always been an issue, but 709e15e7a3 made it more likely that a warning is triggered.

Commits
-------

34f136e01b Suppress warnings when open_basedir is non-empty
2018-05-15 10:20:41 +02:00
Nicolas Grekas
1c3b1055df [DI] Allow defining bindings on ChildDefinition 2018-05-15 09:24:59 +02:00
Fabien Potencier
4c38b4dfa6 minor #27256 Cleanup 2 tests for the HttpException classes (ncou)
This PR was submitted for the master branch but it was merged into the 3.4 branch instead (closes #27256).

Discussion
----------

Cleanup 2 tests for the HttpException classes

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

See discussion in linked issue.

Commits
-------

5516b329af Cleanup 2 tests for the HttpException classes
2018-05-15 07:00:07 +02:00
ncou
5516b329af Cleanup 2 tests for the HttpException classes 2018-05-15 06:59:59 +02:00
Fabien Potencier
974050feb8 bug #27250 [Session] limiting :key for GET_LOCK to 64 chars (oleg-andreyev)
This PR was merged into the 2.7 branch.

Discussion
----------

[Session] limiting :key for GET_LOCK to 64 chars

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

> MySQL 5.7.5 and later enforces a maximum length on lock names of 64 characters. Previously, no limit was enforced.

Cases:
- `session_id` is set by developers manually
- `session.sid_length` is configured

Ref.:
- https://dev.mysql.com/doc/refman/5.7/en/miscellaneous-functions.html#function_get-lock
- http://php.net/manual/en/session.configuration.php#ini.session.sid-length

Other issues:
- https://github.com/go-sql-driver/mysql/issues/385
- https://github.com/stefangabos/Zebra_Session/issues/16

Commits
-------

9cda96b8b5 #27250 limiting GET_LOCK key up to 64 char due to changes in MySQL 5.7.5 and later
2018-05-15 06:51:13 +02:00
Samuel ROZE
f59ce97eff feature #27128 [Messenger] Middleware factories support in config (ogizanagi)
This PR was squashed before being merged into the 4.1 branch (closes #27128).

Discussion
----------

[Messenger] Middleware factories support in config

| Q             | A
| ------------- | ---
| Branch?       | master <!-- see below -->
| 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

Following https://github.com/symfony/symfony/pull/26864, this would allow to configure easily the middlewares by using an abstract factory definition to which are provided simple arguments (just scalars, no services references).

For instance, here is how the DoctrineBundle would benefit from such a feature (also solving the wiring of the `DoctrineTransactionMiddleware` reverted in https://github.com/symfony/symfony/pull/26684):

```yaml
framework:
    messenger:
      buses:
        default:
          middleware:
            - logger
            - doctrine_transaction_middleware: ['entity_manager_name']
```

where `doctrine_transaction_middleware` would be an abstract factory definition provided by the doctrine bundle:

```yml
services:

    doctrine.orm.messenger.middleware_factory.transaction:
      class: Symfony\Bridge\Doctrine\Messenger\DoctrineTransactionMiddlewareFactory
      arguments: ['@doctrine']

    doctrine_transaction_middleware:
      class: Symfony\Bridge\Doctrine\Messenger\DoctrineTransactionMiddleware
      factory: ['@doctrine.orm.messenger.middleware_factory.transaction', 'createMiddleware']
      abstract: true
      # the default arguments to use when none provided from config.
      # i.e:
      #   middlewares:
      #     - doctrine_transaction_middleware: ~
      arguments: ['default']
```

and is interpreted as:

```yml
buses:
    default:
        middleware:
            -
                id: logger
                arguments: {  }
            -
                id: doctrine_transaction_middleware
                arguments:
                    - entity_manager_name
        default_middleware: true
```

---

<details>

<summary>Here is the whole config reference with these changes: </summary>

```yaml
# Messenger configuration
messenger:
    enabled:              true
    routing:

        # Prototype
        message_class:
            senders:              []
    serializer:
        enabled:              true
        format:               json
        context:

            # Prototype
            name:                 ~
    encoder:              messenger.transport.serializer
    decoder:              messenger.transport.serializer
    adapters:

        # Prototype
        name:
            dsn:                  ~
            options:              []
    default_bus:          null
    buses:

        # Prototype
        name:
            default_middleware:  true
            middleware:

                # Prototype
                -
                    id:                   ~ # Required
                    arguments:            []
```

</details>

Commits
-------

f5ef421474 [Messenger] Middleware factories support in config
2018-05-14 20:17:15 +01:00
Maxime Steinhausser
f5ef421474 [Messenger] Middleware factories support in config 2018-05-14 20:17:01 +01:00
Oleg Andreyev
9cda96b8b5 #27250 limiting GET_LOCK key up to 64 char due to changes in MySQL 5.7.5 and later 2018-05-14 20:29:47 +03:00
Adam Szaraniec
2400e71962 use strict compare in url validator 2018-05-14 21:15:07 +04:00
Gabriel Ostrolucký
b2a97ea00f [Config] Fix tests when path contains UTF chars 2018-05-14 18:49:53 +02:00
Fabien Potencier
d7d4e4169a minor #27263 [Profiler] Remove propel & event_listener_loading category identifiers (ogizanagi)
This PR was merged into the 2.7 branch.

Discussion
----------

[Profiler] Remove propel & event_listener_loading category identifiers

| Q             | A
| ------------- | ---
| Branch?       | 2.7 <!-- see below -->
| 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 | Part of https://github.com/symfony/symfony/issues/27262#issuecomment-388865265   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

Commits
-------

d52f491bfa [Profiler] Remove propel & event_listener_loading category identifiers
2018-05-14 18:36:29 +02:00
Nicolas Grekas
6f8b8625f4 [DI] Shared services should not be inlined in non-shared ones 2018-05-14 18:07:37 +02:00
Maxime Steinhausser
d52f491bfa [Profiler] Remove propel & event_listener_loading category identifiers 2018-05-14 18:07:30 +02:00
Fabien Potencier
5f0e2d6671 bug #27214 [HttpKernel] Fix services are no longer injected into __invoke controllers method (ogizanagi)
This PR was merged into the 4.1 branch.

Discussion
----------

[HttpKernel] Fix services are no longer injected into __invoke controllers method

| Q             | A
| ------------- | ---
| Branch?       | 4.1 <!-- see below -->
| 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 | #27208   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

_TL;DR:_ The `RemoveEmptyControllerArgumentLocatorsPass` is the one adding the `Controller::_invoke` => `Controller` shortcut missing from the service locator. It isn't properly executed on some cases. This fixes it.

Since https://github.com/symfony/symfony/pull/26833, the resolvers are decorated by a `TraceableValueResolver`, which usually isn't much an issue to deal within passes. But the `RemoveEmptyControllerArgumentLocatorsPass` happens late (`TYPE_BEFORE_REMOVING`), when decoration inheritance is already resolved, so accessing `$controllerLocator = $container->getDefinition((string) $serviceResolver->getArgument(0));` isn't accessing the controller locator, but the decorated service instead.

Commits
-------

ee44903fd0 [HttpKernel] Fix services are no longer injected into __invoke controllers method
2018-05-14 08:47:00 +02:00
Fabien Potencier
30ffb61b1f bug #27237 [Debug] Fix populating error_get_last() for handled silent errors (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Debug] Fix populating error_get_last() for handled silent errors

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

When a userland error handler doesn't return `false`, `error_get_last()` is not updated, so we cannot see the real last error, but the previous one.

See https://3v4l.org/Smmt7

Commits
-------

d7e612d2ac [Debug] Fix populating error_get_last() for handled silent errors
2018-05-14 08:44:24 +02:00
Fabien Potencier
906a05c43f minor #27252 [HttpKernel] Make TraceableValueResolver $stopwatch mandatory (ogizanagi)
This PR was merged into the 4.1 branch.

Discussion
----------

[HttpKernel] Make TraceableValueResolver $stopwatch mandatory

| Q             | A
| ------------- | ---
| Branch?       | 4.1 <!-- see below -->
| 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 | https://github.com/symfony/symfony/pull/26833#discussion_r181997515   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

I understand why this was suggested in https://github.com/symfony/symfony/pull/26833#discussion_r181997515, but as stated by @iltar , I don't think it makes sense to register a traceable resolver instantiating a Stopwatch itself, as there is no way to fetch it and wouldn't be a shared instance, probably defeating the feature and registering a useless decorator.
Instead, let's make the stopwatch mandatory and make the service id to use in the pass configurable.

Commits
-------

585ae7c646 [HttpKernel] Make TraceableValueResolver $stopwatch mandatory
2018-05-14 08:40:41 +02:00
Fabien Potencier
fb881194b6 bug #27232 [Cache][Lock] Fix usages of error_get_last() (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Cache][Lock] Fix usages of error_get_last()

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

When a userland error handler doesn't return `false`, `error_get_last()` is not updated, so we cannot see the real last error, but the previous one.

See https://3v4l.org/Smmt7

Commits
-------

7904784a94 [Cache][Lock] Fix usages of error_get_last()
2018-05-14 08:38:31 +02:00
Fabien Potencier
15b03a8981 bug #27236 [Filesystem] Fix usages of error_get_last() (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Filesystem] Fix usages of error_get_last()

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

Same as #27232 for 2.7.
When a userland error handler doesn't return `false`, `error_get_last()` is not updated, so we cannot see the real last error, but the previous one.

See https://3v4l.org/Smmt7

Commits
-------

9d015c7c50 [Filesystem] Fix usages of error_get_last()
2018-05-14 08:36:14 +02:00
Gabriel Ostrolucký
16ebb43bd4 Disallow illegal characters like "." in session.name
PHP saves cookie with correct name, but upon deserialization to
$_COOKIE, it replaces some characters, e.g. "." becomes "_".

This is probably also reason why \SessionHandler is not able to find
a session.

https://harrybailey.com/2009/04/dots-arent-allowed-in-php-cookie-names/
https://bugs.php.net/bug.php?id=75883
2018-05-13 23:57:04 +02:00
Maxime Steinhausser
585ae7c646 [HttpKernel] Make TraceableValueResolver $stopwatch mandatory 2018-05-13 20:52:09 +02:00
Nicolas Grekas
9d015c7c50 [Filesystem] Fix usages of error_get_last() 2018-05-13 17:44:36 +02:00
Nicolas Grekas
f8cde70ba1 [HttpKernel] do file_exists() check instead of silent notice 2018-05-13 13:51:16 +02:00
Fabien Potencier
8335537446 feature #27202 [Messenger] Improve the profiler panel (ogizanagi)
This PR was squashed before being merged into the 4.1 branch (closes #27202).

Discussion
----------

[Messenger] Improve the profiler panel

| Q             | A
| ------------- | ---
| Branch?       | 4.1 <!-- see below -->
| 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   <!-- #26597  issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

This is an attempt to enhance the profiler panel a bit.

**with the following messages dispatched:**

```php
$queryBus->dispatch(Envelope::wrap(new GetGreetingsQuery('Hello you'))
    ->with(new JustAFriendOfMine())
    ->with(new AndHisPlusO̶n̶e̶Eleven())
);
$commandBus->dispatch(new SendGiftCommand());
$queryBus->dispatch(new GetGreetingsQuery('Exterminate!'));
```

## Before

<img width="1084" alt="screenshot 2018-05-12 a 13 57 57" src="https://user-images.githubusercontent.com/2211145/39957055-8a0f009e-55ec-11e8-9d8e-bf79aad4b420.PNG">

🐛calls order are wrong here, fixed in this PR

## After

### collapsed

<!-- <img width="1083" alt="screenshot 2018-05-10 a 23 51 07" src="https://user-images.githubusercontent.com/2211145/39896093-19a8c7ee-54ad-11e8-8dcb-4e165ffd2eae.PNG">-->

<img width="1085" alt="screenshot 2018-05-12 a 13 18 35" src="https://user-images.githubusercontent.com/2211145/39956802-9d4c38a2-55e7-11e8-8425-ad090c0871b6.PNG">
<img width="1085" alt="screenshot 2018-05-12 a 13 26 44" src="https://user-images.githubusercontent.com/2211145/39956827-25d9e426-55e8-11e8-9116-160603649f33.PNG">

📝 _When loading the page, all messages details are collapsed by default but the first one per tab._

### expanded

<!-- <img width="1083" alt="screenshot 2018-05-10 a 23 13 39" src="https://user-images.githubusercontent.com/2211145/39894779-42c9cc9a-54a8-11e8-9529-6292481536d4.PNG"> -->

<img width="1086" alt="screenshot 2018-05-12 a 13 49 42" src="https://user-images.githubusercontent.com/2211145/39956981-639fc3d6-55eb-11e8-9224-a48f591db3da.PNG">

### live

<!-- ![mai-10-2018 23-16-17](https://user-images.githubusercontent.com/2211145/39894789-4b8fa138-54a8-11e8-986c-fccf6cd0234f.gif) -->

![mai-12-2018 13-55-40](https://user-images.githubusercontent.com/2211145/39957041-37f17b34-55ec-11e8-8569-a733a104bf82.gif)

### toolbar (with exceptions)

<img width="284" alt="screenshot 2018-05-10 a 23 18 32" src="https://user-images.githubusercontent.com/2211145/39895011-0467f2a0-54a9-11e8-9d78-25461cf71c41.PNG">

## Notes

- Table headers are clickable, so you can jump directly to the message class in the code
- Reversing headers/rows allows to have a wider space for dumps and allows to add more entries in the future. This is an issue we already have with the Validator panel (when there is both an invalid value as object and a constraint violation dumped) which I'd like to revamp soon.
- ~~I wonder if we should keep the dispatched messages in call order, or if we can segregate by bus (using tabs?).~~
- ~~we could add a left container listing messages classes only, allowing to show details of a single message dispatched on a right container (similar to what the Form panel does). I'll probably suggest the same for the Validator panel.~~

Commits
-------

3d19578297 [Messenger] Improve the profiler panel
2018-05-13 08:14:37 +02:00
Maxime Steinhausser
3d19578297 [Messenger] Improve the profiler panel 2018-05-13 08:14:09 +02:00
Fabien Potencier
98934e4c77 bug #27191 [DI] Display previous error messages when throwing unused bindings (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] Display previous error messages when throwing unused bindings

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

As reported by @jvasseur, confirmation + review welcome.

Commits
-------

f2231b584e [DI] Display previous error messages when throwing unused bindings
2018-05-12 11:34:41 +02:00
Nicolas Grekas
7904784a94 [Cache][Lock] Fix usages of error_get_last() 2018-05-11 10:42:54 -07:00
Nicolas Grekas
d7e612d2ac [Debug] Fix populating error_get_last() for handled silent errors 2018-05-11 10:00:11 -07:00
Fabien Potencier
c54faf4111 minor #27190 [Workflow] Added DefinitionBuilder::setMetadataStore(). (vudaltsov)
This PR was squashed before being merged into the 4.1 branch (closes #27190).

Discussion
----------

[Workflow] Added DefinitionBuilder::setMetadataStore().

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

This PR complements #26092.

Commits
-------

2882f8d8c8 [Workflow] Added DefinitionBuilder::setMetadataStore().
2018-05-11 18:37:28 +02:00
Valentin
2882f8d8c8 [Workflow] Added DefinitionBuilder::setMetadataStore(). 2018-05-11 18:37:20 +02:00
Fabien Potencier
4f3afd53a8 fixed CS 2018-05-11 17:58:37 +02:00
Fabien Potencier
f5e6a61a82 Merge branch '3.4' into 4.0
* 3.4:
  fixed CS
  fixed CS
  [FrameworkBundle] Fix cache:clear on vagrant
  [HttpKernel] Handle NoConfigurationException "onKernelException()"
  Fix misses calculation when calling getItems
  Fixed return type
2018-05-11 17:53:11 +02:00
Fabien Potencier
7b7f75994f Merge branch '2.8' into 3.4
* 2.8:
  fixed CS
  fixed CS
  Fixed return type
2018-05-11 17:52:51 +02:00
Fabien Potencier
df43c1e99d fixed CS 2018-05-11 17:51:28 +02:00
Fabien Potencier
1f3aa51b5f Merge branch '2.7' into 2.8
* 2.7:
  fixed CS
  Fixed return type
2018-05-11 17:48:50 +02:00
Fabien Potencier
8072eed4bf fixed CS 2018-05-11 17:48:19 +02:00
Fabien Potencier
43bad425b8 bug #27231 [FrameworkBundle] Fix cache:clear on vagrant (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] Fix cache:clear on vagrant

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

What a mess, shared folder on vbox...

![image](https://user-images.githubusercontent.com/243674/39903547-87bb2602-5488-11e8-914e-61aa53ffe6ea.png)

Commits
-------

3381611d86 [FrameworkBundle] Fix cache:clear on vagrant
2018-05-11 17:42:47 +02:00
Fabien Potencier
9ef517d2a4 bug #27222 [WebProfilerBundle][Cache] Fix misses calculation when calling getItems (fsevestre)
This PR was merged into the 3.4 branch.

Discussion
----------

[WebProfilerBundle][Cache] Fix misses calculation when calling getItems

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

Hello,

This PR fixes a bug in the misses calculation in the cache data collector when calling the `getItems` method.

Found this while trying to understand why I had an inconsistency in the profiler:
![misses](https://user-images.githubusercontent.com/4130750/39875423-e6212f60-5470-11e8-87be-c075ee76aeaa.png)

Commits
-------

3d1ab6df13 Fix misses calculation when calling getItems
2018-05-11 17:32:25 +02:00
Nicolas Grekas
3381611d86 [FrameworkBundle] Fix cache:clear on vagrant 2018-05-11 08:27:29 -07:00
Fabien Potencier
5deb504a92 bug #27227 [HttpKernel] Handle NoConfigurationException "onKernelException()" (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpKernel] Handle NoConfigurationException "onKernelException()"

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

Commits
-------

db6ef38ea9 [HttpKernel] Handle NoConfigurationException "onKernelException()"
2018-05-11 17:19:12 +02:00
Yonel Ceruto
54c2541d94 Select alternatives on missing receiver arg or typo 2018-05-11 09:46:46 -04:00
Samuel ROZE
982fc66760 feature #27034 [Messenger][DX] Uses custom method names for handlers (sroze)
This PR was merged into the 4.1 branch.

Discussion
----------

[Messenger][DX] Uses custom method names for handlers

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

This has been discussed mostly in the [`MessageHandlerInterface` pull-request](https://github.com/symfony/symfony/pull/26685). For consistency reasons and convenience, this PR adds the ability to configure the method to be used on handlers:
```php
use Symfony\Component\Messenger\Handler\MessageSubscriberInterface;
use Symfony\Component\Messenger\Handler\MessageSubscriberConfiguration;

class CreateNumberMessageHandler implements MessageSubscriberInterface
{
    /**
     * {@inheritdoc}
     */
    public static function getHandledMessages(): array
    {
        return [
            CreateNumber::class => ['createNumber', 10],
            AnotherMessage::class => 'anotherMethod',
        ];
    }

    public function createNumber(CreateNumber $command)
    {
        // ...
    }
}
```

Commits
-------

2461e5119a [Messenger][DX] Uses custom method names for handlers
2018-05-11 15:17:34 +02:00
Samuel ROZE
4ef45dd03a bug #27228 [Messenger] Remove autoconfiguration for Sender/ReceiverInterface (kbond)
This PR was merged into the 4.1 branch.

Discussion
----------

[Messenger] Remove autoconfiguration for Sender/ReceiverInterface

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

When creating a custom transport I ran into an error where the container was trying to autowire my transport and failing because it has arguments that can't be autowired.

The Transport service is created by the TransportFactory so this is not needed. (unless I am missing something)

Commits
-------

fa4ce7bbc4 [Messenger] remove autoconfiguration for Sender/ReceiverInterface
2018-05-11 15:15:15 +02:00
Samuel ROZE
2461e5119a [Messenger][DX] Uses custom method names for handlers 2018-05-11 15:00:51 +02:00
Kevin Bond
fa4ce7bbc4
[Messenger] remove autoconfiguration for Sender/ReceiverInterface 2018-05-11 08:48:51 -04:00
Tobias Schultze
497ce74f9e bug #27229 [Messenger] Rename tag attribute "name" by "alias" (yceruto)
This PR was merged into the 4.1 branch.

Discussion
----------

[Messenger] Rename tag attribute "name" by "alias"

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

As "name" is a reserved attribute in YAML and XML schema it makes impossible to register manually a custom Sender or Receiver with another "name" attribute.

> The file ".../demos/messenger-flex/config/services.yaml" does not contain valid YAML.
Duplicate key "name" detected at line 30 (near "- { name: 'messenger.receiver', name: 'mail' }").

Commits
-------

1ef27a7e6a Rename tag attribute "name" by "alias"
2018-05-11 11:17:32 +02:00