frdl/composer-adapter 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

frdl/composer-adapter

最新稳定版本:v0.0.1

Composer 安装命令:

composer require frdl/composer-adapter

包简介

Wrapper/UI for Composer

README 文档

README

...e.g to implement Webfan\InstallerInterface.

composer-ui

ComposerUI for Composer

Note: This is just a try for composer, and should be considered as experimental.

Strategy

Via this issue at Composer, we started with the idea to build a general UI for composer. However, the UI couldn't exist without a helper to create and execute commands.

At the moment we are working on the helper. The goal is that the helper can be used in future without the UI. The UI will be the second part.

Installation

You can install this package via... Yeah... Composer:

composer require frdl/composer-adapter:dev-master

Usage

The following commands are supported for now:

  • composer
  • install
  • archive
  • update
  • require
  • remove
  • run(string $command, array $args = [])

The ComposerHelper Class

You can start using composer by creating an instance of the ComposerUI/ComposerHelper-class:

$composer = new ComposerHelper();

You can configure the working path via:

$composer = new ComposerHelper('/custom/path');

Now you are ready to go!

Options

On every command you can use every option that is available at composer.

Note: Read this to get a list of commands and options: https://getcomposer.org/doc/03-cli.md

Note: Need a specific command? Open up an issue or better a pull request!

Composer

Just initializes composer. Nothing special.

$composer->composer();

Install

The install command reads the composer.json file from the current directory, resolves the dependencies, and installs them into vendor.

$composer->install();

Archive

This command is used to generate a zip/tar archive for your entire project.

$composer->archive();

Note: Composer itself supports to archive specific packages, but this library doesn't support that yet...

Update

In order to get the latest versions of the dependencies and to update the composer.lock file, you should use the update command.

$composer->update();

Require

The require command adds new packages to the composer.json file from the current directory. If no file exists one will be created on the fly.

$composer->requirePackages([
    'vendor/package' => '2.x',
    'vendor/secondpackage' => 'dev-master',
    'vendor/thirthpackage',
]);

Remove

The remove command removes packages from the composer.json file from the current directory.

$composer->removePackages([ 'vendor/package' => '2.x', 'vendor/secondpackage' => 'dev-master', 'vendor/thirthpackage', ]);

Next

We would like to refer you to the composer docs itself: https://getcomposer.org/doc/03-cli.md

If you need help, don't fear to get in touch via gitter: https://gitter.im/bobmulder/composer-ui

[Join the chat at https://gitter.im/bobmulder/composer-ui] (https://gitter.im/bobmulder/composer-ui?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

统计信息

  • 总下载量: 8
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 5
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-10-16