package and depencies

This commit is contained in:
RafficMohammed
2023-01-08 02:57:24 +05:30
parent d5332eb421
commit 1d54b8bc7f
4309 changed files with 193331 additions and 172289 deletions

View File

@@ -21,9 +21,6 @@ use Symfony\Component\ErrorHandler\Error\FatalError;
*/
class ClassNotFoundErrorEnhancer implements ErrorEnhancerInterface
{
/**
* {@inheritdoc}
*/
public function enhance(\Throwable $error): ?\Throwable
{
// Some specific versions of PHP produce a fatal error when extending a not found class.
@@ -143,7 +140,7 @@ class ClassNotFoundErrorEnhancer implements ErrorEnhancerInterface
];
if ($prefix) {
$candidates = array_filter($candidates, function ($candidate) use ($prefix) { return 0 === strpos($candidate, $prefix); });
$candidates = array_filter($candidates, function ($candidate) use ($prefix) { return str_starts_with($candidate, $prefix); });
}
// We cannot use the autoloader here as most of them use require; but if the class
@@ -157,7 +154,7 @@ class ClassNotFoundErrorEnhancer implements ErrorEnhancerInterface
try {
require_once $file;
} catch (\Throwable $e) {
} catch (\Throwable) {
return null;
}