Download the PHP package renegare/skip without Composer
On this page you can find all versions of the php package renegare/skip. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download renegare/skip
More information about renegare/skip
Files in renegare/skip
Informations about the package skip
Skip README
What is Skip?
Skip is a configuration wrapper around Silex (PHP microframework) and Symfony Console Component.
The idea behind wrapping these two libraries is provide a starting point for new projects that require a simple web app and a cli interface.
The aim/goal however is to 'skip' the manual setup/configuration of these libraries (amazing tools but annoying learning curve) and put all that stuff in a json file somewhere. I hope this will allow developers to focus better on their application development.
Requirements
- PHP 5.4
- composer (preferably latest)
Installation
The recommened way is to use composer to install skip in your project:
Note: you can require your own version of silex, as long as it is greater than the minimalist defined version in composer.json.
Test
Check out the repo and from the top level directory run the following command:
NOTE: You need composer installed on your machine
Web Application Usage
Traditionally to start a Silex application you would do the following:
Now you can do this:
The example above will find all the files in the directories set within and merge them into one huge configuration files and in that order.
Then will go through the configuration and configure your $app.
Browse the code to see what is possible as it really is dead simple ... no huge learning curve. Hopefully it will get you up and running quickly :).
NOTE: Please look through at the test for configuration specifics.
Console Application Usage
Create a file with the following code in-place:
Ensure your file is executable and all should work as expected.
Note: Please look through at the test for configuration specifics.
Configuration Filetype Support
Currently skip only supports *.json files. I see no reason why it could not support .ini, yml or even xml!?
Supported Silex Configuration
Silex Application has various 'features' you can configure to create the application you desire. Skip only currently supports and configures the following (in the respective order):
- Providers
- Settings
- Routes
- Services
- Configuration placeholders
@TODO: Need to add some additional support for traits with skip (currently possible but not elegantly)
Contributions/Pull Requests/Forks are welcome. Enjoy!
Supported Symfony Console Configuration
Console Application has various 'features' you can configure to create the application you desire. Skip only currently supports and configures the following:
- Commands
In addition to this, Skip provides the interface . Implementing this into your commands is recommended so you have access to the DI container (basically the web application) in your commands.
WARNING: Keep your commands as lite/thin as possible. #IMO they should be like controllers where all heavy lifting (business/core logic) are implemented as a services. This keeps the your application code portable/resuable/decoupled/testable. Your commands will also be better understood in 6 months from now ;)
Contributions/Pull Requests/Forks are welcome. Enjoy!
TODOS (That I can think of)
- [ ] Support for other appropriate config file types
- [ ] Simple config level cache mechanism (e.g APC)
- [ ] Documentation with examples (Please see for examples)
All versions of skip with dependencies
symfony/finder Version >=2.3,<2.5-dev
silex/silex Version >=1.0
seld/jsonlint Version 1.1.2
symfony/console Version >=v2.4.1,<2.5-dev
symfony/yaml Version ~2.0