https://github.com/ajaxray/php-console
A ready made setup to start a PHP command line application in few minutes
https://github.com/ajaxray/php-console
Last synced: 9 months ago
JSON representation
A ready made setup to start a PHP command line application in few minutes
- Host: GitHub
- URL: https://github.com/ajaxray/php-console
- Owner: ajaxray
- Created: 2014-02-13T12:48:01.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2014-02-13T19:28:09.000Z (almost 12 years ago)
- Last Synced: 2025-02-10T05:42:05.095Z (11 months ago)
- Language: PHP
- Size: 117 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
PHP Console
==================
PHP Console is a ready made setup for starting a PHP command line application with **Symfony Console Component**.
How to start?
----------------
1. Copy `config.yml.dist` as `config.yml`
2. Update vendors using [composer](https://getcomposer.org/doc/00-intro.md). **Your project is ready!**
3. Run `php app.php -list` to see available commands and `php app.php demo:greet` see it in action
4. Copy sample command file `Command/GreetCommand.php` and create your own power commands.
Awesome! It's quick n easy, right?
Some Quick Notes
-------------------
* To use database, set your database information in `config.yml`
* The defaut namespace for commands is PHPConsole\Command. To change *PHPConsole* to *yourCoolApp*,
* make change in Autoload section of composer.json
* run `path/to/composer.phar dump-autoload`
* Change in _use_ of `app.php` and _namespace_ of `Commands/*` files accordingly
Building Blocks
---------------------
* [Symfony Console Component](http://symfony.com/doc/current/components/console/introduction.html) - A component for building command-line application
* [Pimple](https://github.com/fabpot/Pimple) - A tiny Dependency Injection Container (by creator of Symfony2)
* [Symfony YAML Component](http://symfony.com/doc/current/components/yaml/introduction.html) - Handles configs in [YAML](http://en.wikipedia.org/wiki/YAML) files
* [Analog](https://github.com/jbroadway/analog) - Small but powerful log writer for PHP5.3+
* [RedBeanPHP](http://www.redbeanphp.com/) - A tiny Database ORM that works magically!