GithubHelp home page GithubHelp logo

composer-adapter's Introduction

Forked from bobmulder/composer-ui by Webfan

...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)

composer-adapter's People

Contributors

wehowski avatar bobmulder avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.