youwe/composer-dependency-installer
最新稳定版本:2.0.0
Composer 安装命令:
composer require youwe/composer-dependency-installer
包简介
Install Composer dependencies.
README 文档
README
PHP package for installing Composer's dependencies upstream.
Usage
To install a package in upstream software requiring this package, instantiate a new instance and call the install() function.
Usage reference
<?php declare(strict_types=1); namespace Acme\Foo; class Bar { public function __construct( private readonly DependencyInstaller $dependencyInstaller ) {} public function installUpstreamRepository(): void { $this->dependencyInstaller->installRepository( name: 'some/package', type: 'composer', url: 'mypackagedomain.dev' ); } public function installUpstreamPackage(): void { $this->dependencyInstaller->installPackage( name: 'some/package', version: '^2.0.0', dev: true, // Whether it should be a dev dependency (e.g. require-dev). Optional, defaults to true updateDependencies: false, // Whether dependencies can be updated. Optional, defaults to true. When enabled, passes -W flag to composer allowOverrideVersion: true // Whether version can be updated with new version when package is altready installed upstream. Optional, defaults to true. ) } }
统计信息
- 总下载量: 164.43k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-03-26