|
5 | 5 | namespace Yiisoft\Yii\Debug\Collector\Stream; |
6 | 6 |
|
7 | 7 | use Yiisoft\Strings\CombinedRegexp; |
8 | | -use Yiisoft\Yii\Debug\Helper\BacktraceIgnoreMatcher; |
| 8 | +use Yiisoft\Strings\StringHelper; |
| 9 | +use Yiisoft\Yii\Debug\Helper\BacktraceMatcher; |
9 | 10 | use Yiisoft\Yii\Debug\Helper\StreamWrapper\StreamWrapper; |
10 | 11 | use Yiisoft\Yii\Debug\Helper\StreamWrapper\StreamWrapperInterface; |
11 | 12 |
|
@@ -94,9 +95,10 @@ public static function register(): void |
94 | 95 | /** |
95 | 96 | * It's important to trigger autoloader before unregistering the file stream handler |
96 | 97 | */ |
97 | | - class_exists(BacktraceIgnoreMatcher::class); |
| 98 | + class_exists(BacktraceMatcher::class); |
98 | 99 | class_exists(StreamWrapper::class); |
99 | 100 | class_exists(CombinedRegexp::class); |
| 101 | + class_exists(StringHelper::class); |
100 | 102 | stream_wrapper_unregister('http'); |
101 | 103 | stream_wrapper_register('http', self::class, STREAM_IS_URL); |
102 | 104 |
|
@@ -303,12 +305,12 @@ public function url_stat(string $path, int $flags): array|false |
303 | 305 |
|
304 | 306 | private function isIgnored(string $url): bool |
305 | 307 | { |
306 | | - if (BacktraceIgnoreMatcher::doesStringMatchPattern($url, self::$ignoredUrls)) { |
| 308 | + if (StringHelper::matchAnyRegex($url, self::$ignoredUrls)) { |
307 | 309 | return true; |
308 | 310 | } |
309 | 311 |
|
310 | 312 | $backtrace = debug_backtrace(); |
311 | | - return BacktraceIgnoreMatcher::isIgnoredByClass($backtrace, self::$ignoredClasses) |
312 | | - || BacktraceIgnoreMatcher::isIgnoredByFile($backtrace, self::$ignoredPathPatterns); |
| 313 | + return BacktraceMatcher::matchesClass($backtrace[3], self::$ignoredClasses) |
| 314 | + || BacktraceMatcher::matchesFile($backtrace[3], self::$ignoredPathPatterns); |
313 | 315 | } |
314 | 316 | } |
0 commit comments