├── .gitignore ├── README.md ├── rabbitmq-sample ├── .gitignore ├── app │ ├── .htaccess │ ├── AppCache.php │ ├── AppKernel.php │ ├── Resources │ │ └── views │ │ │ └── base.html.twig │ ├── SymfonyRequirements.php │ ├── autoload.php │ ├── cache │ │ └── .gitkeep │ ├── check.php │ ├── config │ │ ├── config.yml │ │ ├── config_dev.yml │ │ ├── config_prod.yml │ │ ├── config_test.yml │ │ ├── parameters.yml.dist │ │ ├── routing.yml │ │ ├── routing_dev.yml │ │ └── security.yml │ ├── console │ ├── logs │ │ └── .gitkeep │ └── phpunit.xml.dist ├── composer.json ├── composer.lock ├── doc │ ├── images │ │ └── principle.png │ └── symfony │ │ ├── LICENSE │ │ ├── README.md │ │ ├── UPGRADE-2.2.md │ │ ├── UPGRADE-2.3.md │ │ ├── UPGRADE-2.4.md │ │ └── UPGRADE.md ├── src │ ├── .htaccess │ └── RabbitMQ │ │ └── SampleBundle │ │ ├── Command │ │ └── TestCommand.php │ │ ├── Consumer │ │ └── SampleConsumer.php │ │ ├── DependencyInjection │ │ ├── Configuration.php │ │ └── RabbitMQSampleExtension.php │ │ ├── Producer │ │ └── DelayedProducer.php │ │ ├── RabbitMQSampleBundle.php │ │ └── Resources │ │ └── config │ │ └── services.yml └── web │ ├── .htaccess │ ├── app.php │ ├── app_dev.php │ ├── apple-touch-icon.png │ ├── config.php │ ├── favicon.ico │ └── robots.txt └── vagrant ├── Vagrantfile └── vhost.conf /.gitignore: -------------------------------------------------------------------------------- 1 | /vagrant/.vagrant/ 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Symfony RabbitMQ Delayed Messaging Sample 2 | 3 | Sample Symfony project showing how to achieve delayed processing of messages in RabbitMQ using `videlalvaro/php-amqplib` and `oldsound/rabbitmq-bundle`. 4 | 5 | The delay is achieved using temporary, consumer-less queues created on-the-fly with a message TTL and a Dead-Letter Exchange. 6 | 7 | ## Installation 8 | 9 | First, clone the repository: 10 | 11 | ```bash 12 | git clone https://github.com/oscherler/rabbitmq-delayed-sample.git 13 | ``` 14 | 15 | Then continue to [Using Vagrant](#using-vagrant) if you are a Vagrant user, or [Without Vagrant](#without-vagrant) otherwise. 16 | 17 | ### Using Vagrant 18 | 19 | The project includes a Vagrant file to set up a virtual machine with Apache, PHP, Composer and RabbitMQ installed. Explaining Vagrant is beyond the scope of this document, but here are some basics: 20 | 21 | After [installing Vagrant][install_vagrant], change to the `vagrant` directory and type `vagrant up`: 22 | 23 | ```bash 24 | cd rabbitmq-delayed-sample/vagrant 25 | vagrant up 26 | ``` 27 | 28 | Vagrant will create the virtual machine and provision it (which is fancy lingo for “install the stuff that’s required, and then some”). It can take a few minutes and display a lot of green and red gibberish. That’s normal. 29 | 30 | Then connect to the machine and change to the project directory, if not already in it: 31 | 32 | ```bash 33 | vagrant ssh 34 | cd /vagrant/rabbitmq-sample 35 | ``` 36 | 37 | and continue to [Set-Up](#set-up). 38 | 39 | [install_vagrant]: https://docs.vagrantup.com/v2/getting-started/index.html 40 | 41 | ### Without Vagrant 42 | 43 | Make sure you have PHP, Composer and RabbitMQ installed, then change to the project directory: 44 | 45 | ```bash 46 | cd rabbitmq-delayed-sample/rabbitmq-sample 47 | ``` 48 | 49 | and continue to [Set-Up](#set-up). 50 | 51 | ## Set-Up 52 | 53 | Install the project dependencies using Composer: 54 | 55 | ```bash 56 | composer install 57 | ``` 58 | 59 | It will ask for the value of some parameters. If you are using the provided Vagrant machine, just keep the default values by hitting *Enter* until it stops asking. If you are working in your own environment, fill in the `rabbitmq_*` parameters with the values required to connect to your RabbitMQ server, and keep the default values for the remaining parameters. 60 | 61 | ## Principle 62 | 63 | This project uses `videlalvaro/php-amqplib` and `oldsound/rabbitmq-bundle` to configure and communicate with RabbitMQ. Everything is configured under `old_sound_rabbit_mq` in `app/config/config.yml`, and a sample consumer that prints messages to the console is provided in `src/RabbitMQ/SampleBundle/Consumer/SampleConsumer.php`. 64 | 65 | The configuration is as follows: 66 | 67 | ```yaml 68 | # app/config/config.yml 69 | old_sound_rabbit_mq: 70 | connections: 71 | default: 72 | host: %rabbitmq_host% 73 | port: %rabbitmq_port% 74 | user: %rabbitmq_user% 75 | password: %rabbitmq_password% 76 | vhost: %rabbitmq_vhost% 77 | lazy: false 78 | 79 | consumers: 80 | # The `work-exchange` exchange will receive the messages after they have been delayed. 81 | # This is a sample set-up. Any configuration would do, the only important thing is to 82 | # configure the `delayed_producer` service with the name of the exchange declared here. 83 | # 84 | # In this example, messages published to the `work-exchange` exchange with an empty 85 | # routing key (i.e. expired messages from the delay queue created by the `DelayedProducer`) 86 | # will be routed to the `working-queue` queue and will be consumed by this consumer. 87 | work_consumer: 88 | connection: default 89 | # Declare exchange `work-exchange`. 90 | exchange_options: { name: 'work-exchange', type: direct } 91 | queue_options: 92 | # Declare queue `working-queue`. 93 | name: 'working-queue' 94 | # Messages are processed by the `sample_consumer` service. 95 | callback: sample_consumer 96 | ``` 97 | 98 | Messages to be delayed should be published using the `delayed_producer` service with a delay in milliseconds and an empty routing key: 99 | 100 | ```php 101 | $container->get('delayed_producer')->delayedPublish( 5000, $messageBody, '' ); 102 | ``` 103 | 104 | The service takes three constructor arguments: 105 | 106 | ```yaml 107 | # src/RabbitMQ/SampleBundle/Resources/config/services.yml 108 | services: 109 | # ... 110 | delayed_producer: 111 | class: RabbitMQ\SampleBundle\Producer\DelayedProducer 112 | arguments: 113 | - @old_sound_rabbit_mq.connection.default # rabbitmq connection 114 | - work-exchange # destination exchange name 115 | - delay # delay exchange and queue prefix 116 | ``` 117 | 118 | - an AMPQ connection; 119 | - the name of the destination exchange; 120 | - a prefix used to name the delay exchange and the queues, to avoid naming collisions. 121 | 122 | ![Principle](rabbitmq-sample/doc/images/principle.png) 123 | 124 | The `DelayedProducer` creates an exchange called `$prefix-exchange`. Then, when it receives a message, it creates a temporary queue called `'$prefix-waiting-queue-$routing_key-$delay`, with the following properties: 125 | 126 | - `routing_keys`: same as the queue name 127 | - `arguments`: 128 | - `x-message-ttl`: the delay given in `delayedPublish`, in milliseconds 129 | - `x-dead-letter-exchange`: the exchanged configured for the `delayed_producer` service 130 | - `x-dead-letter-routing-key` the routing key given in `delayedPublish` 131 | - `x-expires`: an expiration time slightly longer than the delay (1.1 * delay + 1 second) 132 | 133 | Since no consumer is bound to the temporary queue, messages are never processed. The queue, however, is configured with an `x-message-ttl` argument corresponding to the desired delay. Therefore, messages expire after this delay and are discarded. 134 | 135 | Furthermore, the queue has a *dead-letter exchange* configured, through the `x-dead-letter-exchange` and `x-dead-letter-routing-key` arguments. It means that expired messages, instead of being discarded, are *dead-lettered*: they are re-published to the exchange given by `x-dead-letter-exchange`, which is the exchange that we configured to actually handle the messages. Dead-lettered messages are re-published with the routing key configured by `x-dead-letter-routing-key`, which is the one given when publishing to the `DelayedProducer`. 136 | 137 | In our sampe configuration, the *dead-letter exchange* is `work-exchange`. Messages published with an empty routing key will be routed to `working-queue` and our sample consumer, which consumes from it, will therefore receive the messages after the delay given when publishing them. 138 | 139 | The consumer is declared as service: 140 | 141 | ```yaml 142 | # src/RabbitMQ/SampleBundle/Resources/config/services.yml 143 | services: 144 | sample_consumer: 145 | class: RabbitMQ\SampleBundle\Consumer\SampleConsumer 146 | arguments: [] 147 | ``` 148 | 149 | and implements `OldSound\RabbitMqBundle\RabbitMq\ConsumerInterface`: 150 | 151 | ```php 152 | # src/RabbitMQ/SampleBundle/Consumer/SampleConsumer.php 153 | namespace RabbitMQ\SampleBundle\Consumer; 154 | 155 | use OldSound\RabbitMqBundle\RabbitMq\ConsumerInterface; 156 | use PhpAmqpLib\Message\AMQPMessage; 157 | 158 | class SampleConsumer implements ConsumerInterface 159 | { 160 | public function execute( AMQPMessage $msg ) 161 | { 162 | # ... 163 | } 164 | } 165 | ``` 166 | 167 | ## Usage 168 | 169 | Start the consumer: 170 | 171 | ```bash 172 | app/console rabbitmq:consumer work_consumer 173 | ``` 174 | 175 | Leave it running and continue in a second terminal. If you want to stop it, type `Control-$`. 176 | 177 | Publish a message using the `sample:test` command: 178 | 179 | ```bash 180 | app/console sample:test --delay 5000 181 | ``` 182 | 183 | and watch it (in the first terminal) being consumed after (roughly) 5 seconds: 184 | 185 | ```bash 186 | Sent 4974 ms ago with delay 5000. 187 | ``` 188 | 189 | The messages published by the `sample:test` command contain the current time and the requested delay, so that the sample consumer can calculate the actual delay and display it. 190 | 191 | Experiment with various delays, and watch the temporary queues being created and automatically deleted in the RabbitMQ management interface. 192 | 193 | You can also change the configuration of the `work_consumer`, for example by adding a routing key to the queue (don’t forget to restart the consumer for the change to take effect): 194 | 195 | ```yaml 196 | # app/config/config.yml 197 | # ... 198 | work_consumer: 199 | # ... 200 | queue_options: 201 | # Declare queue `working-queue`. 202 | name: 'working-queue' 203 | routing_keys: [ a_key ] 204 | ``` 205 | 206 | and try: 207 | 208 | ```bash 209 | app/console sample:test --delay 5000 210 | app/console sample:test --delay 5000 --routing-key a_key 211 | app/console sample:test --delay 5000 --routing-key another_key 212 | ``` 213 | 214 | ## Questions and Answers 215 | 216 | **Q: Why create a different queue for each delay? Why not use a single queue and per-message TTL?** 217 | 218 | **A:** When specifying TTL on a per-message basis using the `expiration` field upon publishing, messages will only be dead-lettered [once they reach the end of the queue][caveats]. It means that if we published message A with a delay of 10 seconds and then message B with a delay of 5 seconds, then message B would sit in the queue behind message A for 10 seconds before it would reach the end of the queue and be dead-lettered. It would therefore be processed too late. Of course, it’s only a problem when you use TTL as a delay mechanism using dead-lettering. When you just want old messages to be discarded, it’s perfectly fine the way it is. 219 | 220 | [caveats]: https://www.rabbitmq.com/ttl.html#per-message-ttl-caveats 221 | 222 | **Q: Why the weird queue names?** 223 | 224 | **A:** Since the delay is configured at the queue level, we need one queue per delay value. The same goes for the routing key. Thus, we need a new queue for each (delay, routing key) pair. If you try to re-declare a queue with an existing name but different parameters, you will get an error. We could just create a new queue with a unique name for each message, but it’s not needed since re-declaring a queue with the same name and properties as an existing queue reuses the existing one. 225 | 226 | **Q: What is this `x-expires` value on the delay queues?** 227 | 228 | **A:** As we are creating a new queue for each new value of the delay or the routing key, depending on the use case (e.g. if you calculate the delay for the message to be processed at a given time), we might end up with many delay queues that won’t be reused. Thus, we make them expire after they’re not used for some time, using the `x-expires` argument. This value should not be shorter than or equal to `x-message-ttl`, otherwise the queue might be deleted before the message is dead-lettered (see [Queue TTL][queue-ttl]), so I chose a TTL that’s a bit longer than the delay. 229 | 230 | [queue-ttl]: https://www.rabbitmq.com/ttl.html#queue-ttl 231 | 232 | ## Disclaimer 233 | 234 | I am not (yet) a RabbitMQ expert, so if you feel that I did something wrong, you’re probably right. Don’t hesitate to point it out in an issue. Thank you. 235 | 236 | ## Credits 237 | 238 | * [Grégoire Pineau][lyrixx] and [Olivier Dolbeau][odolbeau] for their presentation about RabbitMQ in Symfony at Symfony Live Paris 2014; 239 | 240 | * [Alvaro Videla][old_sound] for `php-amqplib` and `rabbitmq-bundle`; 241 | 242 | * [Udo Telaar][Telaar] and [Baptiste Clavié][talus_] for the motivation ([1][mot-1], [2][mot-2]). 243 | 244 | [lyrixx]: https://twitter.com/lyrixx 245 | [odolbeau]: https://twitter.com/odolbeau 246 | [old_sound]: https://twitter.com/old_sound 247 | [Telaar]: https://twitter.com/Telaar 248 | [talus_]: https://twitter.com/talus_ 249 | [mot-1]: https://twitter.com/Telaar/status/535796218589614080 250 | [mot-2]: https://twitter.com/talus_/status/536821657374318592 251 | -------------------------------------------------------------------------------- /rabbitmq-sample/.gitignore: -------------------------------------------------------------------------------- 1 | /web/bundles/ 2 | /app/bootstrap.php.cache 3 | /app/cache/* 4 | /app/config/parameters.yml 5 | /app/logs/* 6 | !app/cache/.gitkeep 7 | !app/logs/.gitkeep 8 | /build/ 9 | /vendor/ 10 | /bin/ 11 | /composer.phar 12 | -------------------------------------------------------------------------------- /rabbitmq-sample/app/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | Require all denied 3 | 4 | 5 | Order deny,allow 6 | Deny from all 7 | 8 | -------------------------------------------------------------------------------- /rabbitmq-sample/app/AppCache.php: -------------------------------------------------------------------------------- 1 | getEnvironment(), array('dev', 'test'))) { 26 | $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle(); 27 | $bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle(); 28 | $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle(); 29 | } 30 | 31 | return $bundles; 32 | } 33 | 34 | public function registerContainerConfiguration(LoaderInterface $loader) 35 | { 36 | $loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml'); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /rabbitmq-sample/app/Resources/views/base.html.twig: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {% block title %}Welcome!{% endblock %} 6 | {% block stylesheets %}{% endblock %} 7 | 8 | 9 | 10 | {% block body %}{% endblock %} 11 | {% block javascripts %}{% endblock %} 12 | 13 | 14 | -------------------------------------------------------------------------------- /rabbitmq-sample/app/SymfonyRequirements.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | /* 13 | * Users of PHP 5.2 should be able to run the requirements checks. 14 | * This is why the file and all classes must be compatible with PHP 5.2+ 15 | * (e.g. not using namespaces and closures). 16 | * 17 | * ************** CAUTION ************** 18 | * 19 | * DO NOT EDIT THIS FILE as it will be overridden by Composer as part of 20 | * the installation/update process. The original file resides in the 21 | * SensioDistributionBundle. 22 | * 23 | * ************** CAUTION ************** 24 | */ 25 | 26 | /** 27 | * Represents a single PHP requirement, e.g. an installed extension. 28 | * It can be a mandatory requirement or an optional recommendation. 29 | * There is a special subclass, named PhpIniRequirement, to check a php.ini configuration. 30 | * 31 | * @author Tobias Schultze 32 | */ 33 | class Requirement 34 | { 35 | private $fulfilled; 36 | private $testMessage; 37 | private $helpText; 38 | private $helpHtml; 39 | private $optional; 40 | 41 | /** 42 | * Constructor that initializes the requirement. 43 | * 44 | * @param bool $fulfilled Whether the requirement is fulfilled 45 | * @param string $testMessage The message for testing the requirement 46 | * @param string $helpHtml The help text formatted in HTML for resolving the problem 47 | * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags) 48 | * @param bool $optional Whether this is only an optional recommendation not a mandatory requirement 49 | */ 50 | public function __construct($fulfilled, $testMessage, $helpHtml, $helpText = null, $optional = false) 51 | { 52 | $this->fulfilled = (bool) $fulfilled; 53 | $this->testMessage = (string) $testMessage; 54 | $this->helpHtml = (string) $helpHtml; 55 | $this->helpText = null === $helpText ? strip_tags($this->helpHtml) : (string) $helpText; 56 | $this->optional = (bool) $optional; 57 | } 58 | 59 | /** 60 | * Returns whether the requirement is fulfilled. 61 | * 62 | * @return bool true if fulfilled, otherwise false 63 | */ 64 | public function isFulfilled() 65 | { 66 | return $this->fulfilled; 67 | } 68 | 69 | /** 70 | * Returns the message for testing the requirement. 71 | * 72 | * @return string The test message 73 | */ 74 | public function getTestMessage() 75 | { 76 | return $this->testMessage; 77 | } 78 | 79 | /** 80 | * Returns the help text for resolving the problem 81 | * 82 | * @return string The help text 83 | */ 84 | public function getHelpText() 85 | { 86 | return $this->helpText; 87 | } 88 | 89 | /** 90 | * Returns the help text formatted in HTML. 91 | * 92 | * @return string The HTML help 93 | */ 94 | public function getHelpHtml() 95 | { 96 | return $this->helpHtml; 97 | } 98 | 99 | /** 100 | * Returns whether this is only an optional recommendation and not a mandatory requirement. 101 | * 102 | * @return bool true if optional, false if mandatory 103 | */ 104 | public function isOptional() 105 | { 106 | return $this->optional; 107 | } 108 | } 109 | 110 | /** 111 | * Represents a PHP requirement in form of a php.ini configuration. 112 | * 113 | * @author Tobias Schultze 114 | */ 115 | class PhpIniRequirement extends Requirement 116 | { 117 | /** 118 | * Constructor that initializes the requirement. 119 | * 120 | * @param string $cfgName The configuration name used for ini_get() 121 | * @param bool|callback $evaluation Either a boolean indicating whether the configuration should evaluate to true or false, 122 | or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement 123 | * @param bool $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false. 124 | This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin. 125 | Example: You require a config to be true but PHP later removes this config and defaults it to true internally. 126 | * @param string|null $testMessage The message for testing the requirement (when null and $evaluation is a boolean a default message is derived) 127 | * @param string|null $helpHtml The help text formatted in HTML for resolving the problem (when null and $evaluation is a boolean a default help is derived) 128 | * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags) 129 | * @param bool $optional Whether this is only an optional recommendation not a mandatory requirement 130 | */ 131 | public function __construct($cfgName, $evaluation, $approveCfgAbsence = false, $testMessage = null, $helpHtml = null, $helpText = null, $optional = false) 132 | { 133 | $cfgValue = ini_get($cfgName); 134 | 135 | if (is_callable($evaluation)) { 136 | if (null === $testMessage || null === $helpHtml) { 137 | throw new InvalidArgumentException('You must provide the parameters testMessage and helpHtml for a callback evaluation.'); 138 | } 139 | 140 | $fulfilled = call_user_func($evaluation, $cfgValue); 141 | } else { 142 | if (null === $testMessage) { 143 | $testMessage = sprintf('%s %s be %s in php.ini', 144 | $cfgName, 145 | $optional ? 'should' : 'must', 146 | $evaluation ? 'enabled' : 'disabled' 147 | ); 148 | } 149 | 150 | if (null === $helpHtml) { 151 | $helpHtml = sprintf('Set %s to %s in php.ini*.', 152 | $cfgName, 153 | $evaluation ? 'on' : 'off' 154 | ); 155 | } 156 | 157 | $fulfilled = $evaluation == $cfgValue; 158 | } 159 | 160 | parent::__construct($fulfilled || ($approveCfgAbsence && false === $cfgValue), $testMessage, $helpHtml, $helpText, $optional); 161 | } 162 | } 163 | 164 | /** 165 | * A RequirementCollection represents a set of Requirement instances. 166 | * 167 | * @author Tobias Schultze 168 | */ 169 | class RequirementCollection implements IteratorAggregate 170 | { 171 | private $requirements = array(); 172 | 173 | /** 174 | * Gets the current RequirementCollection as an Iterator. 175 | * 176 | * @return Traversable A Traversable interface 177 | */ 178 | public function getIterator() 179 | { 180 | return new ArrayIterator($this->requirements); 181 | } 182 | 183 | /** 184 | * Adds a Requirement. 185 | * 186 | * @param Requirement $requirement A Requirement instance 187 | */ 188 | public function add(Requirement $requirement) 189 | { 190 | $this->requirements[] = $requirement; 191 | } 192 | 193 | /** 194 | * Adds a mandatory requirement. 195 | * 196 | * @param bool $fulfilled Whether the requirement is fulfilled 197 | * @param string $testMessage The message for testing the requirement 198 | * @param string $helpHtml The help text formatted in HTML for resolving the problem 199 | * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags) 200 | */ 201 | public function addRequirement($fulfilled, $testMessage, $helpHtml, $helpText = null) 202 | { 203 | $this->add(new Requirement($fulfilled, $testMessage, $helpHtml, $helpText, false)); 204 | } 205 | 206 | /** 207 | * Adds an optional recommendation. 208 | * 209 | * @param bool $fulfilled Whether the recommendation is fulfilled 210 | * @param string $testMessage The message for testing the recommendation 211 | * @param string $helpHtml The help text formatted in HTML for resolving the problem 212 | * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags) 213 | */ 214 | public function addRecommendation($fulfilled, $testMessage, $helpHtml, $helpText = null) 215 | { 216 | $this->add(new Requirement($fulfilled, $testMessage, $helpHtml, $helpText, true)); 217 | } 218 | 219 | /** 220 | * Adds a mandatory requirement in form of a php.ini configuration. 221 | * 222 | * @param string $cfgName The configuration name used for ini_get() 223 | * @param bool|callback $evaluation Either a boolean indicating whether the configuration should evaluate to true or false, 224 | or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement 225 | * @param bool $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false. 226 | This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin. 227 | Example: You require a config to be true but PHP later removes this config and defaults it to true internally. 228 | * @param string $testMessage The message for testing the requirement (when null and $evaluation is a boolean a default message is derived) 229 | * @param string $helpHtml The help text formatted in HTML for resolving the problem (when null and $evaluation is a boolean a default help is derived) 230 | * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags) 231 | */ 232 | public function addPhpIniRequirement($cfgName, $evaluation, $approveCfgAbsence = false, $testMessage = null, $helpHtml = null, $helpText = null) 233 | { 234 | $this->add(new PhpIniRequirement($cfgName, $evaluation, $approveCfgAbsence, $testMessage, $helpHtml, $helpText, false)); 235 | } 236 | 237 | /** 238 | * Adds an optional recommendation in form of a php.ini configuration. 239 | * 240 | * @param string $cfgName The configuration name used for ini_get() 241 | * @param bool|callback $evaluation Either a boolean indicating whether the configuration should evaluate to true or false, 242 | or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement 243 | * @param bool $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false. 244 | This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin. 245 | Example: You require a config to be true but PHP later removes this config and defaults it to true internally. 246 | * @param string $testMessage The message for testing the requirement (when null and $evaluation is a boolean a default message is derived) 247 | * @param string $helpHtml The help text formatted in HTML for resolving the problem (when null and $evaluation is a boolean a default help is derived) 248 | * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags) 249 | */ 250 | public function addPhpIniRecommendation($cfgName, $evaluation, $approveCfgAbsence = false, $testMessage = null, $helpHtml = null, $helpText = null) 251 | { 252 | $this->add(new PhpIniRequirement($cfgName, $evaluation, $approveCfgAbsence, $testMessage, $helpHtml, $helpText, true)); 253 | } 254 | 255 | /** 256 | * Adds a requirement collection to the current set of requirements. 257 | * 258 | * @param RequirementCollection $collection A RequirementCollection instance 259 | */ 260 | public function addCollection(RequirementCollection $collection) 261 | { 262 | $this->requirements = array_merge($this->requirements, $collection->all()); 263 | } 264 | 265 | /** 266 | * Returns both requirements and recommendations. 267 | * 268 | * @return array Array of Requirement instances 269 | */ 270 | public function all() 271 | { 272 | return $this->requirements; 273 | } 274 | 275 | /** 276 | * Returns all mandatory requirements. 277 | * 278 | * @return array Array of Requirement instances 279 | */ 280 | public function getRequirements() 281 | { 282 | $array = array(); 283 | foreach ($this->requirements as $req) { 284 | if (!$req->isOptional()) { 285 | $array[] = $req; 286 | } 287 | } 288 | 289 | return $array; 290 | } 291 | 292 | /** 293 | * Returns the mandatory requirements that were not met. 294 | * 295 | * @return array Array of Requirement instances 296 | */ 297 | public function getFailedRequirements() 298 | { 299 | $array = array(); 300 | foreach ($this->requirements as $req) { 301 | if (!$req->isFulfilled() && !$req->isOptional()) { 302 | $array[] = $req; 303 | } 304 | } 305 | 306 | return $array; 307 | } 308 | 309 | /** 310 | * Returns all optional recommendations. 311 | * 312 | * @return array Array of Requirement instances 313 | */ 314 | public function getRecommendations() 315 | { 316 | $array = array(); 317 | foreach ($this->requirements as $req) { 318 | if ($req->isOptional()) { 319 | $array[] = $req; 320 | } 321 | } 322 | 323 | return $array; 324 | } 325 | 326 | /** 327 | * Returns the recommendations that were not met. 328 | * 329 | * @return array Array of Requirement instances 330 | */ 331 | public function getFailedRecommendations() 332 | { 333 | $array = array(); 334 | foreach ($this->requirements as $req) { 335 | if (!$req->isFulfilled() && $req->isOptional()) { 336 | $array[] = $req; 337 | } 338 | } 339 | 340 | return $array; 341 | } 342 | 343 | /** 344 | * Returns whether a php.ini configuration is not correct. 345 | * 346 | * @return bool php.ini configuration problem? 347 | */ 348 | public function hasPhpIniConfigIssue() 349 | { 350 | foreach ($this->requirements as $req) { 351 | if (!$req->isFulfilled() && $req instanceof PhpIniRequirement) { 352 | return true; 353 | } 354 | } 355 | 356 | return false; 357 | } 358 | 359 | /** 360 | * Returns the PHP configuration file (php.ini) path. 361 | * 362 | * @return string|false php.ini file path 363 | */ 364 | public function getPhpIniConfigPath() 365 | { 366 | return get_cfg_var('cfg_file_path'); 367 | } 368 | } 369 | 370 | /** 371 | * This class specifies all requirements and optional recommendations that 372 | * are necessary to run the Symfony Standard Edition. 373 | * 374 | * @author Tobias Schultze 375 | * @author Fabien Potencier 376 | */ 377 | class SymfonyRequirements extends RequirementCollection 378 | { 379 | const REQUIRED_PHP_VERSION = '5.3.3'; 380 | 381 | /** 382 | * Constructor that initializes the requirements. 383 | */ 384 | public function __construct() 385 | { 386 | /* mandatory requirements follow */ 387 | 388 | $installedPhpVersion = phpversion(); 389 | 390 | $this->addRequirement( 391 | version_compare($installedPhpVersion, self::REQUIRED_PHP_VERSION, '>='), 392 | sprintf('PHP version must be at least %s (%s installed)', self::REQUIRED_PHP_VERSION, $installedPhpVersion), 393 | sprintf('You are running PHP version "%s", but Symfony needs at least PHP "%s" to run. 394 | Before using Symfony, upgrade your PHP installation, preferably to the latest version.', 395 | $installedPhpVersion, self::REQUIRED_PHP_VERSION), 396 | sprintf('Install PHP %s or newer (installed version is %s)', self::REQUIRED_PHP_VERSION, $installedPhpVersion) 397 | ); 398 | 399 | $this->addRequirement( 400 | version_compare($installedPhpVersion, '5.3.16', '!='), 401 | 'PHP version must not be 5.3.16 as Symfony won\'t work properly with it', 402 | 'Install PHP 5.3.17 or newer (or downgrade to an earlier PHP version)' 403 | ); 404 | 405 | $this->addRequirement( 406 | is_dir(__DIR__.'/../vendor/composer'), 407 | 'Vendor libraries must be installed', 408 | 'Vendor libraries are missing. Install composer following instructions from http://getcomposer.org/. '. 409 | 'Then run "php composer.phar install" to install them.' 410 | ); 411 | 412 | $cacheDir = is_dir(__DIR__.'/../var/cache') ? __DIR__.'/../var/cache' : __DIR__.'/cache'; 413 | 414 | $this->addRequirement( 415 | is_writable($cacheDir), 416 | 'app/cache/ or var/cache/ directory must be writable', 417 | 'Change the permissions of either "app/cache/" or "var/cache/" directory so that the web server can write into it.' 418 | ); 419 | 420 | $logsDir = is_dir(__DIR__.'/../var/logs') ? __DIR__.'/../var/logs' : __DIR__.'/logs'; 421 | 422 | $this->addRequirement( 423 | is_writable($logsDir), 424 | 'app/logs/ or var/logs/ directory must be writable', 425 | 'Change the permissions of either "app/logs/" or "var/logs/" directory so that the web server can write into it.' 426 | ); 427 | 428 | $this->addPhpIniRequirement( 429 | 'date.timezone', true, false, 430 | 'date.timezone setting must be set', 431 | 'Set the "date.timezone" setting in php.ini* (like Europe/Paris).' 432 | ); 433 | 434 | if (version_compare($installedPhpVersion, self::REQUIRED_PHP_VERSION, '>=')) { 435 | $timezones = array(); 436 | foreach (DateTimeZone::listAbbreviations() as $abbreviations) { 437 | foreach ($abbreviations as $abbreviation) { 438 | $timezones[$abbreviation['timezone_id']] = true; 439 | } 440 | } 441 | 442 | $this->addRequirement( 443 | isset($timezones[@date_default_timezone_get()]), 444 | sprintf('Configured default timezone "%s" must be supported by your installation of PHP', @date_default_timezone_get()), 445 | 'Your default timezone is not supported by PHP. Check for typos in your php.ini file and have a look at the list of deprecated timezones at http://php.net/manual/en/timezones.others.php.' 446 | ); 447 | } 448 | 449 | $this->addRequirement( 450 | function_exists('json_encode'), 451 | 'json_encode() must be available', 452 | 'Install and enable the JSON extension.' 453 | ); 454 | 455 | $this->addRequirement( 456 | function_exists('session_start'), 457 | 'session_start() must be available', 458 | 'Install and enable the session extension.' 459 | ); 460 | 461 | $this->addRequirement( 462 | function_exists('ctype_alpha'), 463 | 'ctype_alpha() must be available', 464 | 'Install and enable the ctype extension.' 465 | ); 466 | 467 | $this->addRequirement( 468 | function_exists('token_get_all'), 469 | 'token_get_all() must be available', 470 | 'Install and enable the Tokenizer extension.' 471 | ); 472 | 473 | $this->addRequirement( 474 | function_exists('simplexml_import_dom'), 475 | 'simplexml_import_dom() must be available', 476 | 'Install and enable the SimpleXML extension.' 477 | ); 478 | 479 | if (function_exists('apc_store') && ini_get('apc.enabled')) { 480 | if (version_compare($installedPhpVersion, '5.4.0', '>=')) { 481 | $this->addRequirement( 482 | version_compare(phpversion('apc'), '3.1.13', '>='), 483 | 'APC version must be at least 3.1.13 when using PHP 5.4', 484 | 'Upgrade your APC extension (3.1.13+).' 485 | ); 486 | } else { 487 | $this->addRequirement( 488 | version_compare(phpversion('apc'), '3.0.17', '>='), 489 | 'APC version must be at least 3.0.17', 490 | 'Upgrade your APC extension (3.0.17+).' 491 | ); 492 | } 493 | } 494 | 495 | $this->addPhpIniRequirement('detect_unicode', false); 496 | 497 | if (extension_loaded('suhosin')) { 498 | $this->addPhpIniRequirement( 499 | 'suhosin.executor.include.whitelist', 500 | create_function('$cfgValue', 'return false !== stripos($cfgValue, "phar");'), 501 | false, 502 | 'suhosin.executor.include.whitelist must be configured correctly in php.ini', 503 | 'Add "phar" to suhosin.executor.include.whitelist in php.ini*.' 504 | ); 505 | } 506 | 507 | if (extension_loaded('xdebug')) { 508 | $this->addPhpIniRequirement( 509 | 'xdebug.show_exception_trace', false, true 510 | ); 511 | 512 | $this->addPhpIniRequirement( 513 | 'xdebug.scream', false, true 514 | ); 515 | 516 | $this->addPhpIniRecommendation( 517 | 'xdebug.max_nesting_level', 518 | create_function('$cfgValue', 'return $cfgValue > 100;'), 519 | true, 520 | 'xdebug.max_nesting_level should be above 100 in php.ini', 521 | 'Set "xdebug.max_nesting_level" to e.g. "250" in php.ini* to stop Xdebug\'s infinite recursion protection erroneously throwing a fatal error in your project.' 522 | ); 523 | } 524 | 525 | $pcreVersion = defined('PCRE_VERSION') ? (float) PCRE_VERSION : null; 526 | 527 | $this->addRequirement( 528 | null !== $pcreVersion, 529 | 'PCRE extension must be available', 530 | 'Install the PCRE extension (version 8.0+).' 531 | ); 532 | 533 | if (extension_loaded('mbstring')) { 534 | $this->addPhpIniRequirement( 535 | 'mbstring.func_overload', 536 | create_function('$cfgValue', 'return (int) $cfgValue === 0;'), 537 | true, 538 | 'string functions should not be overloaded', 539 | 'Set "mbstring.func_overload" to 0 in php.ini* to disable function overloading by the mbstring extension.' 540 | ); 541 | } 542 | 543 | /* optional recommendations follow */ 544 | 545 | $this->addRecommendation( 546 | file_get_contents(__FILE__) === file_get_contents(__DIR__.'/../vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Resources/skeleton/app/SymfonyRequirements.php'), 547 | 'Requirements file should be up-to-date', 548 | 'Your requirements file is outdated. Run composer install and re-check your configuration.' 549 | ); 550 | 551 | $this->addRecommendation( 552 | version_compare($installedPhpVersion, '5.3.4', '>='), 553 | 'You should use at least PHP 5.3.4 due to PHP bug #52083 in earlier versions', 554 | 'Your project might malfunction randomly due to PHP bug #52083 ("Notice: Trying to get property of non-object"). Install PHP 5.3.4 or newer.' 555 | ); 556 | 557 | $this->addRecommendation( 558 | version_compare($installedPhpVersion, '5.3.8', '>='), 559 | 'When using annotations you should have at least PHP 5.3.8 due to PHP bug #55156', 560 | 'Install PHP 5.3.8 or newer if your project uses annotations.' 561 | ); 562 | 563 | $this->addRecommendation( 564 | version_compare($installedPhpVersion, '5.4.0', '!='), 565 | 'You should not use PHP 5.4.0 due to the PHP bug #61453', 566 | 'Your project might not work properly due to the PHP bug #61453 ("Cannot dump definitions which have method calls"). Install PHP 5.4.1 or newer.' 567 | ); 568 | 569 | $this->addRecommendation( 570 | version_compare($installedPhpVersion, '5.4.11', '>='), 571 | 'When using the logout handler from the Symfony Security Component, you should have at least PHP 5.4.11 due to PHP bug #63379 (as a workaround, you can also set invalidate_session to false in the security logout handler configuration)', 572 | 'Install PHP 5.4.11 or newer if your project uses the logout handler from the Symfony Security Component.' 573 | ); 574 | 575 | $this->addRecommendation( 576 | (version_compare($installedPhpVersion, '5.3.18', '>=') && version_compare($installedPhpVersion, '5.4.0', '<')) 577 | || 578 | version_compare($installedPhpVersion, '5.4.8', '>='), 579 | 'You should use PHP 5.3.18+ or PHP 5.4.8+ to always get nice error messages for fatal errors in the development environment due to PHP bug #61767/#60909', 580 | 'Install PHP 5.3.18+ or PHP 5.4.8+ if you want nice error messages for all fatal errors in the development environment.' 581 | ); 582 | 583 | if (null !== $pcreVersion) { 584 | $this->addRecommendation( 585 | $pcreVersion >= 8.0, 586 | sprintf('PCRE extension should be at least version 8.0 (%s installed)', $pcreVersion), 587 | 'PCRE 8.0+ is preconfigured in PHP since 5.3.2 but you are using an outdated version of it. Symfony probably works anyway but it is recommended to upgrade your PCRE extension.' 588 | ); 589 | } 590 | 591 | $this->addRecommendation( 592 | class_exists('DomDocument'), 593 | 'PHP-XML module should be installed', 594 | 'Install and enable the PHP-XML module.' 595 | ); 596 | 597 | $this->addRecommendation( 598 | function_exists('mb_strlen'), 599 | 'mb_strlen() should be available', 600 | 'Install and enable the mbstring extension.' 601 | ); 602 | 603 | $this->addRecommendation( 604 | function_exists('iconv'), 605 | 'iconv() should be available', 606 | 'Install and enable the iconv extension.' 607 | ); 608 | 609 | $this->addRecommendation( 610 | function_exists('utf8_decode'), 611 | 'utf8_decode() should be available', 612 | 'Install and enable the XML extension.' 613 | ); 614 | 615 | $this->addRecommendation( 616 | function_exists('filter_var'), 617 | 'filter_var() should be available', 618 | 'Install and enable the filter extension.' 619 | ); 620 | 621 | if (!defined('PHP_WINDOWS_VERSION_BUILD')) { 622 | $this->addRecommendation( 623 | function_exists('posix_isatty'), 624 | 'posix_isatty() should be available', 625 | 'Install and enable the php_posix extension (used to colorize the CLI output).' 626 | ); 627 | } 628 | 629 | $this->addRecommendation( 630 | class_exists('Locale'), 631 | 'intl extension should be available', 632 | 'Install and enable the intl extension (used for validators).' 633 | ); 634 | 635 | if (class_exists('Collator')) { 636 | $this->addRecommendation( 637 | null !== new Collator('fr_FR'), 638 | 'intl extension should be correctly configured', 639 | 'The intl extension does not behave properly. This problem is typical on PHP 5.3.X x64 WIN builds.' 640 | ); 641 | } 642 | 643 | if (class_exists('Locale')) { 644 | if (defined('INTL_ICU_VERSION')) { 645 | $version = INTL_ICU_VERSION; 646 | } else { 647 | $reflector = new ReflectionExtension('intl'); 648 | 649 | ob_start(); 650 | $reflector->info(); 651 | $output = strip_tags(ob_get_clean()); 652 | 653 | preg_match('/^ICU version +(?:=> )?(.*)$/m', $output, $matches); 654 | $version = $matches[1]; 655 | } 656 | 657 | $this->addRecommendation( 658 | version_compare($version, '4.0', '>='), 659 | 'intl ICU version should be at least 4+', 660 | 'Upgrade your intl extension with a newer ICU version (4+).' 661 | ); 662 | } 663 | 664 | $accelerator = 665 | (extension_loaded('eaccelerator') && ini_get('eaccelerator.enable')) 666 | || 667 | (extension_loaded('apc') && ini_get('apc.enabled')) 668 | || 669 | (extension_loaded('Zend Optimizer+') && ini_get('zend_optimizerplus.enable')) 670 | || 671 | (extension_loaded('Zend OPcache') && ini_get('opcache.enable')) 672 | || 673 | (extension_loaded('xcache') && ini_get('xcache.cacher')) 674 | || 675 | (extension_loaded('wincache') && ini_get('wincache.ocenabled')) 676 | ; 677 | 678 | $this->addRecommendation( 679 | $accelerator, 680 | 'a PHP accelerator should be installed', 681 | 'Install and/or enable a PHP accelerator (highly recommended).' 682 | ); 683 | 684 | if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { 685 | $this->addPhpIniRecommendation( 686 | 'realpath_cache_size', 687 | create_function('$cfgValue', 'return (int) $cfgValue > 1000;'), 688 | false, 689 | 'realpath_cache_size should be above 1024 in php.ini', 690 | 'Set "realpath_cache_size" to e.g. "1024" in php.ini* to improve performance on windows.' 691 | ); 692 | } 693 | 694 | $this->addPhpIniRecommendation('short_open_tag', false); 695 | 696 | $this->addPhpIniRecommendation('magic_quotes_gpc', false, true); 697 | 698 | $this->addPhpIniRecommendation('register_globals', false, true); 699 | 700 | $this->addPhpIniRecommendation('session.auto_start', false); 701 | 702 | $this->addRecommendation( 703 | class_exists('PDO'), 704 | 'PDO should be installed', 705 | 'Install PDO (mandatory for Doctrine).' 706 | ); 707 | 708 | if (class_exists('PDO')) { 709 | $drivers = PDO::getAvailableDrivers(); 710 | $this->addRecommendation( 711 | count($drivers) > 0, 712 | sprintf('PDO should have some drivers installed (currently available: %s)', count($drivers) ? implode(', ', $drivers) : 'none'), 713 | 'Install PDO drivers (mandatory for Doctrine).' 714 | ); 715 | } 716 | } 717 | } 718 | -------------------------------------------------------------------------------- /rabbitmq-sample/app/autoload.php: -------------------------------------------------------------------------------- 1 | getPhpIniConfigPath(); 8 | 9 | echo_title('Symfony2 Requirements Checker'); 10 | 11 | echo '> PHP is using the following php.ini file:'.PHP_EOL; 12 | if ($iniPath) { 13 | echo_style('green', ' '.$iniPath); 14 | } else { 15 | echo_style('warning', ' WARNING: No configuration file (php.ini) used by PHP!'); 16 | } 17 | 18 | echo PHP_EOL.PHP_EOL; 19 | 20 | echo '> Checking Symfony requirements:'.PHP_EOL.' '; 21 | 22 | $messages = array(); 23 | foreach ($symfonyRequirements->getRequirements() as $req) { 24 | /** @var $req Requirement */ 25 | if ($helpText = get_error_message($req, $lineSize)) { 26 | echo_style('red', 'E'); 27 | $messages['error'][] = $helpText; 28 | } else { 29 | echo_style('green', '.'); 30 | } 31 | } 32 | 33 | $checkPassed = empty($messages['error']); 34 | 35 | foreach ($symfonyRequirements->getRecommendations() as $req) { 36 | if ($helpText = get_error_message($req, $lineSize)) { 37 | echo_style('yellow', 'W'); 38 | $messages['warning'][] = $helpText; 39 | } else { 40 | echo_style('green', '.'); 41 | } 42 | } 43 | 44 | if ($checkPassed) { 45 | echo_block('success', 'OK', 'Your system is ready to run Symfony2 projects', true); 46 | } else { 47 | echo_block('error', 'ERROR', 'Your system is not ready to run Symfony2 projects', true); 48 | 49 | echo_title('Fix the following mandatory requirements', 'red'); 50 | 51 | foreach ($messages['error'] as $helpText) { 52 | echo ' * '.$helpText.PHP_EOL; 53 | } 54 | } 55 | 56 | if (!empty($messages['warning'])) { 57 | echo_title('Optional recommendations to improve your setup', 'yellow'); 58 | 59 | foreach ($messages['warning'] as $helpText) { 60 | echo ' * '.$helpText.PHP_EOL; 61 | } 62 | } 63 | 64 | echo PHP_EOL; 65 | echo_style('title', 'Note'); 66 | echo ' The command console could use a different php.ini file'.PHP_EOL; 67 | echo_style('title', '~~~~'); 68 | echo ' than the one used with your web server. To be on the'.PHP_EOL; 69 | echo ' safe side, please check the requirements from your web'.PHP_EOL; 70 | echo ' server using the '; 71 | echo_style('yellow', 'web/config.php'); 72 | echo ' script.'.PHP_EOL; 73 | echo PHP_EOL; 74 | 75 | exit($checkPassed ? 0 : 1); 76 | 77 | function get_error_message(Requirement $requirement, $lineSize) 78 | { 79 | if ($requirement->isFulfilled()) { 80 | return; 81 | } 82 | 83 | $errorMessage = wordwrap($requirement->getTestMessage(), $lineSize - 3, PHP_EOL.' ').PHP_EOL; 84 | $errorMessage .= ' > '.wordwrap($requirement->getHelpText(), $lineSize - 5, PHP_EOL.' > ').PHP_EOL; 85 | 86 | return $errorMessage; 87 | } 88 | 89 | function echo_title($title, $style = null) 90 | { 91 | $style = $style ?: 'title'; 92 | 93 | echo PHP_EOL; 94 | echo_style($style, $title.PHP_EOL); 95 | echo_style($style, str_repeat('~', strlen($title)).PHP_EOL); 96 | echo PHP_EOL; 97 | } 98 | 99 | function echo_style($style, $message) 100 | { 101 | // ANSI color codes 102 | $styles = array( 103 | 'reset' => "\033[0m", 104 | 'red' => "\033[31m", 105 | 'green' => "\033[32m", 106 | 'yellow' => "\033[33m", 107 | 'error' => "\033[37;41m", 108 | 'success' => "\033[37;42m", 109 | 'title' => "\033[34m", 110 | ); 111 | $supports = has_color_support(); 112 | 113 | echo($supports ? $styles[$style] : '').$message.($supports ? $styles['reset'] : ''); 114 | } 115 | 116 | function echo_block($style, $title, $message) 117 | { 118 | $message = ' '.trim($message).' '; 119 | $width = strlen($message); 120 | 121 | echo PHP_EOL.PHP_EOL; 122 | 123 | echo_style($style, str_repeat(' ', $width).PHP_EOL); 124 | echo_style($style, str_pad(' ['.$title.']', $width, ' ', STR_PAD_RIGHT).PHP_EOL); 125 | echo_style($style, str_pad($message, $width, ' ', STR_PAD_RIGHT).PHP_EOL); 126 | echo_style($style, str_repeat(' ', $width).PHP_EOL); 127 | } 128 | 129 | function has_color_support() 130 | { 131 | static $support; 132 | 133 | if (null === $support) { 134 | if (DIRECTORY_SEPARATOR == '\\') { 135 | $support = false !== getenv('ANSICON') || 'ON' === getenv('ConEmuANSI'); 136 | } else { 137 | $support = function_exists('posix_isatty') && @posix_isatty(STDOUT); 138 | } 139 | } 140 | 141 | return $support; 142 | } 143 | -------------------------------------------------------------------------------- /rabbitmq-sample/app/config/config.yml: -------------------------------------------------------------------------------- 1 | imports: 2 | - { resource: parameters.yml } 3 | - { resource: security.yml } 4 | 5 | framework: 6 | #esi: ~ 7 | #translator: { fallback: "%locale%" } 8 | secret: "%secret%" 9 | router: 10 | resource: "%kernel.root_dir%/config/routing.yml" 11 | strict_requirements: ~ 12 | form: ~ 13 | csrf_protection: ~ 14 | validation: { enable_annotations: true } 15 | templating: 16 | engines: ['twig'] 17 | #assets_version: SomeVersionScheme 18 | default_locale: "%locale%" 19 | trusted_hosts: ~ 20 | trusted_proxies: ~ 21 | session: 22 | # handler_id set to null will use default session handler from php.ini 23 | handler_id: ~ 24 | fragments: ~ 25 | http_method_override: true 26 | 27 | # Twig Configuration 28 | twig: 29 | debug: "%kernel.debug%" 30 | strict_variables: "%kernel.debug%" 31 | 32 | # Assetic Configuration 33 | assetic: 34 | debug: "%kernel.debug%" 35 | use_controller: false 36 | bundles: [ ] 37 | #java: /usr/bin/java 38 | filters: 39 | cssrewrite: ~ 40 | #closure: 41 | # jar: "%kernel.root_dir%/Resources/java/compiler.jar" 42 | #yui_css: 43 | # jar: "%kernel.root_dir%/Resources/java/yuicompressor-2.4.7.jar" 44 | 45 | # Doctrine Configuration 46 | doctrine: 47 | dbal: 48 | driver: "%database_driver%" 49 | host: "%database_host%" 50 | port: "%database_port%" 51 | dbname: "%database_name%" 52 | user: "%database_user%" 53 | password: "%database_password%" 54 | charset: UTF8 55 | # if using pdo_sqlite as your database driver: 56 | # 1. add the path in parameters.yml 57 | # e.g. database_path: "%kernel.root_dir%/data/data.db3" 58 | # 2. Uncomment database_path in parameters.yml.dist 59 | # 3. Uncomment next line: 60 | # path: "%database_path%" 61 | 62 | orm: 63 | auto_generate_proxy_classes: "%kernel.debug%" 64 | auto_mapping: true 65 | 66 | # Swiftmailer Configuration 67 | swiftmailer: 68 | transport: "%mailer_transport%" 69 | host: "%mailer_host%" 70 | username: "%mailer_user%" 71 | password: "%mailer_password%" 72 | spool: { type: memory } 73 | 74 | old_sound_rabbit_mq: 75 | connections: 76 | default: 77 | host: %rabbitmq_host% 78 | port: %rabbitmq_port% 79 | user: %rabbitmq_user% 80 | password: %rabbitmq_password% 81 | vhost: %rabbitmq_vhost% 82 | lazy: false 83 | 84 | consumers: 85 | # The `work-exchange` exchange will receive the messages after they have been delayed. 86 | # This is a sample set-up. Any configuration would do, the only important thing is to 87 | # configure the `delayed_producer` service with the name of the exchange declared here. 88 | # 89 | # In this example, messages published to the `work-exchange` exchange with an empty 90 | # routing key (i.e. expired messages from the delay queue created by the `DelayedProducer`) 91 | # will be routed to the `working-queue` queue and will be consumed by this consumer. 92 | work_consumer: 93 | connection: default 94 | # Declare exchange `work-exchange`. 95 | exchange_options: { name: 'work-exchange', type: direct } 96 | queue_options: 97 | # Declare queue `working-queue`. 98 | name: 'working-queue' 99 | # Messages are processed by the `sample_consumer` service. 100 | callback: sample_consumer 101 | -------------------------------------------------------------------------------- /rabbitmq-sample/app/config/config_dev.yml: -------------------------------------------------------------------------------- 1 | imports: 2 | - { resource: config.yml } 3 | 4 | framework: 5 | router: 6 | resource: "%kernel.root_dir%/config/routing_dev.yml" 7 | strict_requirements: true 8 | profiler: { only_exceptions: false } 9 | 10 | web_profiler: 11 | toolbar: "%debug_toolbar%" 12 | intercept_redirects: "%debug_redirects%" 13 | 14 | monolog: 15 | handlers: 16 | main: 17 | type: stream 18 | path: "%kernel.logs_dir%/%kernel.environment%.log" 19 | level: debug 20 | console: 21 | type: console 22 | bubble: false 23 | # uncomment to get logging in your browser 24 | # you may have to allow bigger header sizes in your Web server configuration 25 | #firephp: 26 | # type: firephp 27 | # level: info 28 | #chromephp: 29 | # type: chromephp 30 | # level: info 31 | 32 | assetic: 33 | use_controller: "%use_assetic_controller%" 34 | 35 | #swiftmailer: 36 | # delivery_address: me@example.com 37 | -------------------------------------------------------------------------------- /rabbitmq-sample/app/config/config_prod.yml: -------------------------------------------------------------------------------- 1 | imports: 2 | - { resource: config.yml } 3 | 4 | #framework: 5 | # validation: 6 | # cache: apc 7 | 8 | #doctrine: 9 | # orm: 10 | # metadata_cache_driver: apc 11 | # result_cache_driver: apc 12 | # query_cache_driver: apc 13 | 14 | monolog: 15 | handlers: 16 | main: 17 | type: fingers_crossed 18 | action_level: error 19 | handler: nested 20 | nested: 21 | type: stream 22 | path: "%kernel.logs_dir%/%kernel.environment%.log" 23 | level: debug 24 | console: 25 | type: console 26 | -------------------------------------------------------------------------------- /rabbitmq-sample/app/config/config_test.yml: -------------------------------------------------------------------------------- 1 | imports: 2 | - { resource: config_dev.yml } 3 | 4 | framework: 5 | test: ~ 6 | session: 7 | storage_id: session.storage.mock_file 8 | profiler: 9 | collect: false 10 | 11 | web_profiler: 12 | toolbar: false 13 | intercept_redirects: false 14 | 15 | swiftmailer: 16 | disable_delivery: true 17 | -------------------------------------------------------------------------------- /rabbitmq-sample/app/config/parameters.yml.dist: -------------------------------------------------------------------------------- 1 | # This file is a "template" of what your parameters.yml file should look like 2 | parameters: 3 | rabbitmq_host: localhost 4 | rabbitmq_port: 5672 5 | rabbitmq_user: guest 6 | rabbitmq_password: guest 7 | rabbitmq_vhost: / 8 | 9 | database_driver: pdo_mysql 10 | database_host: 127.0.0.1 11 | database_port: ~ 12 | database_name: symfony 13 | database_user: root 14 | database_password: ~ 15 | # You should uncomment this if you want use pdo_sqlite 16 | # database_path: "%kernel.root_dir%/data.db3" 17 | 18 | mailer_transport: smtp 19 | mailer_host: 127.0.0.1 20 | mailer_user: ~ 21 | mailer_password: ~ 22 | 23 | locale: en 24 | 25 | # A secret key that's used to generate certain security-related tokens 26 | secret: ThisTokenIsNotSoSecretChangeIt 27 | 28 | debug_toolbar: true 29 | debug_redirects: false 30 | use_assetic_controller: true 31 | -------------------------------------------------------------------------------- /rabbitmq-sample/app/config/routing.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oscherler/rabbitmq-delayed-sample/8f47c52d8091b925a3bc8bc3bd5c505b1362ee3e/rabbitmq-sample/app/config/routing.yml -------------------------------------------------------------------------------- /rabbitmq-sample/app/config/routing_dev.yml: -------------------------------------------------------------------------------- 1 | _wdt: 2 | resource: "@WebProfilerBundle/Resources/config/routing/wdt.xml" 3 | prefix: /_wdt 4 | 5 | _profiler: 6 | resource: "@WebProfilerBundle/Resources/config/routing/profiler.xml" 7 | prefix: /_profiler 8 | 9 | _configurator: 10 | resource: "@SensioDistributionBundle/Resources/config/routing/webconfigurator.xml" 11 | prefix: /_configurator 12 | 13 | _main: 14 | resource: routing.yml 15 | -------------------------------------------------------------------------------- /rabbitmq-sample/app/config/security.yml: -------------------------------------------------------------------------------- 1 | security: 2 | providers: 3 | in_memory: 4 | memory: ~ 5 | 6 | firewalls: 7 | dev: 8 | pattern: ^/(_(profiler|wdt)|css|images|js)/ 9 | security: false 10 | 11 | default: 12 | anonymous: ~ 13 | -------------------------------------------------------------------------------- /rabbitmq-sample/app/console: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | getParameterOption(array('--env', '-e'), getenv('SYMFONY_ENV') ?: 'dev'); 19 | $debug = getenv('SYMFONY_DEBUG') !== '0' && !$input->hasParameterOption(array('--no-debug', '')) && $env !== 'prod'; 20 | 21 | if ($debug) { 22 | Debug::enable(); 23 | } 24 | 25 | $kernel = new AppKernel($env, $debug); 26 | $application = new Application($kernel); 27 | $application->run($input); 28 | -------------------------------------------------------------------------------- /rabbitmq-sample/app/logs/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oscherler/rabbitmq-delayed-sample/8f47c52d8091b925a3bc8bc3bd5c505b1362ee3e/rabbitmq-sample/app/logs/.gitkeep -------------------------------------------------------------------------------- /rabbitmq-sample/app/phpunit.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | ../src/*/*Bundle/Tests 13 | ../src/*/Bundle/*Bundle/Tests 14 | 15 | 16 | 17 | 22 | 23 | 24 | 25 | ../src 26 | 27 | ../src/*/*Bundle/Resources 28 | ../src/*/*Bundle/Tests 29 | ../src/*/Bundle/*Bundle/Resources 30 | ../src/*/Bundle/*Bundle/Tests 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /rabbitmq-sample/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "symfony/framework-standard-edition", 3 | "license": "MIT", 4 | "type": "project", 5 | "description": "The \"Symfony Standard Edition\" distribution", 6 | "autoload": { 7 | "psr-0": { "": "src/", "SymfonyStandard": "app/" } 8 | }, 9 | "require": { 10 | "php": ">=5.3.3", 11 | "symfony/symfony": "2.5.*", 12 | "doctrine/orm": "~2.2,>=2.2.3", 13 | "doctrine/doctrine-bundle": "~1.2", 14 | "twig/extensions": "~1.0", 15 | "symfony/assetic-bundle": "~2.3", 16 | "symfony/swiftmailer-bundle": "~2.3", 17 | "symfony/monolog-bundle": "~2.4", 18 | "sensio/distribution-bundle": "~3.0", 19 | "sensio/framework-extra-bundle": "~3.0", 20 | "incenteev/composer-parameter-handler": "~2.0", 21 | "videlalvaro/php-amqplib": "~2.4", 22 | "oldsound/rabbitmq-bundle": "~1.5" 23 | }, 24 | "require-dev": { 25 | "sensio/generator-bundle": "~2.3" 26 | }, 27 | "scripts": { 28 | "post-root-package-install": [ 29 | "SymfonyStandard\\Composer::hookRootPackageInstall" 30 | ], 31 | "post-install-cmd": [ 32 | "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters", 33 | "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", 34 | "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", 35 | "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", 36 | "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile", 37 | "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::removeSymfonyStandardFiles" 38 | ], 39 | "post-update-cmd": [ 40 | "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters", 41 | "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", 42 | "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", 43 | "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", 44 | "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile", 45 | "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::removeSymfonyStandardFiles" 46 | ] 47 | }, 48 | "config": { 49 | "bin-dir": "bin" 50 | }, 51 | "extra": { 52 | "symfony-app-dir": "app", 53 | "symfony-web-dir": "web", 54 | "incenteev-parameters": { 55 | "file": "app/config/parameters.yml" 56 | }, 57 | "branch-alias": { 58 | "dev-master": "2.5-dev" 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /rabbitmq-sample/composer.lock: -------------------------------------------------------------------------------- 1 | { 2 | "_readme": [ 3 | "This file locks the dependencies of your project to a known state", 4 | "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", 5 | "This file is @generated automatically" 6 | ], 7 | "hash": "9bfe01429e1d467a194c6466abff34fc", 8 | "packages": [ 9 | { 10 | "name": "doctrine/annotations", 11 | "version": "v1.2.1", 12 | "source": { 13 | "type": "git", 14 | "url": "https://github.com/doctrine/annotations.git", 15 | "reference": "6a6bec0670bb6e71a263b08bc1b98ea242928633" 16 | }, 17 | "dist": { 18 | "type": "zip", 19 | "url": "https://api.github.com/repos/doctrine/annotations/zipball/6a6bec0670bb6e71a263b08bc1b98ea242928633", 20 | "reference": "6a6bec0670bb6e71a263b08bc1b98ea242928633", 21 | "shasum": "" 22 | }, 23 | "require": { 24 | "doctrine/lexer": "1.*", 25 | "php": ">=5.3.2" 26 | }, 27 | "require-dev": { 28 | "doctrine/cache": "1.*", 29 | "phpunit/phpunit": "4.*" 30 | }, 31 | "type": "library", 32 | "extra": { 33 | "branch-alias": { 34 | "dev-master": "1.3.x-dev" 35 | } 36 | }, 37 | "autoload": { 38 | "psr-0": { 39 | "Doctrine\\Common\\Annotations\\": "lib/" 40 | } 41 | }, 42 | "notification-url": "https://packagist.org/downloads/", 43 | "license": [ 44 | "MIT" 45 | ], 46 | "authors": [ 47 | { 48 | "name": "Roman Borschel", 49 | "email": "roman@code-factory.org" 50 | }, 51 | { 52 | "name": "Benjamin Eberlei", 53 | "email": "kontakt@beberlei.de" 54 | }, 55 | { 56 | "name": "Guilherme Blanco", 57 | "email": "guilhermeblanco@gmail.com" 58 | }, 59 | { 60 | "name": "Jonathan Wage", 61 | "email": "jonwage@gmail.com" 62 | }, 63 | { 64 | "name": "Johannes Schmitt", 65 | "email": "schmittjoh@gmail.com" 66 | } 67 | ], 68 | "description": "Docblock Annotations Parser", 69 | "homepage": "http://www.doctrine-project.org", 70 | "keywords": [ 71 | "annotations", 72 | "docblock", 73 | "parser" 74 | ], 75 | "time": "2014-09-25 16:45:30" 76 | }, 77 | { 78 | "name": "doctrine/cache", 79 | "version": "v1.3.1", 80 | "source": { 81 | "type": "git", 82 | "url": "https://github.com/doctrine/cache.git", 83 | "reference": "cf483685798a72c93bf4206e3dd6358ea07d64e7" 84 | }, 85 | "dist": { 86 | "type": "zip", 87 | "url": "https://api.github.com/repos/doctrine/cache/zipball/cf483685798a72c93bf4206e3dd6358ea07d64e7", 88 | "reference": "cf483685798a72c93bf4206e3dd6358ea07d64e7", 89 | "shasum": "" 90 | }, 91 | "require": { 92 | "php": ">=5.3.2" 93 | }, 94 | "conflict": { 95 | "doctrine/common": ">2.2,<2.4" 96 | }, 97 | "require-dev": { 98 | "phpunit/phpunit": ">=3.7", 99 | "satooshi/php-coveralls": "~0.6" 100 | }, 101 | "type": "library", 102 | "extra": { 103 | "branch-alias": { 104 | "dev-master": "1.4.x-dev" 105 | } 106 | }, 107 | "autoload": { 108 | "psr-0": { 109 | "Doctrine\\Common\\Cache\\": "lib/" 110 | } 111 | }, 112 | "notification-url": "https://packagist.org/downloads/", 113 | "license": [ 114 | "MIT" 115 | ], 116 | "authors": [ 117 | { 118 | "name": "Roman Borschel", 119 | "email": "roman@code-factory.org" 120 | }, 121 | { 122 | "name": "Benjamin Eberlei", 123 | "email": "kontakt@beberlei.de" 124 | }, 125 | { 126 | "name": "Guilherme Blanco", 127 | "email": "guilhermeblanco@gmail.com" 128 | }, 129 | { 130 | "name": "Jonathan Wage", 131 | "email": "jonwage@gmail.com" 132 | }, 133 | { 134 | "name": "Johannes Schmitt", 135 | "email": "schmittjoh@gmail.com" 136 | } 137 | ], 138 | "description": "Caching library offering an object-oriented API for many cache backends", 139 | "homepage": "http://www.doctrine-project.org", 140 | "keywords": [ 141 | "cache", 142 | "caching" 143 | ], 144 | "time": "2014-09-17 14:24:04" 145 | }, 146 | { 147 | "name": "doctrine/collections", 148 | "version": "v1.2", 149 | "source": { 150 | "type": "git", 151 | "url": "https://github.com/doctrine/collections.git", 152 | "reference": "b99c5c46c87126201899afe88ec490a25eedd6a2" 153 | }, 154 | "dist": { 155 | "type": "zip", 156 | "url": "https://api.github.com/repos/doctrine/collections/zipball/b99c5c46c87126201899afe88ec490a25eedd6a2", 157 | "reference": "b99c5c46c87126201899afe88ec490a25eedd6a2", 158 | "shasum": "" 159 | }, 160 | "require": { 161 | "php": ">=5.3.2" 162 | }, 163 | "type": "library", 164 | "extra": { 165 | "branch-alias": { 166 | "dev-master": "1.2.x-dev" 167 | } 168 | }, 169 | "autoload": { 170 | "psr-0": { 171 | "Doctrine\\Common\\Collections\\": "lib/" 172 | } 173 | }, 174 | "notification-url": "https://packagist.org/downloads/", 175 | "license": [ 176 | "MIT" 177 | ], 178 | "authors": [ 179 | { 180 | "name": "Jonathan Wage", 181 | "email": "jonwage@gmail.com", 182 | "homepage": "http://www.jwage.com/", 183 | "role": "Creator" 184 | }, 185 | { 186 | "name": "Guilherme Blanco", 187 | "email": "guilhermeblanco@gmail.com", 188 | "homepage": "http://www.instaclick.com" 189 | }, 190 | { 191 | "name": "Roman Borschel", 192 | "email": "roman@code-factory.org" 193 | }, 194 | { 195 | "name": "Benjamin Eberlei", 196 | "email": "kontakt@beberlei.de" 197 | }, 198 | { 199 | "name": "Johannes Schmitt", 200 | "email": "schmittjoh@gmail.com", 201 | "homepage": "https://github.com/schmittjoh", 202 | "role": "Developer of wrapped JMSSerializerBundle" 203 | } 204 | ], 205 | "description": "Collections Abstraction library", 206 | "homepage": "http://www.doctrine-project.org", 207 | "keywords": [ 208 | "array", 209 | "collections", 210 | "iterator" 211 | ], 212 | "time": "2014-02-03 23:07:43" 213 | }, 214 | { 215 | "name": "doctrine/common", 216 | "version": "v2.4.2", 217 | "source": { 218 | "type": "git", 219 | "url": "https://github.com/doctrine/common.git", 220 | "reference": "5db6ab40e4c531f14dad4ca96a394dfce5d4255b" 221 | }, 222 | "dist": { 223 | "type": "zip", 224 | "url": "https://api.github.com/repos/doctrine/common/zipball/5db6ab40e4c531f14dad4ca96a394dfce5d4255b", 225 | "reference": "5db6ab40e4c531f14dad4ca96a394dfce5d4255b", 226 | "shasum": "" 227 | }, 228 | "require": { 229 | "doctrine/annotations": "1.*", 230 | "doctrine/cache": "1.*", 231 | "doctrine/collections": "1.*", 232 | "doctrine/inflector": "1.*", 233 | "doctrine/lexer": "1.*", 234 | "php": ">=5.3.2" 235 | }, 236 | "require-dev": { 237 | "phpunit/phpunit": "~3.7" 238 | }, 239 | "type": "library", 240 | "extra": { 241 | "branch-alias": { 242 | "dev-master": "2.4.x-dev" 243 | } 244 | }, 245 | "autoload": { 246 | "psr-0": { 247 | "Doctrine\\Common\\": "lib/" 248 | } 249 | }, 250 | "notification-url": "https://packagist.org/downloads/", 251 | "license": [ 252 | "MIT" 253 | ], 254 | "authors": [ 255 | { 256 | "name": "Jonathan Wage", 257 | "email": "jonwage@gmail.com", 258 | "homepage": "http://www.jwage.com/", 259 | "role": "Creator" 260 | }, 261 | { 262 | "name": "Guilherme Blanco", 263 | "email": "guilhermeblanco@gmail.com", 264 | "homepage": "http://www.instaclick.com" 265 | }, 266 | { 267 | "name": "Roman Borschel", 268 | "email": "roman@code-factory.org" 269 | }, 270 | { 271 | "name": "Benjamin Eberlei", 272 | "email": "kontakt@beberlei.de" 273 | }, 274 | { 275 | "name": "Johannes Schmitt", 276 | "email": "schmittjoh@gmail.com", 277 | "homepage": "https://github.com/schmittjoh", 278 | "role": "Developer of wrapped JMSSerializerBundle" 279 | } 280 | ], 281 | "description": "Common Library for Doctrine projects", 282 | "homepage": "http://www.doctrine-project.org", 283 | "keywords": [ 284 | "annotations", 285 | "collections", 286 | "eventmanager", 287 | "persistence", 288 | "spl" 289 | ], 290 | "time": "2014-05-21 19:28:51" 291 | }, 292 | { 293 | "name": "doctrine/dbal", 294 | "version": "v2.4.3", 295 | "source": { 296 | "type": "git", 297 | "url": "https://github.com/doctrine/dbal.git", 298 | "reference": "0368bc031976126e5d36d37d2c56155092b6575b" 299 | }, 300 | "dist": { 301 | "type": "zip", 302 | "url": "https://api.github.com/repos/doctrine/dbal/zipball/0368bc031976126e5d36d37d2c56155092b6575b", 303 | "reference": "0368bc031976126e5d36d37d2c56155092b6575b", 304 | "shasum": "" 305 | }, 306 | "require": { 307 | "doctrine/common": "~2.4", 308 | "php": ">=5.3.2" 309 | }, 310 | "require-dev": { 311 | "phpunit/phpunit": "3.7.*", 312 | "symfony/console": "~2.0" 313 | }, 314 | "suggest": { 315 | "symfony/console": "For helpful console commands such as SQL execution and import of files." 316 | }, 317 | "type": "library", 318 | "autoload": { 319 | "psr-0": { 320 | "Doctrine\\DBAL\\": "lib/" 321 | } 322 | }, 323 | "notification-url": "https://packagist.org/downloads/", 324 | "license": [ 325 | "MIT" 326 | ], 327 | "authors": [ 328 | { 329 | "name": "Roman Borschel", 330 | "email": "roman@code-factory.org" 331 | }, 332 | { 333 | "name": "Benjamin Eberlei", 334 | "email": "kontakt@beberlei.de" 335 | }, 336 | { 337 | "name": "Guilherme Blanco", 338 | "email": "guilhermeblanco@gmail.com" 339 | }, 340 | { 341 | "name": "Jonathan Wage", 342 | "email": "jonwage@gmail.com" 343 | } 344 | ], 345 | "description": "Database Abstraction Layer", 346 | "homepage": "http://www.doctrine-project.org", 347 | "keywords": [ 348 | "database", 349 | "dbal", 350 | "persistence", 351 | "queryobject" 352 | ], 353 | "time": "2014-10-16 11:56:49" 354 | }, 355 | { 356 | "name": "doctrine/doctrine-bundle", 357 | "version": "v1.2.0", 358 | "target-dir": "Doctrine/Bundle/DoctrineBundle", 359 | "source": { 360 | "type": "git", 361 | "url": "https://github.com/doctrine/DoctrineBundle.git", 362 | "reference": "765b0d87fcc3e839c74817b7211258cbef3a4fb9" 363 | }, 364 | "dist": { 365 | "type": "zip", 366 | "url": "https://api.github.com/repos/doctrine/DoctrineBundle/zipball/765b0d87fcc3e839c74817b7211258cbef3a4fb9", 367 | "reference": "765b0d87fcc3e839c74817b7211258cbef3a4fb9", 368 | "shasum": "" 369 | }, 370 | "require": { 371 | "doctrine/dbal": ">=2.2,<2.5-dev", 372 | "jdorn/sql-formatter": "~1.1", 373 | "php": ">=5.3.2", 374 | "symfony/doctrine-bridge": "~2.2", 375 | "symfony/framework-bundle": "~2.2" 376 | }, 377 | "require-dev": { 378 | "doctrine/orm": ">=2.2,<2.5-dev", 379 | "symfony/validator": "~2.2", 380 | "symfony/yaml": "~2.2" 381 | }, 382 | "suggest": { 383 | "doctrine/orm": "The Doctrine ORM integration is optional in the bundle.", 384 | "symfony/web-profiler-bundle": "to use the data collector" 385 | }, 386 | "type": "symfony-bundle", 387 | "extra": { 388 | "branch-alias": { 389 | "dev-master": "1.2.x-dev" 390 | } 391 | }, 392 | "autoload": { 393 | "psr-0": { 394 | "Doctrine\\Bundle\\DoctrineBundle": "" 395 | } 396 | }, 397 | "notification-url": "https://packagist.org/downloads/", 398 | "license": [ 399 | "MIT" 400 | ], 401 | "authors": [ 402 | { 403 | "name": "Fabien Potencier", 404 | "email": "fabien@symfony.com", 405 | "homepage": "http://fabien.potencier.org", 406 | "role": "Lead Developer" 407 | }, 408 | { 409 | "name": "Symfony Community", 410 | "homepage": "http://symfony.com/contributors" 411 | }, 412 | { 413 | "name": "Benjamin Eberlei", 414 | "email": "kontakt@beberlei.de" 415 | } 416 | ], 417 | "description": "Symfony DoctrineBundle", 418 | "homepage": "http://www.doctrine-project.org", 419 | "keywords": [ 420 | "database", 421 | "dbal", 422 | "orm", 423 | "persistence" 424 | ], 425 | "time": "2013-03-25 20:13:59" 426 | }, 427 | { 428 | "name": "doctrine/inflector", 429 | "version": "v1.0", 430 | "source": { 431 | "type": "git", 432 | "url": "https://github.com/doctrine/inflector.git", 433 | "reference": "54b8333d2a5682afdc690060c1cf384ba9f47f08" 434 | }, 435 | "dist": { 436 | "type": "zip", 437 | "url": "https://api.github.com/repos/doctrine/inflector/zipball/54b8333d2a5682afdc690060c1cf384ba9f47f08", 438 | "reference": "54b8333d2a5682afdc690060c1cf384ba9f47f08", 439 | "shasum": "" 440 | }, 441 | "require": { 442 | "php": ">=5.3.2" 443 | }, 444 | "type": "library", 445 | "autoload": { 446 | "psr-0": { 447 | "Doctrine\\Common\\Inflector\\": "lib/" 448 | } 449 | }, 450 | "notification-url": "https://packagist.org/downloads/", 451 | "license": [ 452 | "MIT" 453 | ], 454 | "authors": [ 455 | { 456 | "name": "Jonathan Wage", 457 | "email": "jonwage@gmail.com", 458 | "homepage": "http://www.jwage.com/", 459 | "role": "Creator" 460 | }, 461 | { 462 | "name": "Guilherme Blanco", 463 | "email": "guilhermeblanco@gmail.com", 464 | "homepage": "http://www.instaclick.com" 465 | }, 466 | { 467 | "name": "Roman Borschel", 468 | "email": "roman@code-factory.org" 469 | }, 470 | { 471 | "name": "Benjamin Eberlei", 472 | "email": "kontakt@beberlei.de" 473 | }, 474 | { 475 | "name": "Johannes Schmitt", 476 | "email": "schmittjoh@gmail.com", 477 | "homepage": "https://github.com/schmittjoh", 478 | "role": "Developer of wrapped JMSSerializerBundle" 479 | } 480 | ], 481 | "description": "Common String Manipulations with regard to casing and singular/plural rules.", 482 | "homepage": "http://www.doctrine-project.org", 483 | "keywords": [ 484 | "inflection", 485 | "pluarlize", 486 | "singuarlize", 487 | "string" 488 | ], 489 | "time": "2013-01-10 21:49:15" 490 | }, 491 | { 492 | "name": "doctrine/lexer", 493 | "version": "v1.0", 494 | "source": { 495 | "type": "git", 496 | "url": "https://github.com/doctrine/lexer.git", 497 | "reference": "2f708a85bb3aab5d99dab8be435abd73e0b18acb" 498 | }, 499 | "dist": { 500 | "type": "zip", 501 | "url": "https://api.github.com/repos/doctrine/lexer/zipball/2f708a85bb3aab5d99dab8be435abd73e0b18acb", 502 | "reference": "2f708a85bb3aab5d99dab8be435abd73e0b18acb", 503 | "shasum": "" 504 | }, 505 | "require": { 506 | "php": ">=5.3.2" 507 | }, 508 | "type": "library", 509 | "autoload": { 510 | "psr-0": { 511 | "Doctrine\\Common\\Lexer\\": "lib/" 512 | } 513 | }, 514 | "notification-url": "https://packagist.org/downloads/", 515 | "license": [ 516 | "MIT" 517 | ], 518 | "authors": [ 519 | { 520 | "name": "Guilherme Blanco", 521 | "email": "guilhermeblanco@gmail.com", 522 | "homepage": "http://www.instaclick.com" 523 | }, 524 | { 525 | "name": "Roman Borschel", 526 | "email": "roman@code-factory.org" 527 | }, 528 | { 529 | "name": "Johannes Schmitt", 530 | "email": "schmittjoh@gmail.com", 531 | "homepage": "https://github.com/schmittjoh", 532 | "role": "Developer of wrapped JMSSerializerBundle" 533 | } 534 | ], 535 | "description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.", 536 | "homepage": "http://www.doctrine-project.org", 537 | "keywords": [ 538 | "lexer", 539 | "parser" 540 | ], 541 | "time": "2013-01-12 18:59:04" 542 | }, 543 | { 544 | "name": "doctrine/orm", 545 | "version": "v2.4.6", 546 | "source": { 547 | "type": "git", 548 | "url": "https://github.com/doctrine/doctrine2.git", 549 | "reference": "bebacf79d8d4dae9168f0f9bc6811e6c2cb6a4d9" 550 | }, 551 | "dist": { 552 | "type": "zip", 553 | "url": "https://api.github.com/repos/doctrine/doctrine2/zipball/bebacf79d8d4dae9168f0f9bc6811e6c2cb6a4d9", 554 | "reference": "bebacf79d8d4dae9168f0f9bc6811e6c2cb6a4d9", 555 | "shasum": "" 556 | }, 557 | "require": { 558 | "doctrine/collections": "~1.1", 559 | "doctrine/dbal": "~2.4", 560 | "ext-pdo": "*", 561 | "php": ">=5.3.2", 562 | "symfony/console": "~2.0" 563 | }, 564 | "require-dev": { 565 | "satooshi/php-coveralls": "dev-master", 566 | "symfony/yaml": "~2.1" 567 | }, 568 | "suggest": { 569 | "symfony/yaml": "If you want to use YAML Metadata Mapping Driver" 570 | }, 571 | "bin": [ 572 | "bin/doctrine", 573 | "bin/doctrine.php" 574 | ], 575 | "type": "library", 576 | "extra": { 577 | "branch-alias": { 578 | "dev-master": "2.4.x-dev" 579 | } 580 | }, 581 | "autoload": { 582 | "psr-0": { 583 | "Doctrine\\ORM\\": "lib/" 584 | } 585 | }, 586 | "notification-url": "https://packagist.org/downloads/", 587 | "license": [ 588 | "MIT" 589 | ], 590 | "authors": [ 591 | { 592 | "name": "Roman Borschel", 593 | "email": "roman@code-factory.org" 594 | }, 595 | { 596 | "name": "Benjamin Eberlei", 597 | "email": "kontakt@beberlei.de" 598 | }, 599 | { 600 | "name": "Guilherme Blanco", 601 | "email": "guilhermeblanco@gmail.com" 602 | }, 603 | { 604 | "name": "Jonathan Wage", 605 | "email": "jonwage@gmail.com" 606 | } 607 | ], 608 | "description": "Object-Relational-Mapper for PHP", 609 | "homepage": "http://www.doctrine-project.org", 610 | "keywords": [ 611 | "database", 612 | "orm" 613 | ], 614 | "time": "2014-10-06 13:22:50" 615 | }, 616 | { 617 | "name": "incenteev/composer-parameter-handler", 618 | "version": "v2.1.0", 619 | "target-dir": "Incenteev/ParameterHandler", 620 | "source": { 621 | "type": "git", 622 | "url": "https://github.com/Incenteev/ParameterHandler.git", 623 | "reference": "143272a0a09c62616a3c8011fc165a10c6b35241" 624 | }, 625 | "dist": { 626 | "type": "zip", 627 | "url": "https://api.github.com/repos/Incenteev/ParameterHandler/zipball/143272a0a09c62616a3c8011fc165a10c6b35241", 628 | "reference": "143272a0a09c62616a3c8011fc165a10c6b35241", 629 | "shasum": "" 630 | }, 631 | "require": { 632 | "php": ">=5.3.3", 633 | "symfony/yaml": "~2.0" 634 | }, 635 | "require-dev": { 636 | "composer/composer": "1.0.*@dev", 637 | "phpspec/prophecy-phpunit": "~1.0", 638 | "symfony/filesystem": "~2.2" 639 | }, 640 | "type": "library", 641 | "extra": { 642 | "branch-alias": { 643 | "dev-master": "2.1.x-dev" 644 | } 645 | }, 646 | "autoload": { 647 | "psr-0": { 648 | "Incenteev\\ParameterHandler": "" 649 | } 650 | }, 651 | "notification-url": "https://packagist.org/downloads/", 652 | "license": [ 653 | "MIT" 654 | ], 655 | "authors": [ 656 | { 657 | "name": "Christophe Coevoet", 658 | "email": "stof@notk.org" 659 | } 660 | ], 661 | "description": "Composer script handling your ignored parameter file", 662 | "homepage": "https://github.com/Incenteev/ParameterHandler", 663 | "keywords": [ 664 | "parameters management" 665 | ], 666 | "time": "2013-12-07 10:10:39" 667 | }, 668 | { 669 | "name": "jdorn/sql-formatter", 670 | "version": "v1.2.17", 671 | "source": { 672 | "type": "git", 673 | "url": "https://github.com/jdorn/sql-formatter.git", 674 | "reference": "64990d96e0959dff8e059dfcdc1af130728d92bc" 675 | }, 676 | "dist": { 677 | "type": "zip", 678 | "url": "https://api.github.com/repos/jdorn/sql-formatter/zipball/64990d96e0959dff8e059dfcdc1af130728d92bc", 679 | "reference": "64990d96e0959dff8e059dfcdc1af130728d92bc", 680 | "shasum": "" 681 | }, 682 | "require": { 683 | "php": ">=5.2.4" 684 | }, 685 | "require-dev": { 686 | "phpunit/phpunit": "3.7.*" 687 | }, 688 | "type": "library", 689 | "extra": { 690 | "branch-alias": { 691 | "dev-master": "1.3.x-dev" 692 | } 693 | }, 694 | "autoload": { 695 | "classmap": [ 696 | "lib" 697 | ] 698 | }, 699 | "notification-url": "https://packagist.org/downloads/", 700 | "license": [ 701 | "MIT" 702 | ], 703 | "authors": [ 704 | { 705 | "name": "Jeremy Dorn", 706 | "email": "jeremy@jeremydorn.com", 707 | "homepage": "http://jeremydorn.com/" 708 | } 709 | ], 710 | "description": "a PHP SQL highlighting library", 711 | "homepage": "https://github.com/jdorn/sql-formatter/", 712 | "keywords": [ 713 | "highlight", 714 | "sql" 715 | ], 716 | "time": "2014-01-12 16:20:24" 717 | }, 718 | { 719 | "name": "kriswallsmith/assetic", 720 | "version": "v1.2.0", 721 | "source": { 722 | "type": "git", 723 | "url": "https://github.com/kriswallsmith/assetic.git", 724 | "reference": "df991c124a2212371443b586a1be767500036dee" 725 | }, 726 | "dist": { 727 | "type": "zip", 728 | "url": "https://api.github.com/repos/kriswallsmith/assetic/zipball/df991c124a2212371443b586a1be767500036dee", 729 | "reference": "df991c124a2212371443b586a1be767500036dee", 730 | "shasum": "" 731 | }, 732 | "require": { 733 | "php": ">=5.3.1", 734 | "symfony/process": "~2.1" 735 | }, 736 | "require-dev": { 737 | "cssmin/cssmin": "*", 738 | "joliclic/javascript-packer": "*", 739 | "kamicane/packager": "*", 740 | "leafo/lessphp": "*", 741 | "leafo/scssphp": "*", 742 | "leafo/scssphp-compass": "*", 743 | "mrclay/minify": "*", 744 | "patchwork/jsqueeze": "~1.0", 745 | "phpunit/phpunit": "~4", 746 | "psr/log": "~1.0", 747 | "ptachoire/cssembed": "*", 748 | "twig/twig": "~1.6" 749 | }, 750 | "suggest": { 751 | "leafo/lessphp": "Assetic provides the integration with the lessphp LESS compiler", 752 | "leafo/scssphp": "Assetic provides the integration with the scssphp SCSS compiler", 753 | "leafo/scssphp-compass": "Assetic provides the integration with the SCSS compass plugin", 754 | "patchwork/jsqueeze": "Assetic provides the integration with the JSqueeze JavaScript compressor", 755 | "ptachoire/cssembed": "Assetic provides the integration with phpcssembed to embed data uris", 756 | "twig/twig": "Assetic provides the integration with the Twig templating engine" 757 | }, 758 | "type": "library", 759 | "extra": { 760 | "branch-alias": { 761 | "dev-master": "1.2-dev" 762 | } 763 | }, 764 | "autoload": { 765 | "psr-0": { 766 | "Assetic": "src/" 767 | }, 768 | "files": [ 769 | "src/functions.php" 770 | ] 771 | }, 772 | "notification-url": "https://packagist.org/downloads/", 773 | "license": [ 774 | "MIT" 775 | ], 776 | "authors": [ 777 | { 778 | "name": "Kris Wallsmith", 779 | "email": "kris.wallsmith@gmail.com", 780 | "homepage": "http://kriswallsmith.net/" 781 | } 782 | ], 783 | "description": "Asset Management for PHP", 784 | "homepage": "https://github.com/kriswallsmith/assetic", 785 | "keywords": [ 786 | "assets", 787 | "compression", 788 | "minification" 789 | ], 790 | "time": "2014-10-14 14:45:32" 791 | }, 792 | { 793 | "name": "monolog/monolog", 794 | "version": "1.11.0", 795 | "source": { 796 | "type": "git", 797 | "url": "https://github.com/Seldaek/monolog.git", 798 | "reference": "ec3961874c43840e96da3a8a1ed20d8c73d7e5aa" 799 | }, 800 | "dist": { 801 | "type": "zip", 802 | "url": "https://api.github.com/repos/Seldaek/monolog/zipball/ec3961874c43840e96da3a8a1ed20d8c73d7e5aa", 803 | "reference": "ec3961874c43840e96da3a8a1ed20d8c73d7e5aa", 804 | "shasum": "" 805 | }, 806 | "require": { 807 | "php": ">=5.3.0", 808 | "psr/log": "~1.0" 809 | }, 810 | "provide": { 811 | "psr/log-implementation": "1.0.0" 812 | }, 813 | "require-dev": { 814 | "aws/aws-sdk-php": "~2.4, >2.4.8", 815 | "doctrine/couchdb": "~1.0@dev", 816 | "graylog2/gelf-php": "~1.0", 817 | "phpunit/phpunit": "~3.7.0", 818 | "raven/raven": "~0.5", 819 | "ruflin/elastica": "0.90.*", 820 | "videlalvaro/php-amqplib": "~2.4" 821 | }, 822 | "suggest": { 823 | "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", 824 | "doctrine/couchdb": "Allow sending log messages to a CouchDB server", 825 | "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", 826 | "ext-mongo": "Allow sending log messages to a MongoDB server", 827 | "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", 828 | "raven/raven": "Allow sending log messages to a Sentry server", 829 | "rollbar/rollbar": "Allow sending log messages to Rollbar", 830 | "ruflin/elastica": "Allow sending log messages to an Elastic Search server", 831 | "videlalvaro/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib" 832 | }, 833 | "type": "library", 834 | "extra": { 835 | "branch-alias": { 836 | "dev-master": "1.11.x-dev" 837 | } 838 | }, 839 | "autoload": { 840 | "psr-4": { 841 | "Monolog\\": "src/Monolog" 842 | } 843 | }, 844 | "notification-url": "https://packagist.org/downloads/", 845 | "license": [ 846 | "MIT" 847 | ], 848 | "authors": [ 849 | { 850 | "name": "Jordi Boggiano", 851 | "email": "j.boggiano@seld.be", 852 | "homepage": "http://seld.be" 853 | } 854 | ], 855 | "description": "Sends your logs to files, sockets, inboxes, databases and various web services", 856 | "homepage": "http://github.com/Seldaek/monolog", 857 | "keywords": [ 858 | "log", 859 | "logging", 860 | "psr-3" 861 | ], 862 | "time": "2014-09-30 13:30:58" 863 | }, 864 | { 865 | "name": "oldsound/rabbitmq-bundle", 866 | "version": "v1.5.0", 867 | "target-dir": "OldSound/RabbitMqBundle", 868 | "source": { 869 | "type": "git", 870 | "url": "https://github.com/videlalvaro/RabbitMqBundle.git", 871 | "reference": "0c84f33f0233c29526cfca41bf6434119f917996" 872 | }, 873 | "dist": { 874 | "type": "zip", 875 | "url": "https://api.github.com/repos/videlalvaro/RabbitMqBundle/zipball/0c84f33f0233c29526cfca41bf6434119f917996", 876 | "reference": "0c84f33f0233c29526cfca41bf6434119f917996", 877 | "shasum": "" 878 | }, 879 | "require": { 880 | "php": ">=5.3.0", 881 | "symfony/framework-bundle": "~2.1", 882 | "symfony/yaml": "~2.0", 883 | "videlalvaro/php-amqplib": "~2.4.0" 884 | }, 885 | "require-dev": { 886 | "symfony/console": "~2.0" 887 | }, 888 | "type": "symfony-bundle", 889 | "extra": { 890 | "branch-alias": { 891 | "dev-master": "1.2.x-dev" 892 | } 893 | }, 894 | "autoload": { 895 | "psr-0": { 896 | "OldSound\\RabbitMqBundle\\": "" 897 | } 898 | }, 899 | "notification-url": "https://packagist.org/downloads/", 900 | "license": [ 901 | "MIT" 902 | ], 903 | "authors": [ 904 | { 905 | "name": "Alvaro Videla" 906 | } 907 | ], 908 | "description": "Integrates php-amqplib with Symfony2 and RabbitMq", 909 | "keywords": [ 910 | "Symfony2", 911 | "message", 912 | "queue", 913 | "rabbitmq" 914 | ], 915 | "time": "2014-06-21 12:15:53" 916 | }, 917 | { 918 | "name": "psr/log", 919 | "version": "1.0.0", 920 | "source": { 921 | "type": "git", 922 | "url": "https://github.com/php-fig/log.git", 923 | "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b" 924 | }, 925 | "dist": { 926 | "type": "zip", 927 | "url": "https://api.github.com/repos/php-fig/log/zipball/fe0936ee26643249e916849d48e3a51d5f5e278b", 928 | "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b", 929 | "shasum": "" 930 | }, 931 | "type": "library", 932 | "autoload": { 933 | "psr-0": { 934 | "Psr\\Log\\": "" 935 | } 936 | }, 937 | "notification-url": "https://packagist.org/downloads/", 938 | "license": [ 939 | "MIT" 940 | ], 941 | "authors": [ 942 | { 943 | "name": "PHP-FIG", 944 | "homepage": "http://www.php-fig.org/" 945 | } 946 | ], 947 | "description": "Common interface for logging libraries", 948 | "keywords": [ 949 | "log", 950 | "psr", 951 | "psr-3" 952 | ], 953 | "time": "2012-12-21 11:40:51" 954 | }, 955 | { 956 | "name": "sensio/distribution-bundle", 957 | "version": "v3.0.10", 958 | "target-dir": "Sensio/Bundle/DistributionBundle", 959 | "source": { 960 | "type": "git", 961 | "url": "https://github.com/sensiolabs/SensioDistributionBundle.git", 962 | "reference": "ca188a500a7bef815a46f19f8616f0a775e7dbf2" 963 | }, 964 | "dist": { 965 | "type": "zip", 966 | "url": "https://api.github.com/repos/sensiolabs/SensioDistributionBundle/zipball/ca188a500a7bef815a46f19f8616f0a775e7dbf2", 967 | "reference": "ca188a500a7bef815a46f19f8616f0a775e7dbf2", 968 | "shasum": "" 969 | }, 970 | "require": { 971 | "php": ">=5.3.3", 972 | "sensiolabs/security-checker": "~2.0", 973 | "symfony/class-loader": "~2.2", 974 | "symfony/form": "~2.2", 975 | "symfony/framework-bundle": "~2.3", 976 | "symfony/process": "~2.2", 977 | "symfony/validator": "~2.2", 978 | "symfony/yaml": "~2.2" 979 | }, 980 | "type": "symfony-bundle", 981 | "extra": { 982 | "branch-alias": { 983 | "dev-master": "3.0.x-dev" 984 | } 985 | }, 986 | "autoload": { 987 | "psr-0": { 988 | "Sensio\\Bundle\\DistributionBundle": "" 989 | } 990 | }, 991 | "notification-url": "https://packagist.org/downloads/", 992 | "license": [ 993 | "MIT" 994 | ], 995 | "authors": [ 996 | { 997 | "name": "Fabien Potencier", 998 | "email": "fabien@symfony.com" 999 | } 1000 | ], 1001 | "description": "Base bundle for Symfony Distributions", 1002 | "keywords": [ 1003 | "configuration", 1004 | "distribution" 1005 | ], 1006 | "time": "2014-11-23 18:30:35" 1007 | }, 1008 | { 1009 | "name": "sensio/framework-extra-bundle", 1010 | "version": "v3.0.3", 1011 | "target-dir": "Sensio/Bundle/FrameworkExtraBundle", 1012 | "source": { 1013 | "type": "git", 1014 | "url": "https://github.com/sensiolabs/SensioFrameworkExtraBundle.git", 1015 | "reference": "b829a8097a41ccbd7d35683b1750043b23d682f5" 1016 | }, 1017 | "dist": { 1018 | "type": "zip", 1019 | "url": "https://api.github.com/repos/sensiolabs/SensioFrameworkExtraBundle/zipball/b829a8097a41ccbd7d35683b1750043b23d682f5", 1020 | "reference": "b829a8097a41ccbd7d35683b1750043b23d682f5", 1021 | "shasum": "" 1022 | }, 1023 | "require": { 1024 | "doctrine/common": "~2.2", 1025 | "symfony/framework-bundle": "~2.3" 1026 | }, 1027 | "require-dev": { 1028 | "symfony/expression-language": "~2.4", 1029 | "symfony/security-bundle": "~2.4" 1030 | }, 1031 | "suggest": { 1032 | "symfony/expression-language": "", 1033 | "symfony/security-bundle": "" 1034 | }, 1035 | "type": "symfony-bundle", 1036 | "extra": { 1037 | "branch-alias": { 1038 | "dev-master": "3.0.x-dev" 1039 | } 1040 | }, 1041 | "autoload": { 1042 | "psr-0": { 1043 | "Sensio\\Bundle\\FrameworkExtraBundle": "" 1044 | } 1045 | }, 1046 | "notification-url": "https://packagist.org/downloads/", 1047 | "license": [ 1048 | "MIT" 1049 | ], 1050 | "authors": [ 1051 | { 1052 | "name": "Fabien Potencier", 1053 | "email": "fabien@symfony.com" 1054 | } 1055 | ], 1056 | "description": "This bundle provides a way to configure your controllers with annotations", 1057 | "keywords": [ 1058 | "annotations", 1059 | "controllers" 1060 | ], 1061 | "time": "2014-11-10 14:50:31" 1062 | }, 1063 | { 1064 | "name": "sensiolabs/security-checker", 1065 | "version": "v2.0.0", 1066 | "source": { 1067 | "type": "git", 1068 | "url": "https://github.com/sensiolabs/security-checker.git", 1069 | "reference": "5b4eb4743ebe68276c911c84101ecdf4a9ae76ee" 1070 | }, 1071 | "dist": { 1072 | "type": "zip", 1073 | "url": "https://api.github.com/repos/sensiolabs/security-checker/zipball/5b4eb4743ebe68276c911c84101ecdf4a9ae76ee", 1074 | "reference": "5b4eb4743ebe68276c911c84101ecdf4a9ae76ee", 1075 | "shasum": "" 1076 | }, 1077 | "require": { 1078 | "ext-curl": "*", 1079 | "symfony/console": "~2.0" 1080 | }, 1081 | "bin": [ 1082 | "security-checker" 1083 | ], 1084 | "type": "library", 1085 | "extra": { 1086 | "branch-alias": { 1087 | "dev-master": "2.0-dev" 1088 | } 1089 | }, 1090 | "autoload": { 1091 | "psr-0": { 1092 | "SensioLabs\\Security": "" 1093 | } 1094 | }, 1095 | "notification-url": "https://packagist.org/downloads/", 1096 | "license": [ 1097 | "MIT" 1098 | ], 1099 | "authors": [ 1100 | { 1101 | "name": "Fabien Potencier", 1102 | "email": "fabien.potencier@gmail.com" 1103 | } 1104 | ], 1105 | "description": "A security checker for your composer.lock", 1106 | "time": "2014-07-19 10:52:35" 1107 | }, 1108 | { 1109 | "name": "swiftmailer/swiftmailer", 1110 | "version": "v5.3.0", 1111 | "source": { 1112 | "type": "git", 1113 | "url": "https://github.com/swiftmailer/swiftmailer.git", 1114 | "reference": "b86b927dfefdb56ab0b22d1350033d9a38e9f205" 1115 | }, 1116 | "dist": { 1117 | "type": "zip", 1118 | "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/b86b927dfefdb56ab0b22d1350033d9a38e9f205", 1119 | "reference": "b86b927dfefdb56ab0b22d1350033d9a38e9f205", 1120 | "shasum": "" 1121 | }, 1122 | "require": { 1123 | "php": ">=5.3.3" 1124 | }, 1125 | "require-dev": { 1126 | "mockery/mockery": "~0.9.1" 1127 | }, 1128 | "type": "library", 1129 | "extra": { 1130 | "branch-alias": { 1131 | "dev-master": "5.3-dev" 1132 | } 1133 | }, 1134 | "autoload": { 1135 | "files": [ 1136 | "lib/swift_required.php" 1137 | ] 1138 | }, 1139 | "notification-url": "https://packagist.org/downloads/", 1140 | "license": [ 1141 | "MIT" 1142 | ], 1143 | "authors": [ 1144 | { 1145 | "name": "Chris Corbyn" 1146 | }, 1147 | { 1148 | "name": "Fabien Potencier", 1149 | "email": "fabien@symfony.com" 1150 | } 1151 | ], 1152 | "description": "Swiftmailer, free feature-rich PHP mailer", 1153 | "homepage": "http://swiftmailer.org", 1154 | "keywords": [ 1155 | "mail", 1156 | "mailer" 1157 | ], 1158 | "time": "2014-10-04 05:53:18" 1159 | }, 1160 | { 1161 | "name": "symfony/assetic-bundle", 1162 | "version": "v2.5.0", 1163 | "source": { 1164 | "type": "git", 1165 | "url": "https://github.com/symfony/AsseticBundle.git", 1166 | "reference": "90ea7fb66d6d5245fd4afc16e4c8070214254fec" 1167 | }, 1168 | "dist": { 1169 | "type": "zip", 1170 | "url": "https://api.github.com/repos/symfony/AsseticBundle/zipball/90ea7fb66d6d5245fd4afc16e4c8070214254fec", 1171 | "reference": "90ea7fb66d6d5245fd4afc16e4c8070214254fec", 1172 | "shasum": "" 1173 | }, 1174 | "require": { 1175 | "kriswallsmith/assetic": "~1.2", 1176 | "php": ">=5.3.0", 1177 | "symfony/console": "~2.1", 1178 | "symfony/framework-bundle": "~2.1", 1179 | "symfony/yaml": "~2.1" 1180 | }, 1181 | "require-dev": { 1182 | "kriswallsmith/spork": "~0.2", 1183 | "patchwork/jsqueeze": "~1.0", 1184 | "symfony/class-loader": "~2.1", 1185 | "symfony/css-selector": "~2.1", 1186 | "symfony/dom-crawler": "~2.1", 1187 | "symfony/twig-bundle": "~2.1" 1188 | }, 1189 | "suggest": { 1190 | "kriswallsmith/spork": "to be able to dump assets in parallel", 1191 | "symfony/twig-bundle": "to use the Twig integration" 1192 | }, 1193 | "type": "symfony-bundle", 1194 | "extra": { 1195 | "branch-alias": { 1196 | "dev-master": "2.5-dev" 1197 | } 1198 | }, 1199 | "autoload": { 1200 | "psr-4": { 1201 | "Symfony\\Bundle\\AsseticBundle\\": "" 1202 | } 1203 | }, 1204 | "notification-url": "https://packagist.org/downloads/", 1205 | "license": [ 1206 | "MIT" 1207 | ], 1208 | "authors": [ 1209 | { 1210 | "name": "Kris Wallsmith", 1211 | "email": "kris.wallsmith@gmail.com", 1212 | "homepage": "http://kriswallsmith.net/" 1213 | } 1214 | ], 1215 | "description": "Integrates Assetic into Symfony2", 1216 | "homepage": "https://github.com/symfony/AsseticBundle", 1217 | "keywords": [ 1218 | "assets", 1219 | "compression", 1220 | "minification" 1221 | ], 1222 | "time": "2014-10-15 12:03:38" 1223 | }, 1224 | { 1225 | "name": "symfony/monolog-bundle", 1226 | "version": "v2.6.1", 1227 | "source": { 1228 | "type": "git", 1229 | "url": "https://github.com/symfony/MonologBundle.git", 1230 | "reference": "227bbeefe30f2d95e3fe5fbd1ccda414287a957a" 1231 | }, 1232 | "dist": { 1233 | "type": "zip", 1234 | "url": "https://api.github.com/repos/symfony/MonologBundle/zipball/227bbeefe30f2d95e3fe5fbd1ccda414287a957a", 1235 | "reference": "227bbeefe30f2d95e3fe5fbd1ccda414287a957a", 1236 | "shasum": "" 1237 | }, 1238 | "require": { 1239 | "monolog/monolog": "~1.8", 1240 | "php": ">=5.3.2", 1241 | "symfony/config": "~2.3", 1242 | "symfony/dependency-injection": "~2.3", 1243 | "symfony/http-kernel": "~2.3", 1244 | "symfony/monolog-bridge": "~2.3" 1245 | }, 1246 | "require-dev": { 1247 | "symfony/console": "~2.3", 1248 | "symfony/yaml": "~2.3" 1249 | }, 1250 | "type": "symfony-bundle", 1251 | "extra": { 1252 | "branch-alias": { 1253 | "dev-master": "2.6.x-dev" 1254 | } 1255 | }, 1256 | "autoload": { 1257 | "psr-4": { 1258 | "Symfony\\Bundle\\MonologBundle\\": "" 1259 | } 1260 | }, 1261 | "notification-url": "https://packagist.org/downloads/", 1262 | "license": [ 1263 | "MIT" 1264 | ], 1265 | "authors": [ 1266 | { 1267 | "name": "Symfony Community", 1268 | "homepage": "http://symfony.com/contributors" 1269 | }, 1270 | { 1271 | "name": "Fabien Potencier", 1272 | "email": "fabien@symfony.com" 1273 | } 1274 | ], 1275 | "description": "Symfony MonologBundle", 1276 | "homepage": "http://symfony.com", 1277 | "keywords": [ 1278 | "log", 1279 | "logging" 1280 | ], 1281 | "time": "2014-07-21 00:36:06" 1282 | }, 1283 | { 1284 | "name": "symfony/swiftmailer-bundle", 1285 | "version": "v2.3.7", 1286 | "target-dir": "Symfony/Bundle/SwiftmailerBundle", 1287 | "source": { 1288 | "type": "git", 1289 | "url": "https://github.com/symfony/SwiftmailerBundle.git", 1290 | "reference": "e98defd402f72e8b54a029ba4d3ac4cb51dc3577" 1291 | }, 1292 | "dist": { 1293 | "type": "zip", 1294 | "url": "https://api.github.com/repos/symfony/SwiftmailerBundle/zipball/e98defd402f72e8b54a029ba4d3ac4cb51dc3577", 1295 | "reference": "e98defd402f72e8b54a029ba4d3ac4cb51dc3577", 1296 | "shasum": "" 1297 | }, 1298 | "require": { 1299 | "php": ">=5.3.2", 1300 | "swiftmailer/swiftmailer": ">=4.2.0,~5.0", 1301 | "symfony/swiftmailer-bridge": "~2.1" 1302 | }, 1303 | "require-dev": { 1304 | "symfony/config": "~2.1", 1305 | "symfony/dependency-injection": "~2.1", 1306 | "symfony/http-kernel": "~2.1", 1307 | "symfony/yaml": "~2.1" 1308 | }, 1309 | "type": "symfony-bundle", 1310 | "extra": { 1311 | "branch-alias": { 1312 | "dev-master": "2.3-dev" 1313 | } 1314 | }, 1315 | "autoload": { 1316 | "psr-0": { 1317 | "Symfony\\Bundle\\SwiftmailerBundle": "" 1318 | } 1319 | }, 1320 | "notification-url": "https://packagist.org/downloads/", 1321 | "license": [ 1322 | "MIT" 1323 | ], 1324 | "authors": [ 1325 | { 1326 | "name": "Fabien Potencier", 1327 | "email": "fabien@symfony.com", 1328 | "homepage": "http://fabien.potencier.org", 1329 | "role": "Lead Developer" 1330 | }, 1331 | { 1332 | "name": "Symfony Community", 1333 | "homepage": "http://symfony.com/contributors" 1334 | } 1335 | ], 1336 | "description": "Symfony SwiftmailerBundle", 1337 | "homepage": "http://symfony.com", 1338 | "time": "2014-04-05 17:15:52" 1339 | }, 1340 | { 1341 | "name": "symfony/symfony", 1342 | "version": "v2.5.7", 1343 | "source": { 1344 | "type": "git", 1345 | "url": "https://github.com/symfony/symfony.git", 1346 | "reference": "dd4254fc39a702af22cd886a6790769541469da1" 1347 | }, 1348 | "dist": { 1349 | "type": "zip", 1350 | "url": "https://api.github.com/repos/symfony/symfony/zipball/dd4254fc39a702af22cd886a6790769541469da1", 1351 | "reference": "dd4254fc39a702af22cd886a6790769541469da1", 1352 | "shasum": "" 1353 | }, 1354 | "require": { 1355 | "doctrine/common": "~2.2", 1356 | "php": ">=5.3.3", 1357 | "psr/log": "~1.0", 1358 | "twig/twig": "~1.12" 1359 | }, 1360 | "replace": { 1361 | "symfony/browser-kit": "self.version", 1362 | "symfony/class-loader": "self.version", 1363 | "symfony/config": "self.version", 1364 | "symfony/console": "self.version", 1365 | "symfony/css-selector": "self.version", 1366 | "symfony/debug": "self.version", 1367 | "symfony/dependency-injection": "self.version", 1368 | "symfony/doctrine-bridge": "self.version", 1369 | "symfony/dom-crawler": "self.version", 1370 | "symfony/event-dispatcher": "self.version", 1371 | "symfony/expression-language": "self.version", 1372 | "symfony/filesystem": "self.version", 1373 | "symfony/finder": "self.version", 1374 | "symfony/form": "self.version", 1375 | "symfony/framework-bundle": "self.version", 1376 | "symfony/http-foundation": "self.version", 1377 | "symfony/http-kernel": "self.version", 1378 | "symfony/intl": "self.version", 1379 | "symfony/locale": "self.version", 1380 | "symfony/monolog-bridge": "self.version", 1381 | "symfony/options-resolver": "self.version", 1382 | "symfony/process": "self.version", 1383 | "symfony/propel1-bridge": "self.version", 1384 | "symfony/property-access": "self.version", 1385 | "symfony/proxy-manager-bridge": "self.version", 1386 | "symfony/routing": "self.version", 1387 | "symfony/security": "self.version", 1388 | "symfony/security-acl": "self.version", 1389 | "symfony/security-bundle": "self.version", 1390 | "symfony/security-core": "self.version", 1391 | "symfony/security-csrf": "self.version", 1392 | "symfony/security-http": "self.version", 1393 | "symfony/serializer": "self.version", 1394 | "symfony/stopwatch": "self.version", 1395 | "symfony/swiftmailer-bridge": "self.version", 1396 | "symfony/templating": "self.version", 1397 | "symfony/translation": "self.version", 1398 | "symfony/twig-bridge": "self.version", 1399 | "symfony/twig-bundle": "self.version", 1400 | "symfony/validator": "self.version", 1401 | "symfony/web-profiler-bundle": "self.version", 1402 | "symfony/yaml": "self.version" 1403 | }, 1404 | "require-dev": { 1405 | "doctrine/data-fixtures": "1.0.*", 1406 | "doctrine/dbal": "~2.2", 1407 | "doctrine/orm": "~2.2,>=2.2.3", 1408 | "egulias/email-validator": "~1.2", 1409 | "ircmaxell/password-compat": "1.0.*", 1410 | "monolog/monolog": "~1.3", 1411 | "ocramius/proxy-manager": ">=0.3.1,<0.6-dev", 1412 | "propel/propel1": "~1.6" 1413 | }, 1414 | "type": "library", 1415 | "extra": { 1416 | "branch-alias": { 1417 | "dev-master": "2.5-dev" 1418 | } 1419 | }, 1420 | "autoload": { 1421 | "psr-0": { 1422 | "Symfony\\": "src/" 1423 | }, 1424 | "classmap": [ 1425 | "src/Symfony/Component/HttpFoundation/Resources/stubs", 1426 | "src/Symfony/Component/Intl/Resources/stubs" 1427 | ], 1428 | "files": [ 1429 | "src/Symfony/Component/Intl/Resources/stubs/functions.php" 1430 | ] 1431 | }, 1432 | "notification-url": "https://packagist.org/downloads/", 1433 | "license": [ 1434 | "MIT" 1435 | ], 1436 | "authors": [ 1437 | { 1438 | "name": "Symfony Community", 1439 | "homepage": "http://symfony.com/contributors" 1440 | }, 1441 | { 1442 | "name": "Fabien Potencier", 1443 | "email": "fabien@symfony.com" 1444 | } 1445 | ], 1446 | "description": "The Symfony PHP framework", 1447 | "homepage": "http://symfony.com", 1448 | "keywords": [ 1449 | "framework" 1450 | ], 1451 | "time": "2014-11-20 16:00:03" 1452 | }, 1453 | { 1454 | "name": "twig/extensions", 1455 | "version": "v1.2.0", 1456 | "source": { 1457 | "type": "git", 1458 | "url": "https://github.com/twigphp/Twig-extensions.git", 1459 | "reference": "8cf4b9fe04077bd54fc73f4fde83347040c3b8cd" 1460 | }, 1461 | "dist": { 1462 | "type": "zip", 1463 | "url": "https://api.github.com/repos/twigphp/Twig-extensions/zipball/8cf4b9fe04077bd54fc73f4fde83347040c3b8cd", 1464 | "reference": "8cf4b9fe04077bd54fc73f4fde83347040c3b8cd", 1465 | "shasum": "" 1466 | }, 1467 | "require": { 1468 | "twig/twig": "~1.12" 1469 | }, 1470 | "require-dev": { 1471 | "symfony/translation": "~2.3" 1472 | }, 1473 | "suggest": { 1474 | "symfony/translation": "Allow the time_diff output to be translated" 1475 | }, 1476 | "type": "library", 1477 | "extra": { 1478 | "branch-alias": { 1479 | "dev-master": "1.2.x-dev" 1480 | } 1481 | }, 1482 | "autoload": { 1483 | "psr-0": { 1484 | "Twig_Extensions_": "lib/" 1485 | } 1486 | }, 1487 | "notification-url": "https://packagist.org/downloads/", 1488 | "license": [ 1489 | "MIT" 1490 | ], 1491 | "authors": [ 1492 | { 1493 | "name": "Fabien Potencier", 1494 | "email": "fabien@symfony.com" 1495 | } 1496 | ], 1497 | "description": "Common additional features for Twig that do not directly belong in core", 1498 | "homepage": "http://twig.sensiolabs.org/doc/extensions/index.html", 1499 | "keywords": [ 1500 | "i18n", 1501 | "text" 1502 | ], 1503 | "time": "2014-10-30 14:30:03" 1504 | }, 1505 | { 1506 | "name": "twig/twig", 1507 | "version": "v1.16.2", 1508 | "source": { 1509 | "type": "git", 1510 | "url": "https://github.com/twigphp/Twig.git", 1511 | "reference": "42f758d9fe2146d1f0470604fc05ee43580873fc" 1512 | }, 1513 | "dist": { 1514 | "type": "zip", 1515 | "url": "https://api.github.com/repos/twigphp/Twig/zipball/42f758d9fe2146d1f0470604fc05ee43580873fc", 1516 | "reference": "42f758d9fe2146d1f0470604fc05ee43580873fc", 1517 | "shasum": "" 1518 | }, 1519 | "require": { 1520 | "php": ">=5.2.4" 1521 | }, 1522 | "type": "library", 1523 | "extra": { 1524 | "branch-alias": { 1525 | "dev-master": "1.16-dev" 1526 | } 1527 | }, 1528 | "autoload": { 1529 | "psr-0": { 1530 | "Twig_": "lib/" 1531 | } 1532 | }, 1533 | "notification-url": "https://packagist.org/downloads/", 1534 | "license": [ 1535 | "BSD-3-Clause" 1536 | ], 1537 | "authors": [ 1538 | { 1539 | "name": "Fabien Potencier", 1540 | "email": "fabien@symfony.com", 1541 | "homepage": "http://fabien.potencier.org", 1542 | "role": "Lead Developer" 1543 | }, 1544 | { 1545 | "name": "Armin Ronacher", 1546 | "email": "armin.ronacher@active-4.com", 1547 | "role": "Project Founder" 1548 | }, 1549 | { 1550 | "name": "Twig Team", 1551 | "homepage": "https://github.com/fabpot/Twig/graphs/contributors", 1552 | "role": "Contributors" 1553 | } 1554 | ], 1555 | "description": "Twig, the flexible, fast, and secure template language for PHP", 1556 | "homepage": "http://twig.sensiolabs.org", 1557 | "keywords": [ 1558 | "templating" 1559 | ], 1560 | "time": "2014-10-17 12:53:44" 1561 | }, 1562 | { 1563 | "name": "videlalvaro/php-amqplib", 1564 | "version": "v2.4.1", 1565 | "source": { 1566 | "type": "git", 1567 | "url": "https://github.com/videlalvaro/php-amqplib.git", 1568 | "reference": "58044157b30853a1a425e26e9ff9895247668ac3" 1569 | }, 1570 | "dist": { 1571 | "type": "zip", 1572 | "url": "https://api.github.com/repos/videlalvaro/php-amqplib/zipball/58044157b30853a1a425e26e9ff9895247668ac3", 1573 | "reference": "58044157b30853a1a425e26e9ff9895247668ac3", 1574 | "shasum": "" 1575 | }, 1576 | "require": { 1577 | "ext-bcmath": "*", 1578 | "php": ">=5.3.0" 1579 | }, 1580 | "require-dev": { 1581 | "phpunit/phpunit": "3.7.*" 1582 | }, 1583 | "suggest": { 1584 | "ext-sockets": "Use AMQPSocketConnection" 1585 | }, 1586 | "type": "library", 1587 | "extra": { 1588 | "branch-alias": { 1589 | "dev-master": "2.4-dev" 1590 | } 1591 | }, 1592 | "autoload": { 1593 | "psr-0": { 1594 | "PhpAmqpLib": "" 1595 | } 1596 | }, 1597 | "notification-url": "https://packagist.org/downloads/", 1598 | "license": [ 1599 | "LGPL-2.1" 1600 | ], 1601 | "authors": [ 1602 | { 1603 | "name": "Alvaro Videla" 1604 | } 1605 | ], 1606 | "description": "This library is a pure PHP implementation of the AMQP protocol. It's been tested against RabbitMQ.", 1607 | "homepage": "https://github.com/videlalvaro/php-amqplib/", 1608 | "keywords": [ 1609 | "message", 1610 | "queue", 1611 | "rabbitmq" 1612 | ], 1613 | "time": "2014-10-06 11:00:55" 1614 | } 1615 | ], 1616 | "packages-dev": [ 1617 | { 1618 | "name": "sensio/generator-bundle", 1619 | "version": "v2.4.0", 1620 | "target-dir": "Sensio/Bundle/GeneratorBundle", 1621 | "source": { 1622 | "type": "git", 1623 | "url": "https://github.com/sensiolabs/SensioGeneratorBundle.git", 1624 | "reference": "d5c0b996a46276d50943a80f95a46b59215a0e68" 1625 | }, 1626 | "dist": { 1627 | "type": "zip", 1628 | "url": "https://api.github.com/repos/sensiolabs/SensioGeneratorBundle/zipball/d5c0b996a46276d50943a80f95a46b59215a0e68", 1629 | "reference": "d5c0b996a46276d50943a80f95a46b59215a0e68", 1630 | "shasum": "" 1631 | }, 1632 | "require": { 1633 | "symfony/console": "~2.0", 1634 | "symfony/framework-bundle": "~2.2" 1635 | }, 1636 | "require-dev": { 1637 | "doctrine/orm": "~2.2,>=2.2.3", 1638 | "symfony/doctrine-bridge": "~2.2", 1639 | "twig/twig": "~1.11" 1640 | }, 1641 | "type": "symfony-bundle", 1642 | "extra": { 1643 | "branch-alias": { 1644 | "dev-master": "2.3.x-dev" 1645 | } 1646 | }, 1647 | "autoload": { 1648 | "psr-0": { 1649 | "Sensio\\Bundle\\GeneratorBundle": "" 1650 | } 1651 | }, 1652 | "notification-url": "https://packagist.org/downloads/", 1653 | "license": [ 1654 | "MIT" 1655 | ], 1656 | "authors": [ 1657 | { 1658 | "name": "Fabien Potencier", 1659 | "email": "fabien@symfony.com" 1660 | } 1661 | ], 1662 | "description": "This bundle generates code for you", 1663 | "time": "2014-09-22 14:56:14" 1664 | } 1665 | ], 1666 | "aliases": [], 1667 | "minimum-stability": "stable", 1668 | "stability-flags": [], 1669 | "prefer-stable": false, 1670 | "platform": { 1671 | "php": ">=5.3.3" 1672 | }, 1673 | "platform-dev": [] 1674 | } 1675 | -------------------------------------------------------------------------------- /rabbitmq-sample/doc/images/principle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oscherler/rabbitmq-delayed-sample/8f47c52d8091b925a3bc8bc3bd5c505b1362ee3e/rabbitmq-sample/doc/images/principle.png -------------------------------------------------------------------------------- /rabbitmq-sample/doc/symfony/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2004-2014 Fabien Potencier 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is furnished 8 | to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /rabbitmq-sample/doc/symfony/README.md: -------------------------------------------------------------------------------- 1 | Symfony Standard Edition 2 | ======================== 3 | 4 | Welcome to the Symfony Standard Edition - a fully-functional Symfony2 5 | application that you can use as the skeleton for your new applications. 6 | 7 | This document contains information on how to download, install, and start 8 | using Symfony. For a more detailed explanation, see the [Installation][1] 9 | chapter of the Symfony Documentation. 10 | 11 | 1) Installing the Standard Edition 12 | ---------------------------------- 13 | 14 | When it comes to installing the Symfony Standard Edition, you have the 15 | following options. 16 | 17 | ### Use Composer (*recommended*) 18 | 19 | As Symfony uses [Composer][2] to manage its dependencies, the recommended way 20 | to create a new project is to use it. 21 | 22 | If you don't have Composer yet, download it following the instructions on 23 | http://getcomposer.org/ or just run the following command: 24 | 25 | curl -s http://getcomposer.org/installer | php 26 | 27 | Then, use the `create-project` command to generate a new Symfony application: 28 | 29 | php composer.phar create-project symfony/framework-standard-edition path/to/install 30 | 31 | Composer will install Symfony and all its dependencies under the 32 | `path/to/install` directory. 33 | 34 | ### Download an Archive File 35 | 36 | To quickly test Symfony, you can also download an [archive][3] of the Standard 37 | Edition and unpack it somewhere under your web server root directory. 38 | 39 | If you downloaded an archive "without vendors", you also need to install all 40 | the necessary dependencies. Download composer (see above) and run the 41 | following command: 42 | 43 | php composer.phar install 44 | 45 | 2) Checking your System Configuration 46 | ------------------------------------- 47 | 48 | Before starting coding, make sure that your local system is properly 49 | configured for Symfony. 50 | 51 | Execute the `check.php` script from the command line: 52 | 53 | php app/check.php 54 | 55 | The script returns a status code of `0` if all mandatory requirements are met, 56 | `1` otherwise. 57 | 58 | Access the `config.php` script from a browser: 59 | 60 | http://localhost/path-to-project/web/config.php 61 | 62 | If you get any warnings or recommendations, fix them before moving on. 63 | 64 | 3) Browsing the Demo Application 65 | -------------------------------- 66 | 67 | Congratulations! You're now ready to use Symfony. 68 | 69 | From the `config.php` page, click the "Bypass configuration and go to the 70 | Welcome page" link to load up your first Symfony page. 71 | 72 | You can also use a web-based configurator by clicking on the "Configure your 73 | Symfony Application online" link of the `config.php` page. 74 | 75 | To see a real-live Symfony page in action, access the following page: 76 | 77 | web/app_dev.php/demo/hello/Fabien 78 | 79 | 4) Getting started with Symfony 80 | ------------------------------- 81 | 82 | This distribution is meant to be the starting point for your Symfony 83 | applications, but it also contains some sample code that you can learn from 84 | and play with. 85 | 86 | A great way to start learning Symfony is via the [Quick Tour][4], which will 87 | take you through all the basic features of Symfony2. 88 | 89 | Once you're feeling good, you can move onto reading the official 90 | [Symfony2 book][5]. 91 | 92 | A default bundle, `AcmeDemoBundle`, shows you Symfony2 in action. After 93 | playing with it, you can remove it by following these steps: 94 | 95 | * delete the `src/Acme` directory; 96 | 97 | * remove the routing entry referencing AcmeDemoBundle in `app/config/routing_dev.yml`; 98 | 99 | * remove the AcmeDemoBundle from the registered bundles in `app/AppKernel.php`; 100 | 101 | * remove the `web/bundles/acmedemo` directory; 102 | 103 | * empty the `security.yml` file or tweak the security configuration to fit 104 | your needs. 105 | 106 | What's inside? 107 | --------------- 108 | 109 | The Symfony Standard Edition is configured with the following defaults: 110 | 111 | * Twig is the only configured template engine; 112 | 113 | * Doctrine ORM/DBAL is configured; 114 | 115 | * Swiftmailer is configured; 116 | 117 | * Annotations for everything are enabled. 118 | 119 | It comes pre-configured with the following bundles: 120 | 121 | * **FrameworkBundle** - The core Symfony framework bundle 122 | 123 | * [**SensioFrameworkExtraBundle**][6] - Adds several enhancements, including 124 | template and routing annotation capability 125 | 126 | * [**DoctrineBundle**][7] - Adds support for the Doctrine ORM 127 | 128 | * [**TwigBundle**][8] - Adds support for the Twig templating engine 129 | 130 | * [**SecurityBundle**][9] - Adds security by integrating Symfony's security 131 | component 132 | 133 | * [**SwiftmailerBundle**][10] - Adds support for Swiftmailer, a library for 134 | sending emails 135 | 136 | * [**MonologBundle**][11] - Adds support for Monolog, a logging library 137 | 138 | * [**AsseticBundle**][12] - Adds support for Assetic, an asset processing 139 | library 140 | 141 | * **WebProfilerBundle** (in dev/test env) - Adds profiling functionality and 142 | the web debug toolbar 143 | 144 | * **SensioDistributionBundle** (in dev/test env) - Adds functionality for 145 | configuring and working with Symfony distributions 146 | 147 | * [**SensioGeneratorBundle**][13] (in dev/test env) - Adds code generation 148 | capabilities 149 | 150 | * **AcmeDemoBundle** (in dev/test env) - A demo bundle with some example 151 | code 152 | 153 | All libraries and bundles included in the Symfony Standard Edition are 154 | released under the MIT or BSD license. 155 | 156 | Enjoy! 157 | 158 | [1]: http://symfony.com/doc/2.5/book/installation.html 159 | [2]: http://getcomposer.org/ 160 | [3]: http://symfony.com/download 161 | [4]: http://symfony.com/doc/2.5/quick_tour/the_big_picture.html 162 | [5]: http://symfony.com/doc/2.5/index.html 163 | [6]: http://symfony.com/doc/2.5/bundles/SensioFrameworkExtraBundle/index.html 164 | [7]: http://symfony.com/doc/2.5/book/doctrine.html 165 | [8]: http://symfony.com/doc/2.5/book/templating.html 166 | [9]: http://symfony.com/doc/2.5/book/security.html 167 | [10]: http://symfony.com/doc/2.5/cookbook/email.html 168 | [11]: http://symfony.com/doc/2.5/cookbook/logging/monolog.html 169 | [12]: http://symfony.com/doc/2.5/cookbook/assetic/asset_management.html 170 | [13]: http://symfony.com/doc/2.5/bundles/SensioGeneratorBundle/index.html 171 | -------------------------------------------------------------------------------- /rabbitmq-sample/doc/symfony/UPGRADE-2.2.md: -------------------------------------------------------------------------------- 1 | UPGRADE FROM 2.1 to 2.2 2 | ======================= 3 | 4 | * The [`web/.htaccess`](https://github.com/symfony/symfony-standard/blob/2.2/web/.htaccess) 5 | file has been enhanced substantially to prevent duplicate content with and 6 | without `/app.php` in the URI. It also improves functionality when using 7 | Apache aliases or when mod_rewrite is not available. So you might want to 8 | update your `.htaccess` file as well. 9 | 10 | * The ``_internal`` route is not used any more. It should then be removed 11 | from both your routing and security configurations. A ``fragments`` key has 12 | been added to the framework configuration and must be specified when ESI or 13 | Hinclude are in use. No security configuration is required for this path as 14 | by default ESI access is only permitted for trusted hosts and Hinclude 15 | access uses an URL signing mechanism. 16 | 17 | ``` 18 | framework: 19 | # ... 20 | fragments: { path: /_proxy } 21 | ``` 22 | 23 | Functional Tests 24 | ---------------- 25 | 26 | * The profiler has been disabled by default in the test environment. You can 27 | enable it again by modifying the ``config_test.yml`` configuration file or 28 | even better, you can just enable it for the very next request by calling 29 | ``$client->enableProfiler()`` when you need the profiler in a test (that 30 | speeds up functional tests quite a bit). 31 | -------------------------------------------------------------------------------- /rabbitmq-sample/doc/symfony/UPGRADE-2.3.md: -------------------------------------------------------------------------------- 1 | UPGRADE FROM 2.2 to 2.3 2 | ======================= 3 | 4 | When upgrading Symfony from 2.2 to 2.3, you need to do the following changes 5 | to the code that came from the Standard Edition: 6 | 7 | * The debugging tools are not enabled by default anymore and should be added 8 | to the 9 | [`web/app_dev.php`](https://github.com/symfony/symfony-standard/blob/2.3/web/app_dev.php) 10 | front controller manually, just after including the bootstrap cache: 11 | 12 | use Symfony\Component\Debug\Debug; 13 | 14 | Debug::enable(); 15 | 16 | You also need to enable debugging in the 17 | [`app/console`](https://github.com/symfony/symfony-standard/blob/2.3/app/console) 18 | script, after the `$debug` variable is defined: 19 | 20 | use Symfony\Component\Debug\Debug; 21 | 22 | if ($debug) { 23 | Debug::enable(); 24 | } 25 | 26 | * The `parameters.yml` file can now be managed by the 27 | `incenteev/composer-parameter-handler` bundle that comes with the 2.3 28 | Standard Edition: 29 | 30 | * add `"incenteev/composer-parameter-handler": "~2.0"` to your 31 | `composer.json` file; 32 | 33 | * add `/app/config/parameters.yml` to your `.gitignore` file; 34 | 35 | * create a 36 | [`app/config/parameters.yml.dist`](https://github.com/symfony/symfony-standard/blob/2.3/app/config/parameters.yml.dist) 37 | file with sensible values for all your parameters. 38 | 39 | * It is highly recommended that you switch the minimum stability to `stable` 40 | in your `composer.json` file. 41 | 42 | * If you are using Apache, have a look at the new 43 | [`.htaccess`](https://github.com/symfony/symfony-standard/blob/2.3/web/.htaccess) 44 | configuration and change yours accordingly. 45 | 46 | * In the 47 | [`app/autoload.php`](https://github.com/symfony/symfony-standard/blob/2.3/app/autoload.php) 48 | file, the section about `intl` should be removed as it is not needed anymore. 49 | 50 | You can also have a look at the 51 | [diff](https://github.com/symfony/symfony-standard/compare/v2.2.0%E2%80%A62.3) 52 | between the 2.2 version of the Standard Edition and the 2.3 version. 53 | -------------------------------------------------------------------------------- /rabbitmq-sample/doc/symfony/UPGRADE-2.4.md: -------------------------------------------------------------------------------- 1 | UPGRADE FROM 2.3 to 2.4 2 | ======================= 3 | 4 | When upgrading Symfony from 2.3 to 2.4, you need to do the following changes 5 | to the code that came from the Standard Edition: 6 | 7 | * We recommend to comment or remove the `firephp` and `chromephp` Monolog 8 | handlers as they might cause issues with some configuration (`chromephp` 9 | with Nginx for instance). 10 | -------------------------------------------------------------------------------- /rabbitmq-sample/doc/symfony/UPGRADE.md: -------------------------------------------------------------------------------- 1 | Symfony Standard Edition Upgrade 2 | ================================ 3 | 4 | From Symfony 2.0 to Symfony 2.1 5 | ------------------------------- 6 | 7 | ### Project Dependencies 8 | 9 | As of Symfony 2.1, project dependencies are managed by 10 | [Composer](http://getcomposer.org/): 11 | 12 | * The `bin/vendors` script can be removed as `composer.phar` does all the work 13 | now (it is recommended to install it globally on your machine). 14 | 15 | * The `deps` file need to be replaced with the `composer.json` one. 16 | 17 | * The `composer.lock` is the equivalent of the generated `deps.lock` file and 18 | it is automatically generated by Composer. 19 | 20 | Download the default 21 | [`composer.json`](https://raw.github.com/symfony/symfony-standard/2.1/composer.json) 22 | and 23 | [`composer.lock`](https://raw.github.com/symfony/symfony-standard/2.1/composer.lock) 24 | files for Symfony 2.1 and put them into the main directory of your project. If 25 | you have customized your `deps` file, move the added dependencies to the 26 | `composer.json` file (many bundles and PHP libraries are already available as 27 | Composer packages -- search for them on [Packagist](http://packagist.org/)). 28 | 29 | Remove your current `vendor` directory. 30 | 31 | Finally, run Composer: 32 | 33 | $ composer.phar install 34 | 35 | Note: You must complete the upgrade steps below so composer can successfully generate the autoload files. 36 | 37 | ### `app/autoload.php` 38 | 39 | The default `autoload.php` reads as follows (it has been simplified a lot as 40 | autoloading for libraries and bundles declared in your `composer.json` file is 41 | automatically managed by the Composer autoloader): 42 | 43 | add('', __DIR__.'/../vendor/symfony/symfony/src/Symfony/Component/Locale/Resources/stubs'); 54 | } 55 | 56 | AnnotationRegistry::registerLoader(array($loader, 'loadClass')); 57 | 58 | return $loader; 59 | 60 | ### `app/config/config.yml` 61 | 62 | The `framework.charset` setting must be removed. If you are not using `UTF-8` 63 | for your application, override the `getCharset()` method in your `AppKernel` 64 | class instead: 65 | 66 | class AppKernel extends Kernel 67 | { 68 | public function getCharset() 69 | { 70 | return 'ISO-8859-1'; 71 | } 72 | 73 | // ... 74 | } 75 | 76 | You might want to add the new `strict_requirements` parameter to 77 | `framework.router` (it avoids fatal errors in the production environment when 78 | a link cannot be generated): 79 | 80 | framework: 81 | router: 82 | strict_requirements: "%kernel.debug%" 83 | 84 | You can even disable the requirements check on production with `null` as you should 85 | know that the parameters for URL generation always pass the requirements, e.g. by 86 | validating them beforehand. This additionally enhances performance. See 87 | [config_prod.yml](https://github.com/symfony/symfony-standard/blob/master/app/config/config_prod.yml). 88 | 89 | The `default_locale` parameter is now a setting of the main `framework` 90 | configuration (it was under the `framework.session` in 2.0): 91 | 92 | framework: 93 | default_locale: "%locale%" 94 | 95 | The `auto_start` setting under `framework.session` must be removed as it is 96 | not used anymore (the session is now always started on-demand). If 97 | `auto_start` was the only setting under the `framework.session` entry, don't 98 | remove it entirely, but set its value to `~` (`~` means `null` in YAML) 99 | instead: 100 | 101 | framework: 102 | session: ~ 103 | 104 | The `trust_proxy_headers` setting was added in the default configuration file 105 | (as it should be set to `true` when you install your application behind a 106 | reverse proxy): 107 | 108 | framework: 109 | trust_proxy_headers: false 110 | 111 | An empty `bundles` entry was added to the `assetic` configuration: 112 | 113 | assetic: 114 | bundles: [] 115 | 116 | The default `swiftmailer` configuration now has the `spool` setting configured 117 | to the `memory` type to defer email sending after the response is sent to the 118 | user (recommended for better end-user performance): 119 | 120 | swiftmailer: 121 | spool: { type: memory } 122 | 123 | The `jms_security_extra` configuration was moved to the `security.yml` 124 | configuration file. 125 | 126 | ### `app/config/config_dev.yml` 127 | 128 | An example of how to send all emails to a unique address was added: 129 | 130 | #swiftmailer: 131 | # delivery_address: me@example.com 132 | 133 | ### `app/config/config_test.yml` 134 | 135 | The `storage_id` setting must be changed to `session.storage.mock_file`: 136 | 137 | framework: 138 | session: 139 | storage_id: session.storage.mock_file 140 | 141 | ### `app/config/parameters.ini` 142 | 143 | The file has been converted to a YAML file which reads as follows: 144 | 145 | parameters: 146 | database_driver: pdo_mysql 147 | database_host: localhost 148 | database_port: ~ 149 | database_name: symfony 150 | database_user: root 151 | database_password: ~ 152 | 153 | mailer_transport: smtp 154 | mailer_host: localhost 155 | mailer_user: ~ 156 | mailer_password: ~ 157 | 158 | locale: en 159 | secret: ThisTokenIsNotSoSecretChangeIt 160 | 161 | Note that if you convert your parameters file to YAML, you must also change 162 | its reference in `app/config/config.yml`. 163 | 164 | ### `app/config/routing_dev.yml` 165 | 166 | The `_assetic` entry was removed: 167 | 168 | #_assetic: 169 | # resource: . 170 | # type: assetic 171 | 172 | ### `app/config/security.yml` 173 | 174 | Under `security.access_control`, the default rule for internal routes was changed: 175 | 176 | security: 177 | access_control: 178 | #- { path: ^/_internal/secure, roles: IS_AUTHENTICATED_ANONYMOUSLY, ip: 127.0.0.1 } 179 | 180 | Under `security.providers`, the `in_memory` example was updated to the following: 181 | 182 | security: 183 | providers: 184 | in_memory: 185 | memory: 186 | users: 187 | user: { password: userpass, roles: [ 'ROLE_USER' ] } 188 | admin: { password: adminpass, roles: [ 'ROLE_ADMIN' ] } 189 | 190 | ### `app/AppKernel.php` 191 | 192 | The following bundles have been added to the list of default registered bundles: 193 | 194 | new JMS\AopBundle\JMSAopBundle(), 195 | new JMS\DiExtraBundle\JMSDiExtraBundle($this), 196 | 197 | You must also rename the DoctrineBundle from: 198 | 199 | new Symfony\Bundle\DoctrineBundle\DoctrineBundle(), 200 | 201 | to: 202 | 203 | new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(), 204 | 205 | ### `web/app.php` 206 | 207 | The default `web/app.php` file now reads as follows: 208 | 209 | register(true); 222 | */ 223 | 224 | require_once __DIR__.'/../app/AppKernel.php'; 225 | //require_once __DIR__.'/../app/AppCache.php'; 226 | 227 | $kernel = new AppKernel('prod', false); 228 | $kernel->loadClassCache(); 229 | //$kernel = new AppCache($kernel); 230 | $request = Request::createFromGlobals(); 231 | $response = $kernel->handle($request); 232 | $response->send(); 233 | $kernel->terminate($request, $response); 234 | 235 | ### `web/app_dev.php` 236 | 237 | The default `web/app_dev.php` file now reads as follows: 238 | 239 | loadClassCache(); 265 | $request = Request::createFromGlobals(); 266 | $response = $kernel->handle($request); 267 | $response->send(); 268 | $kernel->terminate($request, $response); 269 | -------------------------------------------------------------------------------- /rabbitmq-sample/src/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | Require all denied 3 | 4 | 5 | Order deny,allow 6 | Deny from all 7 | 8 | -------------------------------------------------------------------------------- /rabbitmq-sample/src/RabbitMQ/SampleBundle/Command/TestCommand.php: -------------------------------------------------------------------------------- 1 | setName('sample:test') 22 | ->setDescription('Publishes a delayed message') 23 | ->addOption( 24 | 'delay', 25 | 'd', 26 | InputOption::VALUE_REQUIRED, 27 | 'Delay, in miliseconds.' 28 | ) 29 | ->addOption( 30 | 'routing-key', 31 | 'r', 32 | InputOption::VALUE_OPTIONAL, 33 | 'Routing key.', 34 | '' 35 | ) 36 | ; 37 | } 38 | 39 | /** 40 | * {@inheritdoc} 41 | */ 42 | protected function execute( InputInterface $input, OutputInterface $output ) 43 | { 44 | $producer = $this->getContainer()->get('delayed_producer'); 45 | 46 | $delay = (int) $input->getOption('delay'); 47 | 48 | $body = json_encode( array( 49 | 'time' => microtime( true ), 50 | 'delay' => $delay 51 | ) ); 52 | 53 | $producer->delayedPublish( $delay, $body, $input->getOption('routing-key') ); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /rabbitmq-sample/src/RabbitMQ/SampleBundle/Consumer/SampleConsumer.php: -------------------------------------------------------------------------------- 1 | body, true ); 13 | 14 | if( is_array( $payload ) && isset( $payload['time'] ) && isset( $payload['delay'] ) ) 15 | { 16 | $duration = ( microtime( true ) - $payload['time'] ) * 1000; 17 | printf( "Sent %d ms ago with delay %d.\n", $duration, $payload['delay'] ); 18 | } 19 | else 20 | { 21 | echo $msg->body . "\n"; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /rabbitmq-sample/src/RabbitMQ/SampleBundle/DependencyInjection/Configuration.php: -------------------------------------------------------------------------------- 1 | root('rabbit_mq_sample'); 22 | 23 | // Here you should define the parameters that are allowed to 24 | // configure your bundle. See the documentation linked above for 25 | // more information on that topic. 26 | 27 | return $treeBuilder; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /rabbitmq-sample/src/RabbitMQ/SampleBundle/DependencyInjection/RabbitMQSampleExtension.php: -------------------------------------------------------------------------------- 1 | processConfiguration($configuration, $configs); 24 | 25 | $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); 26 | $loader->load('services.yml'); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /rabbitmq-sample/src/RabbitMQ/SampleBundle/Producer/DelayedProducer.php: -------------------------------------------------------------------------------- 1 | connection = $connection; 16 | $this->destination_exchange = $destination_exchange; 17 | 18 | if( ! is_string( $prefix ) || strlen( $prefix ) > 60 ) 19 | throw new \UnexpectedValueException('Prefix should be a string of length <= 60.'); 20 | 21 | $this->prefix = $prefix; 22 | } 23 | 24 | public function delayedPublish( $delay, $msgBody, $routingKey = '', $additionalProperties = array() ) 25 | { 26 | if( ! is_integer( $delay ) || $delay < 0 ) 27 | throw new \UnexpectedValueException('Publish delay should be a positive integer.'); 28 | 29 | # expire the queue a little bit after the delay, but minimum 1 second 30 | $expiration = 1000 + floor( 1.1 * $delay ); 31 | 32 | $name = sprintf( '%s-exchange', $this->prefix ); 33 | $id = sprintf( '%s-waiting-queue-%s-%d', $this->prefix, $routingKey, $delay ); 34 | 35 | $producer = new Producer( $this->connection ); 36 | 37 | $producer->setExchangeOptions( array( 38 | 'name' => $name, 39 | 'type' => 'direct' 40 | ) ); 41 | 42 | $producer->setQueueOptions( array( 43 | 'name' => $id, 44 | 'routing_keys' => array( $id ), 45 | 'arguments' => array( 46 | 'x-message-ttl' => array( 'I', $delay ), 47 | 'x-dead-letter-exchange' => array( 'S', $this->destination_exchange ), 48 | 'x-dead-letter-routing-key' => array( 'S', $routingKey ), 49 | 'x-expires' => array( 'I', $expiration ) 50 | ) 51 | ) ); 52 | 53 | $producer->setupFabric(); 54 | 55 | $producer->publish( $msgBody, $id, $additionalProperties ); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /rabbitmq-sample/src/RabbitMQ/SampleBundle/RabbitMQSampleBundle.php: -------------------------------------------------------------------------------- 1 | 9 | RewriteEngine On 10 | 11 | # Determine the RewriteBase automatically and set it as environment variable. 12 | # If you are using Apache aliases to do mass virtual hosting or installed the 13 | # project in a subdirectory, the base path will be prepended to allow proper 14 | # resolution of the app.php file and to redirect to the correct URI. It will 15 | # work in environments without path prefix as well, providing a safe, one-size 16 | # fits all solution. But as you do not need it in this case, you can comment 17 | # the following 2 lines to eliminate the overhead. 18 | RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$ 19 | RewriteRule ^(.*) - [E=BASE:%1] 20 | 21 | # Sets the HTTP_AUTHORIZATION header removed by apache 22 | RewriteCond %{HTTP:Authorization} . 23 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 24 | 25 | # Redirect to URI without front controller to prevent duplicate content 26 | # (with and without `/app.php`). Only do this redirect on the initial 27 | # rewrite by Apache and not on subsequent cycles. Otherwise we would get an 28 | # endless redirect loop (request -> rewrite to front controller -> 29 | # redirect -> request -> ...). 30 | # So in case you get a "too many redirects" error or you always get redirected 31 | # to the start page because your Apache does not expose the REDIRECT_STATUS 32 | # environment variable, you have 2 choices: 33 | # - disable this feature by commenting the following 2 lines or 34 | # - use Apache >= 2.3.9 and replace all L flags by END flags and remove the 35 | # following RewriteCond (best solution) 36 | RewriteCond %{ENV:REDIRECT_STATUS} ^$ 37 | RewriteRule ^app\.php(/(.*)|$) %{ENV:BASE}/$2 [R=301,L] 38 | 39 | # If the requested filename exists, simply serve it. 40 | # We only want to let Apache serve files and not directories. 41 | RewriteCond %{REQUEST_FILENAME} -f 42 | RewriteRule .? - [L] 43 | 44 | # Rewrite all other queries to the front controller. 45 | RewriteRule .? %{ENV:BASE}/app.php [L] 46 | 47 | 48 | 49 | 50 | # When mod_rewrite is not available, we instruct a temporary redirect of 51 | # the start page to the front controller explicitly so that the website 52 | # and the generated links can still be used. 53 | RedirectMatch 302 ^/$ /app.php/ 54 | # RedirectTemp cannot be used instead 55 | 56 | 57 | -------------------------------------------------------------------------------- /rabbitmq-sample/web/app.php: -------------------------------------------------------------------------------- 1 | unregister(); 14 | $apcLoader->register(true); 15 | */ 16 | 17 | require_once __DIR__.'/../app/AppKernel.php'; 18 | //require_once __DIR__.'/../app/AppCache.php'; 19 | 20 | $kernel = new AppKernel('prod', false); 21 | $kernel->loadClassCache(); 22 | //$kernel = new AppCache($kernel); 23 | 24 | // When using the HttpCache, you need to call the method in your front controller instead of relying on the configuration parameter 25 | //Request::enableHttpMethodParameterOverride(); 26 | $request = Request::createFromGlobals(); 27 | $response = $kernel->handle($request); 28 | $response->send(); 29 | $kernel->terminate($request, $response); 30 | -------------------------------------------------------------------------------- /rabbitmq-sample/web/app_dev.php: -------------------------------------------------------------------------------- 1 | loadClassCache(); 17 | $request = Request::createFromGlobals(); 18 | $response = $kernel->handle($request); 19 | $response->send(); 20 | $kernel->terminate($request, $response); 21 | -------------------------------------------------------------------------------- /rabbitmq-sample/web/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oscherler/rabbitmq-delayed-sample/8f47c52d8091b925a3bc8bc3bd5c505b1362ee3e/rabbitmq-sample/web/apple-touch-icon.png -------------------------------------------------------------------------------- /rabbitmq-sample/web/config.php: -------------------------------------------------------------------------------- 1 | getFailedRequirements(); 20 | $minorProblems = $symfonyRequirements->getFailedRecommendations(); 21 | 22 | ?> 23 | 24 | 25 | 26 | 27 | 28 | Symfony Configuration 29 | 30 | 31 | 32 | 33 | 34 |
35 |
36 | 39 | 40 | 60 |
61 | 62 |
63 |
64 |
65 |

