skrz / stack
Skrz's Symfony blend
Requires
- monolog/monolog: ~1.11
- skrz/autowiring-bundle: ~1.1
- skrz/bunny-bundle: ~1.1
- skrz/meta: ~1.2
- symfony/config: ~2.7
- symfony/console: ~2.7
- symfony/dependency-injection: ~2.7
- symfony/form: ~2.7
- symfony/framework-bundle: ~2.7
- symfony/http-foundation: ~2.7
- symfony/http-kernel: ~2.7
- symfony/monolog-bundle: ~2.7
- symfony/routing: ~2.7
- symfony/security: ~2.7
- symfony/security-bundle: ~2.7
- symfony/validator: ~2.7
- symfony/yaml: ~2.7
- tracy/tracy: ~2.3
Requires (Dev)
- phpunit/phpunit: ~4.7
This package is not auto-updated.
Last update: 2021-10-30 02:19:12 UTC
README
Minimal @symfony installation with @SkrzCzDev's goodies
Requirements
Skrz\Stack
requires PHP >= 5.4.0
, RabbitMQ is optional, but required for full functionality.
Installation
Via composer's create-project
$ 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.
What's inside
Beside symfony we also included these goodies for your quick start
Skrz/AutowiringBundle
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.
Skrz/BunnyBundle
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.
Skrz/Meta
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.
Nette/Tracy
Debugging tool you will love ♥. Nette framework's own debugging tool that allows you to handle all your troubles effectively.
And more...
Usage
We added example's so that your start is even quicker
HomepageController
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.
HelloWorldCommand
Example of basic command usage. We use commands as occasional console tools. For task example see below
PushToPipelineTask
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
This task calls pushes message via ChangeProducer to your RabbitMQ. Uses @Task
annotation.
ChangeProducer
Shows how to push a message to MQ's exchange. Uses @Producer
annotation`.
BunnyConsumer
Every message needs its consumer. This one only writes out its contents so far. Uses @Consumer
annotation.
Basic MQ example
-
First of all you need to install RabbitMQ. See official instructions here
-
After installation setup the exchange and queue with command
$ php console bunny:setup
-
Run BunnyConsumer (for production manage of consumers you can use Supervisor)
$ php console bunny:consumer bunny
-
To push message to
change
exchange run task PushToPipeline$ php console task:pipeline:push
-
In bunny consumer log you can see that message was received and processed
[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.