oridoki / koriko

Deploy system
MIT License
4 stars 1 forks source link

Move to Cilex #9

Open kpacha opened 11 years ago

kpacha commented 11 years ago

As they say, Cilex is "a lightweight framework for creating PHP CLI scripts inspired by Silex". I've been reading the code and it's smart, clean and I think it could do the job.

The Cilex app is a Pimple container with other several containers for configuration loaders (YAML, JSON, XML, PHP), Doctrine, Monolog, etc. We could make a simple refactor and encapsulate the command loading logic in a CommandProvider. Also, a TaskHelperProvider could inject the required helper, as mysql, into tasks.

Another 'win' could be the 'compilation' feature. Once the project is close (so all the recipes have been tested and veified), you can compile the code into a single phar and use it with any set of configuration files.

kpacha commented 11 years ago

I'm already playing with this.

the first commit was the easiest one! kpacha/koriko@099dd35b98909e366a2c1aab983d03bc3efa205d

kpacha commented 11 years ago

I think now It really looks nice.

Check out the cilex branch from my repo, you'll see I've created several custom ServiceProviders whose inject the required dependencies.

The app registers this set of service providers and is easy extensible with the YAML config file.

I'll play a little bit with the compile feature. I'm wondering how the custom configuration files will fit with a koriko.phar...