Download the PHP package aura/cli-project without Composer

On this page you can find all versions of the php package aura/cli-project. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package cli-project

Aura.Cli_Project

This package provides a minimal framework for command-line projects.

By "minimal" we mean very minimal. The package provides only a dependency injection container, a configuration system, a dispatcher, a pair of context and standard I/O objects, and a logging instance.

This minimal implementation should not be taken as "restrictive". The DI container, with its two-stage configuration system, allows a wide range of programmatic service definitions. The dispatcher is built with iterative refactoring in mind, so you can start with micro-framework-like closure commands, and work your way up to more complex command objects of your own design.

Foreword

Requirements

This project requires PHP 5.4 or later; we recommend using the latest available version of PHP as a matter of principle.

Unlike Aura library packages, this project package has userland dependencies, which themselves may have other dependencies:

Installation

Install this project via Composer to a {$PROJECT_PATH} of your choosing:

composer create-project aura/cli-project {$PROJECT_PATH}

This will create the project skeleton and install all of the necessary packages.

Tests

Build Status

To run the unit tests at the command line, issue phpunit at the package root. This requires PHPUnit to be available as phpunit.

Alternatively, after you have installed the project, go to the project directory and issue the following command:

cd {$PROJECT_PATH}
php cli/console.php hello

You should see the output Hello World!. Try passing a name after hello to see Hello name!.

PSR Compliance

This projects attempts to comply with PSR-1, PSR-2, and PSR-4. If you notice compliance oversights, please send a patch via pull request.

Community

To ask questions, provide feedback, or otherwise communicate with the Aura community, please join our Google Group, follow @auraphp on Twitter, or chat with us on #auraphp on Freenode.

Services

This package uses services defined by:

This project resets the following services:

Getting Started

Component Packages

This project combines a collection of independent Aura packages into a cohesive whole. The operation of each package is documented separately.

The dependency injection Container is absolutely central to the operation of an Aura project. Please be familiar with the Aura.Di docs before continuing.

You should also familiarize yourself with Aura.Dispatcher, as well as the Aura.Cli Context, Stdio, and Status objects.

Project Configuration

Every Aura project is configured the same way. Please see the shared configuration docs for more information.

Logging

The project automatically logs to {$PROJECT_PATH}/tmp/log/{$mode}.log. If you want to change the logging behaviors for a particular config mode, edit the related config file (e.g., config/Dev.php) file to modify the aura/project-kernel:logger service.

Commands

We configure commands via the project-level config/ class files. If a command needs to be available in every config mode, edit the project-level config/Common.php class file. If it only needs to be available in a specific mode, e.g. dev, then edit the config file for that mode.

Here are two different styles of command definition.

Micro-Framework Style

The following is an example of a command where the logic is embedded in the dispatcher, using the aura/cli-kernel:context and aura/cli-kernel:stdio services along with standard exit codes. (The dispatcher object name doubles as the command name.)

You can now run the command to see its output.

cd {$PROJECT_PATH}
php cli/console.php foo 88

(If you do not pass an ID argument, you will see an error message.)

Full-Stack Style

You can migrate from a micro-controller style to a full-stack style (or start with full-stack style in the first place).

First, define a command class and place it in the project src/ directory.

Next, tell the project how to build the FooCommand through the DI Container. Edit the project config/Common.php file to configure the Container to pass the aura/cli-kernel:context and aura/cli-kernel:stdio service objects to the FooCommand constructor. Then put the App\Command\FooCommand object in the dispatcher under the name foo as a lazy-loaded instantiation.

You can now run the command to see its output.

cd {$PROJECT_PATH}
php cli/console.php foo 88

(If you do not pass an ID argument, you will see an error message.)

Other Variations

These are only some common variations of dispatcher interactions; there are many other combinations.


All versions of cli-project with dependencies

PHP Build Version
Package Version
Requires aura/cli-kernel Version ~2.0
monolog/monolog Version ~1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package aura/cli-project contains the following files

Loading the files please wait ....