dev-kit icon indicating copy to clipboard operation
dev-kit copied to clipboard

Do not make calls to Packagist when creating `Projects`

Open franmomu opened this issue 4 years ago • 3 comments

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

https://github.com/sonata-project/dev-kit/blob/d9010bee98352c2230f9588a98cf7d2966beb7a8/src/Config/Projects.php#L35-L52

When instantiating is making several calls to packagist.

franmomu avatar May 02 '21 11:05 franmomu

We should keep the calls, but maybe cache the response for some time

OskarStark avatar May 02 '21 17:05 OskarStark

I meant to make the calls only when needed (and also caching), not when instantiating.

franmomu avatar May 02 '21 20:05 franmomu

In a similar way, it would be nice to do the same for the PR on the github api. https://github.com/sonata-project/dev-kit/pull/1563#issue-669087524

We're doing $this->githubPager->fetchAll($this->github->search(), 'issues', [$query->toString()]) then a call to the api by PR. It could be done only when some extra information are needed.

VincentLanglet avatar Jun 20 '21 12:06 VincentLanglet