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

@@ -12,7 +12,6 @@
namespace Symfony\Component\HttpKernel\DependencyInjection;
use Composer\Autoload\ClassLoader;
use Symfony\Component\Debug\DebugClassLoader as LegacyDebugClassLoader;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\ErrorHandler\DebugClassLoader;
@@ -25,16 +24,13 @@ use Symfony\Component\HttpKernel\Kernel;
*/
class AddAnnotatedClassesToCachePass implements CompilerPassInterface
{
private $kernel;
private Kernel $kernel;
public function __construct(Kernel $kernel)
{
$this->kernel = $kernel;
}
/**
* {@inheritdoc}
*/
public function process(ContainerBuilder $container)
{
$annotatedClasses = [];
@@ -93,7 +89,7 @@ class AddAnnotatedClassesToCachePass implements CompilerPassInterface
continue;
}
if ($function[0] instanceof DebugClassLoader || $function[0] instanceof LegacyDebugClassLoader) {
if ($function[0] instanceof DebugClassLoader) {
$function = $function[0]->getClassLoader();
}
@@ -117,7 +113,7 @@ class AddAnnotatedClassesToCachePass implements CompilerPassInterface
$regex = strtr($regex, ['\\*\\*' => '.*?', '\\*' => '[^\\\\]*?']);
// If this class does not end by a slash, anchor the end
if ('\\' !== substr($regex, -1)) {
if (!str_ends_with($regex, '\\')) {
$regex .= '$';
}