src/Viserio/Component/StaticalProxy/AliasLoader.php
public function load(string $alias): bool
    {
        if ($this->realTimeStaticalProxyActivated === true &&
            \mb_strpos($alias, $this->staticalProxyNamespace) === 0
        ) {
            $this->loadStaticalProxy($alias);

            return true;
        }

        // Skip recursive aliases if defined
        if (\in_array($alias, $this->resolving, true)) {
            return false;
        }

        // Set it as the resolving class for when
        // we want to block recursive resolving
        $this->resolving[] = $alias;

        if (isset(self::$cache[$alias])) {
            // If we already have the alias in the cache don't bother resolving again
            $class = self::$cache[$alias];
        } elseif ($class = $this->resolveAlias($alias)) {
            // We've got a plain alias, now we can skip the others as this
            // is the most powerful one.
        } elseif ($class = $this->resolveNamespaceAlias($alias)) {
            // We've got a namespace alias, we can skip pattern matching.
        } elseif (! $class = $this->resolvePatternAlias($alias)) {
            // Lastly we'll try to resolve it through pattern matching. This is the most
            // expensive match type. Caching is recommended if you use this.
            return false;
        }

        // Remove the resolving class
        \array_pop($this->resolving);

        if (! $this->exists($class)) {
            return false;
        }

        // Create the actual alias
        \class_alias($class, $alias);

        if (! isset(self::$cache[$alias])) {
            self::$cache[$alias] = $class;
        }

        return true;
    }
public function load(string $alias): bool
    {
        if ($this->realTimeStaticalProxyActivated === true &&
            \mb_strpos($alias, $this->staticalProxyNamespace) === 0
        ) {
            $this->loadStaticalProxy($alias);

            return true;
        }

        // Skip recursive aliases if defined
        if (\in_array($alias, $this->resolving, true)) {
            return false;
        }

        // Set it as the resolving class for when
        // we want to block recursive resolving
        $this->resolving[] = $alias;

        if (isset(self::$cache[$alias])) {
            // If we already have the alias in the cache don't bother resolving again
            $class = self::$cache[$alias];
        } elseif ($class = $this->resolveAlias($alias)) {
            // We've got a plain alias, now we can skip the others as this
            // is the most powerful one.
        } elseif ($class = $this->resolveNamespaceAlias($alias)) {
            // We've got a namespace alias, we can skip pattern matching.
        } elseif (! $class = $this->resolvePatternAlias($alias)) {
            // Lastly we'll try to resolve it through pattern matching. This is the most
            // expensive match type. Caching is recommended if you use this.
            return false;
        }

        // Remove the resolving class
        \array_pop($this->resolving);

        if (! $this->exists($class)) {
            return false;
        }

        // Create the actual alias
        \class_alias($class, $alias);

        if (! isset(self::$cache[$alias])) {
            self::$cache[$alias] = $class;
        }

        return true;
    }
{@inheritdoc}