bfg/installer
Composer 安装命令:
composer require bfg/installer
包简介
Simplify the installation process for certain packages
README 文档
README
The intent of the functionality is to simplify the installation process for certain packages, it also allows you to bind packages with each other by types for your application or extension.
In a nutshell
All you need is to put this package in dependence and inherit from any of your laravel providers, it can be a package or any provider that you create and inherit from a special abstract provider. You will be able to register your providers, specify their dependencies and sequence, very useful when you need to control the connected parts of the laravel. Also, for comfortable work, there is a mini package manager that is used through the composer to quickly install extensions by filtering them by the specified types, in fact, all dependencies in this installer are based on the types of the composer's package.
Commands
Install
Complete the package installation process.
php artisan install [<package>]
Options: -u, --update Update the package after install -r, --reinstall Reinstall the package after install or update
Packages
Show a list of all existing packages on the system.
php artisan packages
Options:
-p, --path Show path provider of extensions
-c, --child Show child name of extensions
-t, --type Show type of extensions
Reinstall
Reinstall the extension, complete uninstallation and full installation.
php artisan reinstall [<package>]
Uninstall
Remove the extension from the system, for complete removal you need to use the "--force" flag.
php artisan uninstall [<package>]
Options: -f, --force Force uninstall
Update
Update system extension.
php artisan update [<package>]
Options:
-r, --reinstall Reinstall the package after update
Make
Create package extension.
php artisan make [<package>]
Options:
--namespace[=NAMESPACE] The namespace of extension
--description[=DESCRIPTION] The description of extension
--type[=TYPE] The type of extension [default: "bfg-app"]
--ver[=VER] The version of extension [default: "0.0.1"]
The next step
Further, you just need to inherit any of the service providers
from Bfg\Installer\Providers\InstalledProvider and you have the following functions and provider
settings at your disposal:
Properties
| Property name | Property description | Default |
|---|---|---|
| version | The version of extension. | 0.0.1 |
| name | The name of extension. | [provider-class] |
| child | The child type for sub extensions of extension. | null |
| type | The type to determine who owns the extension. | bfg-app |
| description | The description of extension. | null |
| logo | The logo of extension. | null |
Methods
| Method name | Method description |
|---|---|
| installed | Executed when the provider is registered and the extension is installed. |
| run | Executed when the provider run method boot and the extension is installed. |
| installed_parent | Executed when the parent provider is registered and the extension is installed. |
| run_parent | Executed when the parent provider run method boot and the extension is installed. |
| install | Run on install extension. |
| update | Run on update extension. |
| uninstall | Run on uninstall extension. |
| dump | Run on dump extension. |
You can use both the standard "boot" and "register", just do not forget to call the parent methods, otherwise the control will not be able to be fully implemented.
bfg/installer 适用场景与选型建议
bfg/installer 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 688 次下载、GitHub Stars 达 1, 最近一次更新时间为 2021 年 07 月 11 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「doc」 「block」 「laravel」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 bfg/installer 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 bfg/installer 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 bfg/installer 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Block routes by IP
See how Matrix and Neo blocks are being used across your sections.
Prevent crawlers from creating a session
A tool for display docs or api docs to others
This module is designed to provide a special alerts feed block for Howard University
This ConcreteCMS/concrete5 addon installs a block type that when added to a page allows you to redirect visitors to this page to another page that you specify or an external URL.
统计信息
- 总下载量: 688
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 9
- 依赖项目数: 4
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-07-11