viosys / composer-download-sleep-plugin
Composer plugin to sleep for a given amount of seconds before downloading a file
Installs: 10
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Type:composer-plugin
Requires
- php: ^8.2
- composer-plugin-api: ^2.0
Requires (Dev)
- composer/composer: ^2.0
- phpstan/phpstan: ^1.11
This package is auto-updated.
Last update: 2025-09-09 09:27:03 UTC
README
This plugin will sleep for a given amount of seconds before downloading a file. Purpose is to avoid hitting the rate limit of the provider.
Installation
- Requirements: PHP ^8.2 and Composer 2.x
- Install the plugin in your project:
- Globally:
composer global require viosys/composer-download-sleep-plugin
- Per project:
composer require viosys/composer-download-sleep-plugin --dev
- Globally:
- Composer will automatically activate the plugin (type: composer-plugin).
Configuration
Name | Type | Default | Description |
---|---|---|---|
duration | integer | 1 | Number of seconds to sleep before each download |
urlsToApply | array | [] | List of URLs to apply the sleep delay to. Only downloads from these URLs will be delayed. The download URL has to start with one of the given URLs. |
{ "require": { "viosys/composer-download-sleep-plugin": "*" }, "extra": { "viosys/composer-download-sleep-plugin": { "duration": 2, "urlsToApply": [ "https://packages.example.com" ] } } }
Development
- Static analysis: install dev dependencies and run PHPStan
- Install:
composer install
- Run:
composer phpstan
- Strict:
composer phpstan:strict
- Install:
PHPStan is configured via phpstan.neon.dist at level 8 analyzing the src directory.