skrz/stack

This package is abandoned and no longer maintained. No replacement package was suggested.

Skrz's Symfony blend

dev-master 2015-08-27 13:17 UTC

This package is not auto-updated.

Last update: 2021-10-30 02:19:12 UTC


README

Downloads this Month

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

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

  1. First of all you need to install RabbitMQ. See official instructions here

  2. After installation setup the exchange and queue with command

    $ php console bunny:setup
  3. Run BunnyConsumer (for production manage of consumers you can use Supervisor)

    $ php console bunny:consumer bunny
  4. To push message to change exchange run task PushToPipeline

    $ php console task:pipeline:push
  5. 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.