Skip to content

Commit aca70d9

Browse files
derrabusnicolas-grekas
authored andcommitted
Leverage str_contains/str_starts_with
Signed-off-by: Alexander M. Turek <[email protected]>
1 parent 475c9f0 commit aca70d9

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Debug/WrappedListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function __construct($listener, ?string $name, Stopwatch $stopwatch, Even
5252
$this->pretty = $this->name.'::'.$listener[1];
5353
} elseif ($listener instanceof \Closure) {
5454
$r = new \ReflectionFunction($listener);
55-
if (false !== strpos($r->name, '{closure}')) {
55+
if (str_contains($r->name, '{closure}')) {
5656
$this->pretty = $this->name = 'closure';
5757
} elseif ($class = $r->getClosureScopeClass()) {
5858
$this->name = $class->name;

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
],
1818
"require": {
1919
"php": ">=7.1.3",
20-
"symfony/event-dispatcher-contracts": "^1.1"
20+
"symfony/event-dispatcher-contracts": "^1.1",
21+
"symfony/polyfill-php80": "^1.16"
2122
},
2223
"require-dev": {
2324
"symfony/dependency-injection": "^3.4|^4.0|^5.0",

0 commit comments

Comments
 (0)