composer / packagist

Package Repository Website - try https://packagist.com if you need your own -

Home Page:https://packagist.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Package Provider Data is Too Big

qiqizjl opened this issue · comments

We are still using Composer1. But it keeps prompting that there is not enough memory. After checking, I found that there are some oversized json files in the metadata of Composer1, and the packages inside do not seem to have much relationship with the packages I use.

eg:
https://repo.packagist.org/p/illuminate/http.json 42m
https://repo.packagist.org/p/illuminate/events.json 42m

https://github.com/composer/packagist/blob/main/src/Package/SymlinkDumper.php#L228

$names[strtolower($link->getPackageName())] = true;

Looks like it's caused here. Does the metadata of Composer1 need to be processed for the replace package?

The fact that all replacers were also included in those files was one of the known issues of the v1 format, which was fixed in the v2 format. The solution to reduce memory usage is to migrate to Composer 2.

Our business has not been fully migrated to Composer2. Is the metadata update script of v1 no longer maintained?

It is not that it is not maintained. It is that changing the structure of the metadata would break Composer v1 (which is why this needed to be done in a new format of metadata) and that the Composer v1 solver cannot consume the metadata in v2 format (due to the way the solver works, it needs those additional package info)

tks