https://github.com/hyperf/composer-plugin
Plugin for Composer
https://github.com/hyperf/composer-plugin
Last synced: 7 months ago
JSON representation
Plugin for Composer
- Host: GitHub
- URL: https://github.com/hyperf/composer-plugin
- Owner: hyperf
- Created: 2021-01-01T03:40:59.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2023-07-18T01:04:01.000Z (over 2 years ago)
- Last Synced: 2025-06-13T11:57:42.095Z (8 months ago)
- Language: PHP
- Size: 15.6 KB
- Stars: 6
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Composer Plugin for Hyperf
## 安装
```
composer require hyperf/composer-plugin
```
## 使用
使用此组件可以方便的对 `files` 自动加载进行排序,比如我们在 `Laravel` 中使用 `hyperf/utils` 组件时,会因为 `Hyperf` 自动加载优于 `Laravel`,导致 `Laravel` 无法正常使用。
故我们可以降低 `hyperf/utils` 组件的加载优先级,然后重新执行 `composer dump-autoload -o` 即可解决这个问题,样例如下:
```json
"extra": {
"hyperf": {
"plugin": {
"sort-autoload": {
"hyperf/utils": -1
}
}
}
},
```