sourcebroker/deployer-loader
Composer 安装命令:
composer require sourcebroker/deployer-loader
包简介
Load deployer tasks and settings from packages, path files.
关键字:
README 文档
README
What does it do?
This package allows to load:
- single task or set of tasks from given path -> loader type:
path - set of tasks from "deployer" folder of composer package -> loader type:
package - loader config from composer package -> loader type:
get
Installation
composer require sourcebroker/deployer-loader
Usage
TYPE path
You can load single file or multiple files. You can use excludePattern to exclude.
new \SourceBroker\DeployerLoader\Load( ['path' => 'vendor/sourcebroker/deployer-extended-database/deployer/db/task/db:copy.php'], ['path' => 'vendor/sourcebroker/deployer-extended-database/deployer/db/task/db:move.php'], ); new \SourceBroker\DeployerLoader\Load( ['path' => 'vendor/sourcebroker/deployer-extended-database/deployer/db', 'excludePattern' => '/move/'], ['path' => 'vendor/sourcebroker/deployer-extended-media/deployer/media'], );
TYPE file_phar
A file is loaded from relative to root project. Allows to include Deployer phar file.
new \SourceBroker\DeployerLoader\Load( ['file_phar' => 'recipe/common.php'], );
TYPE package
Files are loaded recursively form given package from hardcoded folder deployer.
new \SourceBroker\DeployerLoader\Load( ['package' => 'sourcebroker/deployer-extended-database'], ['package' => 'sourcebroker/deployer-extended-media'], );
TYPE get
In case of get first the file with array of loader configurations is read from given package.
The logic to read the file is like:
- First it checks if the composer.json file contains the key
extra.sourcebroker/deployer.loader-file. - If the key exists, it read it and execute inclusions.
- If the key does not exist, it defaults to the path
config/loader.phpwithin the package directory.
Then the loader configurations read from that file are executed.
Example of loader file: https://github.com/sourcebroker/deployer-typo3-database/blob/main/config/loader.php
new \SourceBroker\DeployerLoader\Load( ['get' => 'sourcebroker/deployer-typo3-database'], ['get' => 'sourcebroker/deployer-typo3-media'], ['get' => 'sourcebroker/deployer-typo3-deploy-ci'], );
Conflict detection
If a loader specifies a 'conflict' configuration that matches another loaded configuration, an exception is thrown with detailed information about the conflict, including which package caused it.
[
'package' => 'sourcebroker/deployer-typo3-deploy',
'conflict' => [
'package' => [
'sourcebroker/deployer-typo3-deploy-ci'
]
]
]
Check if configuration is loaded
You can check if a specific configuration item has already been loaded using the isLoaded() method:
if (\SourceBroker\DeployerLoader\Utility\LoadUtility::isLoaded(['package' => 'sourcebroker/deployer-typo3-deploy'])) { }
Changelog
See CHANGELOG.rst
sourcebroker/deployer-loader 适用场景与选型建议
sourcebroker/deployer-loader 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 334.78k 次下载、GitHub Stars 达 4, 最近一次更新时间为 2017 年 10 月 01 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「deployer」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 sourcebroker/deployer-loader 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 sourcebroker/deployer-loader 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 sourcebroker/deployer-loader 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Deployer.org based deployment for Symfony4 with media and database synchronisation.
blueways deployer recipes
A Highly Opinionated Symfony3/4 Deployer Recipe
Composer based WordPress deployment with deployer.org.
Release check-list for Deployer
3rd party deployer recipes
统计信息
- 总下载量: 334.78k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 23
- 依赖项目数: 12
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-10-01