Skrz\Stack
, (*1)
Minimal @symfony installation with @SkrzCzDev's goodies, (*2)
Requirements
Skrz\Stack requires PHP >= 5.4.0, RabbitMQ is optional, but required for full functionality., (*3)
Installation
Via composer's create-project, (*4)
$ composer create-project skrz/stack . dev-master
Why?
At Skrz.cz, we love symfony and are trying to get maximum out of it.
We also created a set of tools that make it even more usable + faster and wanted to share it with world., (*5)
What's inside
Beside symfony we also included these goodies for your quick start, (*6)
No more writing all your classes into services.yml file. Just add annotation and let AutowiringBundle do the rest. For more information visit it's repo., (*7)
Using Message queue in symfony has never been easier! We took ours @jakubkulhan's Bunny and using the AutowiringBundle made it possible to write and configure all your MQ resources with a single annotation., (*8)
If you have to pair your entities across multiple databases with different formats, Skrz/Meta takes care of making all the data available in the exact form you need., (*9)
Debugging tool you will love ♥. Nette framework's own debugging tool that allows you to handle all your troubles effectively., (*10)
And more...
Usage
We added example's so that your start is even quicker, (*11)
Shows how easy it is to autowire a value from your configuration. Also Uses @Controller annotation so that you don't need to specify this class in your services.yml file., (*12)
Example of basic command usage. We use commands as occasional console tools. For task example see below, (*13)
Every task extends AbstractTask Class which enhances it with
- Monolog logger including preset log rotating.
- Alert service that notifies you every time task ends unexpectedly, (*14)
This task calls pushes message via ChangeProducer to your RabbitMQ. Uses @Task annotation., (*15)
Shows how to push a message to MQ's exchange. Uses @Producer annotation`., (*16)
Every message needs its consumer. This one only writes out its contents so far. Uses @Consumer annotation., (*17)
Basic MQ example
- First of all you need to install RabbitMQ. See official instructions here
-
After installation setup the exchange and queue with command, (*18)
$ php console bunny:setup
-
Run BunnyConsumer (for production manage of consumers you can use Supervisor), (*19)
$ php console bunny:consumer bunny
-
To push message to change exchange run task PushToPipeline, (*20)
$ php console task:pipeline:push
-
In bunny consumer log you can see that message was received and processed, (*21)
[2015-07-29 22:54:11] App.DEBUG: Got message 'Hi there!' created at 2015-07-29 22:54:11 via application App on host Skrz.local Acking...
TODO
- [ ] Include Skrz/ORM
- [ ] Include Skrz/TemplatingBundle
- [ ] Tests
- [ ] PHP_CodeSniffer
License
The MIT license. See LICENSE file., (*22)