ComposerResource example

return $this->expressionLanguage;
    }

    private function inVendors(string $path): bool
    {
        $path = is_file($path) ? \dirname($path) : $path;

        if (isset($this->pathsInVendor[$path])) {
            return $this->pathsInVendor[$path];
        }

        $this->vendors ??= (new ComposerResource())->getVendors();
        $path = realpath($path) ?: $path;

        if (isset($this->pathsInVendor[$path])) {
            return $this->pathsInVendor[$path];
        }

        foreach ($this->vendors as $vendor) {
            if (str_starts_with($path$vendor) && false !== strpbrk(substr($path, \strlen($vendor), 1), '/'.\DIRECTORY_SEPARATOR)) {
                $this->addResource(new FileResource($vendor.'/composer/installed.json'));

                return $this->pathsInVendor[$path] = true;
            }
Home | Imprint | This part of the site doesn't use cookies.