decodelabs/integra
最新稳定版本:v0.3.3
Composer 安装命令:
composer require decodelabs/integra
包简介
Composer file inspector and front-end
README 文档
README
Composer file inspector and front-end
Integra provides inspection tools for your composer.json file and a front end to control composer within your project.
Installation
This package requires PHP 8.4 or higher.
Install via Composer:
composer require decodelabs/integra
Usage
Load a project to work from:
use DecodeLabs\Integra\Project; use DecodeLabs\Monarch; use DecodeLabs\Systemic; $project = new Project('path/to/project/', Monarch::getService(Systemic::class));
If no path is specified, the current working directory will be used. Integra will search back up the file tree for the nearest composer.json.
echo $project->rootDir; // Parent or current dir containing composer.json echo $project->binDir; // Bin dir relative to composer echo $project->composerFile; // Location of composer.json $project->run('update'); // composer update $project->runGlobal('update'); // composer global update $project->runScript('my-script'); // composer run-script my-script $project->runBin('phpstan', '--debug'); // composer exec phpstan -- --debug $project->runGlobalBin('phpstan', '--debug'); // composer global exec phpstan -- --debug if(!$project->hasPackage('package1')) { $project->install('package1', 'package2'); // composer require package1 package2 } $project->installDev('package1', 'package2'); // composer require package1 package2 --dev $project->installGlobal('package1', 'package2'); // composer global require package1 package2 $project->installDevGlobal('package1', 'package2'); // composer global require package1 package2 --dev
Manifest
Access the composer.json manifest:
$manifest = $project->getLocalManifest(); echo $manifest->getDescription(); foreach($manifest->getRequiredPackages() as $package) { echo $package->name; }
See the Manifest.php class for full data access interface - it maps to the majority of the documented composer config options.
Licensing
Integra is licensed under the MIT License. See LICENSE for the full license text.
统计信息
- 总下载量: 16.19k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-11-23