Skip to content

Commit fcb6caf

Browse files
Charles-Eric GorronCharles-Eric Gorron
authored andcommitted
Change supported Symfony versions and update README. fixes #231
1 parent 20d6a6c commit fcb6caf

File tree

3 files changed

+24
-35
lines changed

3 files changed

+24
-35
lines changed

.travis.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ matrix:
1212
- php: hhvm
1313

1414
env:
15-
- SYMFONY_VERSION="2.1.*"
16-
- SYMFONY_VERSION="2.2.*"
1715
- SYMFONY_VERSION="2.3.*"
1816
- SYMFONY_VERSION="2.4.*"
1917
- SYMFONY_VERSION="2.5.*"

README.md

Lines changed: 18 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ This bundle was presented at [Symfony Live Paris 2011](http://www.symfony-live.c
2525

2626
## Installation ##
2727

28-
### For Symfony >= 2.1.* ###
28+
### For Symfony Framework >= 2.3 ###
2929

3030
Require the bundle in your composer.json file:
3131

@@ -58,40 +58,31 @@ $ composer update oldsound/rabbitmq-bundle
5858
5959
Enjoy !
6060
61-
### For Symfony 2.0.* ###
61+
### For a console application that uses Symfony Console, Dependency Injection and Config components ###
6262
63-
The following instructions have been tested on a project created with the [Symfony2 Standard 2.0.6](http://symfony.com/download?v=Symfony_Standard_2.0.6.tgz)
63+
If you have a console application used to run RabbitMQ consumers, you do not need Symfony HttpKernel and FrameworkBundle.
64+
From version 1.6, you can use the Dependency Injection component to load this bundle configuration and services, and then use the consumer command.
6465
65-
Put the RabbitMqBundle and the [php-amqplib](http://github.com/videlalvaro/php-amqplib) library into the deps file:
66-
67-
```ini
68-
[RabbitMqBundle]
69-
git=http://github.com/videlalvaro/RabbitMqBundle.git
70-
target=/bundles/OldSound/RabbitMqBundle
66+
Require the bundle in your composer.json file:
7167
72-
[php-amqplib]
73-
git=http://github.com/videlalvaro/php-amqplib.git
74-
target=videlalvaro/php-amqplib
68+
````
69+
{
70+
"require": {
71+
"oldsound/rabbitmq-bundle": "~1.6",
72+
}
73+
}
7574
```
7675
77-
Register the bundle and library namespaces in the `app/autoload.php` file:
76+
Register the extension and the compiler pass:
7877
7978
```php
80-
$loader->registerNamespaces(array(
81-
'OldSound' => __DIR__.'/../vendor/bundles',
82-
'PhpAmqpLib' => __DIR__.'/../vendor/videlalvaro/php-amqplib',
83-
));
84-
```
79+
use OldSound\RabbitMqBundle\DependencyInjection\OldSoundRabbitMqExtension;
80+
use OldSound\RabbitMqBundle\DependencyInjection\Compiler\RegisterPartsPass;
8581
86-
Add the RabbitMqBundle to your application's kernel:
82+
// ...
8783
88-
```php
89-
public function registerBundles()
90-
{
91-
$bundles = array(
92-
new OldSound\RabbitMqBundle\OldSoundRabbitMqBundle(),
93-
);
94-
}
84+
$containerBuilder->registerExtension(new OldSoundRabbitMqExtension());
85+
$containerBuilder->addCompilerPass(new RegisterPartsPass());
9586
```
9687

9788
### Warning - BC Breaking Changes ###
@@ -520,7 +511,7 @@ Be aware that all queues are under the same exchange, it's up to you to set the
520511
The `queues_provider` is a optional service that dynamically provides queues.
521512
It must implement `QueuesProviderInterface`.
522513

523-
Be aware that queues providers are responsible for the proper calls to `setDequeuer` and that callbacks are callables
514+
Be aware that queues providers are responsible for the proper calls to `setDequeuer` and that callbacks are callables
524515
(not `ConsumerInterface`). In case service providing queues implements `DequeuerAwareInterface`, a call to
525516
`setDequeuer` is added to the definition of the service with a `DequeuerInterface` currently being a `MultipleConsumer`.
526517

composer.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
}],
1010
"require": {
1111
"php" : ">=5.3.0",
12-
"symfony/dependency-injection" : "~2.1",
13-
"symfony/event-dispatcher" : "~2.1",
14-
"symfony/config" : "~2.1",
15-
"symfony/yaml" : "~2.1",
16-
"symfony/console" : "~2.1",
12+
"symfony/dependency-injection" : "~2.3",
13+
"symfony/event-dispatcher" : "~2.3",
14+
"symfony/config" : "~2.3",
15+
"symfony/yaml" : "~2.3",
16+
"symfony/console" : "~2.3",
1717
"videlalvaro/php-amqplib" : "~2.4.0"
1818
},
1919
"suggest": {
@@ -22,7 +22,7 @@
2222
"require-dev": {
2323
"symfony/serializer": "~2.3",
2424
"symfony/debug" : "~2.3",
25-
"phpunit/phpunit" : ">=3.7.20"
25+
"phpunit/phpunit" : ">=3.7.0"
2626
},
2727
"extra": {
2828
"branch-alias": {

0 commit comments

Comments
 (0)