instaclick / medusa

Composer Package and Git Repository Mirror via Satis
MIT License
13 stars 5 forks source link

Avoid HTTP Calls to Packagist for system packages like php, ext-xml or lib-icu #26

Closed andygrunwald closed 7 years ago

andygrunwald commented 7 years ago

When mirroring packages like symfony/intl and you will fire a bin/medusa mirror command, medusa fires 8 HTTP calls for packages like php, symfony/polyfill-intl-icu, symfony/polyfill-php54, ext-intl, lib-icu, etc.

On Packagist side this leads to unnecessary requests like:

1.2.3.4 - - [11/Jun/2017:23:57:17 +0000] "GET /packages/php.json/ HTTP/1.1" 302 440 "-" "Guzzle/2.8.8 curl/7.49.1 PHP/7.0.9"
1.2.3.4 - - [11/Jun/2017:23:57:17 +0000] "GET /search?q=php.json&reason=vendor_not_found HTTP/1.1" 301 528 "-" "Guzzle/2.8.8 curl/7.49.1 PHP/7.0.9"
1.2.3.4 - - [11/Jun/2017:23:57:17 +0000] "GET /search/?q=php.json&reason=vendor_not_found HTTP/1.1" 200 2632 "-" "Guzzle/2.8.8 curl/7.49.1 PHP/7.0.9"

This PR skips all packages that don't contain a /. This means they don't have a vendor and are identified as a system package.