2017 © Pedro Peláez
 

library stack

Skrz's Symfony blend

image

skrz/stack

Skrz's Symfony blend

  • Thursday, August 27, 2015
  • by jakubkulhan
  • Repository
  • 7 Watchers
  • 3 Stars
  • 12 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Skrz\Stack

Downloads this Month, (*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)

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., (*7)

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., (*8)

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., (*9)

Nette/Tracy

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)

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., (*12)

HelloWorldCommand

Example of basic command usage. We use commands as occasional console tools. For task example see below, (*13)

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, (*14)

This task calls pushes message via ChangeProducer to your RabbitMQ. Uses @Task annotation., (*15)

ChangeProducer

Shows how to push a message to MQ's exchange. Uses @Producer annotation`., (*16)

BunnyConsumer

Every message needs its consumer. This one only writes out its contents so far. Uses @Consumer annotation., (*17)

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, (*18)

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

    $ php console bunny:consumer bunny
    
  4. To push message to change exchange run task PushToPipeline, (*20)

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

The Versions