Skip to content

Commit 1e62d28

Browse files
authored
Merge pull request #130 from php-enqueue/migrate-to-queue-interop
Migrate to queue interop
2 parents 74999e8 + 6344c86 commit 1e62d28

File tree

283 files changed

+530
-1949
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

283 files changed

+530
-1949
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ install:
5555

5656
script:
5757
# misssing pkg/amqp-ext pkg/job-queue pkg/redis
58-
- if [ "$PHPSTAN" = true ]; then php -d memory_limit=512M bin/phpstan analyse -l 1 -c phpstan.neon pkg/amqp-ext pkg/async-event-dispatcher pkg/dbal pkg/enqueue pkg/enqueue-bundle pkg/fs pkg/gearman pkg/job-queue pkg/null pkg/pheanstalk pkg/psr-queue pkg/redis pkg/simple-client pkg/sqs pkg/stomp pkg/test; fi
58+
- if [ "$PHPSTAN" = true ]; then php -d memory_limit=512M bin/phpstan analyse -l 1 -c phpstan.neon pkg/amqp-ext pkg/async-event-dispatcher pkg/dbal pkg/enqueue pkg/enqueue-bundle pkg/fs pkg/gearman pkg/job-queue pkg/null pkg/pheanstalk pkg/redis pkg/simple-client pkg/sqs pkg/stomp pkg/test; fi
5959
- if [ "$PHP_CS_FIXER" = true ]; then IFS=$'\n'; COMMIT_SCA_FILES=($(git diff --name-only --diff-filter=ACMRTUXB "${TRAVIS_COMMIT_RANGE}")); unset IFS; fi
6060
- if [ "$PHP_CS_FIXER" = true ]; then ./bin/php-cs-fixer fix --config=.php_cs.dist -v --dry-run --stop-on-violation --using-cache=no --path-mode=intersection -- "${COMMIT_SCA_FILES[@]}"; fi
6161
- if [ "$UNIT_TESTS" = true ]; then bin/phpunit --exclude-group=functional; fi

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This is where all development happens. The repository provides a friendly enviro
88
Features:
99