Welcome!

66 |

Welcome to your new Symfony project.

67 |

68 | This script will guide you through the basic configuration of your project. 69 | You can also do the same by editing the ‘app/config/parameters.yml’ file directly. 70 |

71 | 72 | 73 |

Major problems

74 |

Major problems have been detected and must be fixed before continuing:

75 |
    76 | 77 |
  1. getHelpHtml() ?>
  2. 78 | 79 |
80 | 81 | 82 | 83 |

Recommendations

84 |

85 | Additionally, toTo enhance your Symfony experience, 86 | it’s recommended that you fix the following: 87 |

88 |
    89 | 90 |
  1. getHelpHtml() ?>
  2. 91 | 92 |
93 | 94 | 95 | hasPhpIniConfigIssue()): ?> 96 |

* 97 | getPhpIniConfigPath()): ?> 98 | Changes to the php.ini file must be done in "getPhpIniConfigPath() ?>". 99 | 100 | To change settings, create a "php.ini". 101 | 102 |

103 | 104 | 105 | 106 |

Your configuration looks good to run Symfony.

107 | 108 | 109 | 118 |
119 |
120 |
121 |
Symfony Standard Edition
122 |
123 | 124 | 125 | -------------------------------------------------------------------------------- /rabbitmq-sample/web/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oscherler/rabbitmq-delayed-sample/8f47c52d8091b925a3bc8bc3bd5c505b1362ee3e/rabbitmq-sample/web/favicon.ico -------------------------------------------------------------------------------- /rabbitmq-sample/web/robots.txt: -------------------------------------------------------------------------------- 1 | # www.robotstxt.org/ 2 | # www.google.com/support/webmasters/bin/answer.py?hl=en&answer=156449 3 | 4 | User-agent: * 5 | -------------------------------------------------------------------------------- /vagrant/Vagrantfile: -------------------------------------------------------------------------------- 1 | # -*- mode: ruby -*- 2 | # vi: set ft=ruby : 3 | 4 | # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! 5 | VAGRANTFILE_API_VERSION = "2" 6 | 7 | Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| 8 | # All Vagrant configuration is done here. The most common configuration 9 | # options are documented and commented below. For a complete reference, 10 | # please see the online documentation at vagrantup.com. 11 | 12 | # Every Vagrant virtual environment requires a box to build off of. 13 | config.vm.box = "ubuntu-precise12042-x64-vbox43" 14 | 15 | # The url from where the 'config.vm.box' box will be fetched if it 16 | # doesn't already exist on the user's system. 17 | config.vm.box_url = "https://cloud-images.ubuntu.com/vagrant/precise/current/precise-server-cloudimg-amd64-vagrant-disk1.box" 18 | 19 | # Create a forwarded port mapping which allows access to a specific port 20 | # within the machine from a port on the host machine. In the example below, 21 | # accessing "localhost:8080" will access port 80 on the guest machine. 22 | # config.vm.network :forwarded_port, guest: 80, host: 8080 23 | config.vm.network :forwarded_port, guest: 15672, host: 15672 24 | 25 | # Create a private network, which allows host-only access to the machine 26 | # using a specific IP. 27 | config.vm.network :private_network, ip: "192.168.33.10" 28 | 29 | # Create a public network, which generally matched to bridged network. 30 | # Bridged networks make the machine appear as another physical device on 31 | # your network. 32 | # config.vm.network :public_network 33 | 34 | # If true, then any SSH connections made will enable agent forwarding. 35 | # Default value: false 36 | # config.ssh.forward_agent = true 37 | 38 | # Share an additional folder to the guest VM. The first argument is 39 | # the path on the host to the actual folder. The second argument is 40 | # the path on the guest to mount the folder. And the optional third 41 | # argument is a set of non-required options. 42 | # config.vm.synced_folder "../data", "/vagrant_data" 43 | config.vm.synced_folder "..", "/vagrant", type: "nfs" 44 | 45 | # Provider-specific configuration so you can fine-tune various 46 | # backing providers for Vagrant. These expose provider-specific options. 47 | # Example for VirtualBox: 48 | # 49 | # config.vm.provider :virtualbox do |vb| 50 | # # Don't boot with headless mode 51 | # vb.gui = true 52 | # 53 | # # Use VBoxManage to customize the VM. For example to change memory: 54 | # vb.customize ["modifyvm", :id, "--memory", "1024"] 55 | # end 56 | # 57 | # View the documentation for the provider you're using for more 58 | # information on available options. 59 | 60 | config.vm.provision "shell", inline: <<'INSTALL_RABBITMQ' 61 | # ensure add-apt-repository is installed 62 | dpkg --get-selections | grep python-software-properties || ( apt-get update ; apt-get -y install python-software-properties ) 63 | 64 | # add rabbitmq repository 65 | add-apt-repository "deb http://www.rabbitmq.com/debian/ testing main" 66 | wget -O - http://www.rabbitmq.com/rabbitmq-signing-key-public.asc | apt-key add - 67 | apt-get update 68 | 69 | # configure rabbitmq guest access 70 | mkdir -p /etc/rabbitmq 71 | echo "[{rabbit, [{loopback_users, []}]}]." > /etc/rabbitmq/rabbitmq.config 72 | 73 | # install rabbitmq 74 | apt-get -y install rabbitmq-server 75 | 76 | # enable management plugin 77 | rabbitmq-plugins enable rabbitmq_management 78 | INSTALL_RABBITMQ 79 | 80 | config.vm.provision "shell", inline: <<'INSTALL_APACHE' 81 | # install apache2 82 | apt-get -y install apache2.2-common apache2-mpm-prefork 83 | INSTALL_APACHE 84 | 85 | config.vm.provision "shell", inline: <<'INSTALL_PHP' 86 | # install php5 and curl extension 87 | apt-get -y install php5-common php5-cli libapache2-mod-php5 php5-curl 88 | 89 | # install composer 90 | wget -O - https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer 91 | INSTALL_PHP 92 | 93 | config.vm.provision "shell", inline: <<'CONFIGURE_APACHE' 94 | # stop apache and change run user 95 | service apache2 stop 96 | chown -R vagrant /var/lock/apache2 97 | sed -i.bak -E 's/(export\s+APACHE_RUN_(USER|GROUP)=)[^\s]+/\1vagrant/' /etc/apache2/envvars 98 | 99 | # enable mod_rewrite 100 | a2enmod rewrite 101 | 102 | # install and enable virtual host 103 | cp /vagrant/vagrant/vhost.conf /etc/apache2/sites-available/rabbitmq-sample 104 | a2ensite rabbitmq-sample 105 | 106 | # start apache 107 | service apache2 start 108 | CONFIGURE_APACHE 109 | 110 | config.vm.provision "shell", inline: <<'AUTO_CD' 111 | # add cd to project to .profile 112 | grep "cd /vagrant/rabbitmq-sample" /home/vagrant/.profile || ( echo cd /vagrant/rabbitmq-sample >> /home/vagrant/.profile ) 113 | echo 114 | AUTO_CD 115 | 116 | # Enable provisioning with Puppet stand alone. Puppet manifests 117 | # are contained in a directory path relative to this Vagrantfile. 118 | # You will need to create the manifests directory and a manifest in 119 | # the file base.pp in the manifests_path directory. 120 | # 121 | # An example Puppet manifest to provision the message of the day: 122 | # 123 | # # group { "puppet": 124 | # # ensure => "present", 125 | # # } 126 | # # 127 | # # File { owner => 0, group => 0, mode => 0644 } 128 | # # 129 | # # file { '/etc/motd': 130 | # # content => "Welcome to your Vagrant-built virtual machine! 131 | # # Managed by Puppet.\n" 132 | # # } 133 | # 134 | # config.vm.provision :puppet do |puppet| 135 | # puppet.manifests_path = "manifests" 136 | # puppet.manifest_file = "site.pp" 137 | # end 138 | 139 | # Enable provisioning with chef solo, specifying a cookbooks path, roles 140 | # path, and data_bags path (all relative to this Vagrantfile), and adding 141 | # some recipes and/or roles. 142 | # 143 | # config.vm.provision :chef_solo do |chef| 144 | # chef.cookbooks_path = "../my-recipes/cookbooks" 145 | # chef.roles_path = "../my-recipes/roles" 146 | # chef.data_bags_path = "../my-recipes/data_bags" 147 | # chef.add_recipe "mysql" 148 | # chef.add_role "web" 149 | # 150 | # # You may also specify custom JSON attributes: 151 | # chef.json = { :mysql_password => "foo" } 152 | # end 153 | 154 | # Enable provisioning with chef server, specifying the chef server URL, 155 | # and the path to the validation key (relative to this Vagrantfile). 156 | # 157 | # The Opscode Platform uses HTTPS. Substitute your organization for 158 | # ORGNAME in the URL and validation key. 159 | # 160 | # If you have your own Chef Server, use the appropriate URL, which may be 161 | # HTTP instead of HTTPS depending on your configuration. Also change the 162 | # validation key to validation.pem. 163 | # 164 | # config.vm.provision :chef_client do |chef| 165 | # chef.chef_server_url = "https://api.opscode.com/organizations/ORGNAME" 166 | # chef.validation_key_path = "ORGNAME-validator.pem" 167 | # end 168 | # 169 | # If you're using the Opscode platform, your validator client is 170 | # ORGNAME-validator, replacing ORGNAME with your organization name. 171 | # 172 | # If you have your own Chef Server, the default validation client name is 173 | # chef-validator, unless you changed the configuration. 174 | # 175 | # chef.validation_client_name = "ORGNAME-validator" 176 | end 177 | -------------------------------------------------------------------------------- /vagrant/vhost.conf: -------------------------------------------------------------------------------- 1 | 2 | ServerName rabbitmq-sample.ob 3 | 4 | DocumentRoot /vagrant/rabbitmq-sample/web 5 | 6 | 7 | Options Indexes FollowSymLinks MultiViews 8 | AllowOverride All 9 | Order allow,deny 10 | allow from all 11 | 12 | 13 | --------------------------------------------------------------------------------