This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony
Fabien Potencier 3fc1189910 bug #23008 [EventDispatcher] Handle laziness internally instead of relying on ClosureProxyArgument (nicolas-grekas)
This PR was merged into the 3.3 branch.

Discussion
----------

[EventDispatcher] Handle laziness internally instead of relying on ClosureProxyArgument

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

If we decide to go this way, we might drop ClosureProxyArgument entirely because we won't need it internally. I'll propose it in another PR for discussion if this one is accepted.

This PR allows "high-order" listeners, as `array(Closure, method)`. Closure is called to get the actual instance when needed only.

How does it look to you? (I'll add tests once confirmed)

Commits
-------

c17a009d66 [EventDispatcher] Handle laziness internally instead of relying on ClosureProxyArgument
2017-06-01 13:46:45 -07:00
..
Bridge Revert "bug #22925 [PhpUnitBridge] Adjust PHPUnit class_alias check to also check for namespaced class (GawainLynch)" 2017-05-28 13:10:04 +02:00
Bundle Fix CacheCollectorPass priority 2017-06-01 19:06:24 +02:00
Component bug #23008 [EventDispatcher] Handle laziness internally instead of relying on ClosureProxyArgument (nicolas-grekas) 2017-06-01 13:46:45 -07:00