diff --git a/Debug/WrappedListener.php b/Debug/WrappedListener.php index e047639..9b910e6 100644 --- a/Debug/WrappedListener.php +++ b/Debug/WrappedListener.php @@ -52,7 +52,7 @@ public function __construct($listener, ?string $name, Stopwatch $stopwatch, Even $this->pretty = $this->name.'::'.$listener[1]; } elseif ($listener instanceof \Closure) { $r = new \ReflectionFunction($listener); - if (false !== strpos($r->name, '{closure}')) { + if (str_contains($r->name, '{closure}')) { $this->pretty = $this->name = 'closure'; } elseif ($class = $r->getClosureScopeClass()) { $this->name = $class->name; diff --git a/composer.json b/composer.json index 0a518a5..55c2716 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,8 @@ ], "require": { "php": ">=7.1.3", - "symfony/event-dispatcher-contracts": "^1.1" + "symfony/event-dispatcher-contracts": "^1.1", + "symfony/polyfill-php80": "^1.16" }, "require-dev": { "symfony/dependency-injection": "^3.4|^4.0|^5.0",