-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[EventDispatcher] Remove dead code in WrappedListener #23117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -57,10 +54,6 @@ public function __construct($listener, $name, Stopwatch $stopwatch, EventDispatc | |||
if (null !== $name) { | |||
$this->name = $name; | |||
} | |||
|
|||
if (null === self::$cloner) { | |||
self::$cloner = class_exists(ClassStub::class) ? new VarCloner() : false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd keep a static prop for caching the class_exists check, eg:
self::$hasClassStub = class_exists(ClassStub::class);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Thank you @chalasr. |
…halasr) This PR was merged into the 3.3 branch. Discussion ---------- [EventDispatcher] Remove dead code in WrappedListener | Q | A | ------------- | --- | Branch? | 3.3 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | n/a The static `$cloner` property is unused since ab716c6 Commits ------- 8b7de02 [EventDispatcher] Remove dead code in WrappedListener
The static
$cloner
property is unused since ab716c6