folivoro/composer-dropin-installer 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

folivoro/composer-dropin-installer

Composer 安装命令:

composer require folivoro/composer-dropin-installer

包简介

Copies a single file from a package into a target directory defined by installer-paths.

README 文档

README

Sloth Logo

Total Downloads Latest Stable Version License CI

Folivoro Composer-Dropin-Installer

A Composer plugin that copies files from any installed package into a target directory — either resolved from the root package's installer-paths configuration, or a direct path relative to the project root.

Why

Some packages need to place a file at a specific location in the project — for example, a WordPress MU-plugin bootstrapper or a shared config file. The standard composer/installers approach installs an entire package directory. This plugin does one thing: copies declared files to the right place.

Installation

composer require folivoro/composer-dropin-installer

Usage

In any package that wants to install dropin files, add to composer.json:

Single file (via installer-paths)

{
    "extra": {
        "dropin": {
            "file": "my-plugin.php",
            "target-type": "wordpress-muplugin",
            "target-dir": "my-plugin"
        }
    }
}

Single file (via direct path)

{
    "extra": {
        "dropin": {
            "file": "pint.json",
            "target-path": "."
        }
    }
}

Multiple files

{
    "extra": {
        "dropins": [
            { "file": "pint.json", "target-path": "." },
            { "file": "phpstan.neon", "target-path": "." },
            { "file": "rector.php", "target-path": "." }
        ]
    }
}

The root project must have installer-paths configured when using target-type:

{
    "extra": {
        "installer-paths": {
            "public/extensions/components/{$name}/": [
                "type:wordpress-muplugin"
            ]
        }
    }
}

Given the above, my-plugin.php will be copied to:

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-05-18

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固