1010
* [Feature rich](docs/quick_tour.md).
11-
* [JMS](https://docs.oracle.com/javaee/7/api/javax/jms/package-summary.html) like transport [abstraction](https://github.com/php-enqueue/psr-queue).
11+
* Implements [JMS](https://docs.oracle.com/javaee/7/api/javax/jms/package-summary.html) like transports based on a[queue-interop](https://github.com/queue-interop/queue-interop) interfaces.
1212
* Supported transports [AMQP](docs/transport/amqp.md) (RabbitMQ, ActiveMQ), [Beanstalk](docs/transport/pheanstalk.md), [STOMP](docs/transport/stomp.md), [Amazon SQS](docs/transport/sqs.md), [Redis](docs/transport/redis.md), [Gearman](docs/transport/gearman.md), [Doctrine DBAL](docs/transport/dbal.md), [Filesystem](docs/transport/filesystem.md), [Null](docs/transport/null.md).
1313
* [Symfony bundle](https://github.com/php-enqueue/enqueue-dev/blob/master/docs/bundle/quick_tour.md)
1414
* [Magento1 extension](https://github.com/php-enqueue/enqueue-dev/blob/master/docs/magento/quick_tour.md)

bin/release

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ fi
1414

1515
CURRENT_BRANCH=`git rev-parse --abbrev-ref HEAD`
1616

17-
for REMOTE in origin psr-queue stomp amqp-ext pheanstalk gearman sqs fs redis dbal null enqueue simple-client enqueue-bundle job-queue test async-event-dispatcher
17+
for REMOTE in origin stomp amqp-ext pheanstalk gearman sqs fs redis dbal null enqueue simple-client enqueue-bundle job-queue test async-event-dispatcher
1818
do
1919
echo ""
2020
echo ""

bin/subtree-split

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ function remote()
4343
git remote add $1 $2 || true
4444
}
4545

46-
remote psr-queue git@github.com:php-enqueue/psr-queue.git
4746
remote enqueue git@github.com:php-enqueue/enqueue.git
4847
remote simple-client git@github.com:php-enqueue/simple-client.git
4948
remote stomp git@github.com:php-enqueue/stomp.git
@@ -60,7 +59,6 @@ remote job-queue git@github.com:php-enqueue/job-queue.git
6059
remote test git@github.com:php-enqueue/test.git
6160
remote async-event-dispatcher git@github.com:php-enqueue/async-event-dispatcher.git
6261

63-
split 'pkg/psr-queue' psr-queue
6462
split 'pkg/enqueue' enqueue
6563
split 'pkg/simple-client' simple-client
6664
split 'pkg/stomp' stomp

composer.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"minimum-stability": "stable",
55
"require": {
66
"php": ">=5.6",
7-
"enqueue/psr-queue": "*@dev",
87
"enqueue/enqueue": "*@dev",
98
"enqueue/stomp": "*@dev",
109
"enqueue/amqp-ext": "*@dev",
@@ -20,6 +19,8 @@
2019
"enqueue/simple-client": "*@dev",
2120
"enqueue/test": "*@dev",
2221
"enqueue/async-event-dispatcher": "*@dev",
22+
"queue-interop/queue-interop": "^0.5@dev",
23+
"queue-interop/queue-spec": "^0.5@dev",
2324

2425
"phpunit/phpunit": "^5",
2526
"doctrine/doctrine-bundle": "~1.2",
@@ -40,10 +41,6 @@
4041
"bin-dir": "bin"
4142
},
4243
"repositories": [
43-
{
44-
"type": "path",
45-
"url": "pkg/psr-queue"
46-
},
4744
{
4845
"type": "path",
4946
"url": "pkg/test"

docs/async_event_dispatcher/quick_tour.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ use Symfony\Component\EventDispatcher\EventDispatcher;
3333

3434
require_once __DIR__.'/vendor/autoload.php';
3535

36-
// it could be any other enqueue/psr-queue compatible context.
36+
// it could be any other queue-interop/queue-interop compatible context.
3737
$context = (new FsConnectionFactory('file://'.__DIR__.'/queues'))->createContext();
3838
$eventQueue = $context->createQueue('symfony_events');
3939

@@ -81,7 +81,7 @@ $dispatcher->dispatch('the_event', new GenericEvent('theSubject'));
8181

8282
// consume.php
8383

84-
use Enqueue\Psr\PsrProcessor;
84+
use Interop\Queue\PsrProcessor;
8585

8686
require_once __DIR__.'/vendor/autoload.php';
8787
include __DIR__.'/config.php';

docs/bundle/async_events.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ namespace AcmeBundle\Listener;
8888
8989
use Enqueue\Client\Message;
9090
use Enqueue\Consumption\Result;
91-
use Enqueue\Psr\PsrMessage;
91+
use Interop\Queue\PsrMessage;
9292
use Enqueue\Util\JSON;
9393
use Symfony\Component\EventDispatcher\Event;
9494
use Enqueue\AsyncEventDispatcher\EventTransformer;

docs/bundle/job_queue.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ Guaranty that there is only single job running with such name.
1414

1515
```php
1616
<?php
17-
use Enqueue\Psr\PsrMessage;
18-
use Enqueue\Psr\PsrProcessor;
19-
use Enqueue\Psr\PsrContext;
17+
use Interop\Queue\PsrMessage;
18+
use Interop\Queue\PsrProcessor;
19+
use Interop\Queue\PsrContext;
2020
use Enqueue\Util\JSON;
2121
use Enqueue\JobQueue\JobRunner;
2222
use Enqueue\JobQueue\Job;
@@ -57,9 +57,9 @@ use Enqueue\JobQueue\JobRunner;
5757
use Enqueue\JobQueue\Job;
5858
use Enqueue\Client\ProducerInterface;
5959
use Enqueue\Util\JSON;
60-
use Enqueue\Psr\PsrMessage;
61-
use Enqueue\Psr\PsrContext;
62-
use Enqueue\Psr\PsrProcessor;
60+
use Interop\Queue\PsrMessage;
61+
use Interop\Queue\PsrContext;
62+
use Interop\Queue\PsrProcessor;
6363

6464
class Step1Processor implements PsrProcessor
6565
{
@@ -140,9 +140,9 @@ use Enqueue\JobQueue\JobRunner;
140140
use Enqueue\JobQueue\Job;
141141
use Enqueue\JobQueue\DependentJobService;
142142
use Enqueue\Util\JSON;
143-
use Enqueue\Psr\PsrMessage;
144-
use Enqueue\Psr\PsrContext;
145-
use Enqueue\Psr\PsrProcessor;
143+
use Interop\Queue\PsrMessage;
144+
use Interop\Queue\PsrContext;
145+
use Interop\Queue\PsrProcessor;
146146

147147
class ReindexProcessor implements PsrProcessor
148148
{

docs/bundle/message_processor.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ It is handy to subscribe on event messages. It allows to keep subscription login
3636
namespace AppBundle\Async;
3737
3838
use Enqueue\Client\TopicSubscriberInterface;
39-
use Enqueue\Psr\PsrProcessor;
39+
use Interop\Queue\PsrProcessor;
4040
4141
class SayHelloProcessor implements PsrProcessor, TopicSubscriberInterface
4242
{
@@ -52,7 +52,7 @@ On the topic subscriber you can also define queue and processor name:
5252
```php
5353
<?php
5454
use Enqueue\Client\TopicSubscriberInterface;
55-
use Enqueue\Psr\PsrProcessor;
55+
use Interop\Queue\PsrProcessor;
5656
5757
class SayHelloProcessor implements PsrProcessor, TopicSubscriberInterface
5858
{
@@ -89,7 +89,7 @@ If you send a message using ProducerV2::sendCommand('aCommandName') method it wi
8989
namespace AppBundle\Async;
9090
9191
use Enqueue\Client\CommandSubscriberInterface;
92-
use Enqueue\Psr\PsrProcessor;
92+
use Interop\Queue\PsrProcessor;
9393
9494
class SayHelloProcessor implements PsrProcessor, CommandSubscriberInterface
9595
{
@@ -105,7 +105,7 @@ On the command subscriber you can also define additional settings such as queue
105105
```php
106106
<?php
107107
use Enqueue\Client\CommandSubscriberInterface;
108-
use Enqueue\Psr\PsrProcessor;
108+
use Interop\Queue\PsrProcessor;
109109
110110
class SayHelloProcessor implements PsrProcessor, CommandSubscriberInterface
111111
{
@@ -124,7 +124,7 @@ In the container you can just add the tag `enqueue.client.message_processor` and
124124
```php
125125
<?php
126126
use Enqueue\Client\CommandSubscriberInterface;
127-
use Enqueue\Psr\PsrProcessor;
127+
use Interop\Queue\PsrProcessor;
128128
129129
class SayHelloProcessor implements PsrProcessor, CommandSubscriberInterface
130130
{

docs/bundle/quick_tour.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ To consume messages you have to first create a message processor:
7272

7373
```php
7474
<?php
75-
use Enqueue\Psr\PsrMessage;
76-
use Enqueue\Psr\PsrContext;
77-
use Enqueue\Psr\PsrProcessor;
75+
use Interop\Queue\PsrMessage;
76+
use Interop\Queue\PsrContext;
77+
use Interop\Queue\PsrProcessor;
7878
use Enqueue\Client\TopicSubscriberInterface;
7979

8080
class FooProcessor implements PsrProcessor, TopicSubscriberInterface

0 commit comments

Comments
 (0)