定制 viosys/composer-download-sleep-plugin 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

viosys/composer-download-sleep-plugin

最新稳定版本:v0.1.1

Composer 安装命令:

composer require viosys/composer-download-sleep-plugin

包简介

Composer plugin to sleep for a given amount of seconds before downloading a file

README 文档

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
  • 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

PHPStan is configured via phpstan.neon.dist at level 8 analyzing the src directory.

统计信息

  • 总下载量: 10
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-09-08