Skip to content

Do not make calls to Packagist when creating Projects #1508

@franmomu

Description

@franmomu

I wanted to try some commands and took some time to just show the command list and that's because:

public function __construct(PackagistClient $packagist)
{
$this->packagist = $packagist;
$processor = new Processor();
$projectsConfigs = $processor->processConfiguration(new ProjectsConfiguration(), [
'sonata' => ['projects' => Yaml::parseFile(__DIR__.'/../../config/projects.yaml')],
]);
foreach ($projectsConfigs['projects'] as $name => $config) {
$package = $this->packagist->get(sprintf(
'sonata-project/%s',
$name
));
$this->projects[$name] = Project::fromValues($name, $config, $package);
}
}

When instantiating is making several calls to packagist.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions