2017 © Pedro Peláez
 

project php-cli

A PHP cli application template using Symfony's Console Component.

image

michaelbasford/php-cli

A PHP cli application template using Symfony's Console Component.

  • Friday, January 16, 2015
  • by michaelbasford
  • Repository
  • 1 Watchers
  • 12 Stars
  • 21 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

php-cli

A skeleton CLI application template using Symfony's Console component., (*1)

Create a new application

$ composer create-project michaelbasford/php-cli:dev new-project-dir/
$ cd new-project-dir/

Running your application

$ chmod +x bin/application
$ bin/application
php-cli application version 0.0.1

Usage:
 [options] command [arguments]

Options:
 --help (-h)           Display this help message.
 --quiet (-q)          Do not output any message.
 --verbose (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug.
 --version (-V)        Display this application version.
 --ansi                Force ANSI output.
 --no-ansi             Disable ANSI output.
 --no-interaction (-n) Do not ask any interactive question.

Available commands:
 help              Displays help for a command
 list              Lists commands
example
 example:command   An example command.

Example Command, (*2)

$ bin/application example:command
Hello, World!

Remove Example

Remove the following lines from bin/application, (*3)

$application->add(
    new Example\ExampleCommand($container)
);

Then remove the folder $ rm -r src/Example, (*4)

Included Components

The Versions

16/01 2015

dev-master

9999999-dev

A PHP cli application template using Symfony's Console Component.

  Sources   Download

MIT

The Requires

 

by Michael Basford

framework command console cli