Skip to content

Fix ping to check each connection, not only first one #649

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 589 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
589 commits
Select commit Hold shift + click to select a range
9fd20c2
Multiple transport support. Container based approach.
makasim Oct 2, 2018
f2d26f1
[STOMP] make getStomp public
versh23 Oct 3, 2018
1a8e44e
add test
versh23 Oct 3, 2018
3f5e9c3
fix
versh23 Oct 3, 2018
17337e3
phpcs
versh23 Oct 3, 2018
d5984eb
Merge pull request #552 from versh23/stomp-public
makasim Oct 3, 2018
fce6c46
Make cli commands multi transport\client.
makasim Oct 4, 2018
389b5ce
Merge pull request #548 from php-enqueue/consumer-multiple-transport-…
makasim Oct 4, 2018
75095cb
[consumption] Rework QueueConsumer extension points.
makasim Oct 4, 2018
52c4cb9
[consumption] fix onStart extension tests.
makasim Oct 5, 2018
754cd77
[consumption] Add preSubscribe extension point.
makasim Oct 5, 2018
490c62b
Fix tests.
makasim Oct 5, 2018
dd32103
[consumption] Add preConsume extension point, remove beforeReceive.
makasim Oct 5, 2018
83bd77d
[consumption] onPreReceived -> onMessageReceived
makasim Oct 7, 2018
e74b9f1
[consumption] use custom MessageResutl context on onResult.
makasim Oct 8, 2018
5faac4f
[consumption] Introduce ProcessorException extension point. Split Ext…
makasim Oct 8, 2018
c2e5d02
[consumption] add already_ack result, queue consumer does nothing on it.
makasim Oct 8, 2018
2ec051d
[consumption] post message received
makasim Oct 8, 2018
91abc46
remove idle_time.
makasim Oct 8, 2018
6783f04
[consumption] onIdle -> onPostConsume
makasim Oct 8, 2018
c31f8b4
[consumption] Remove onInterrupted. Add onEnd. Remove context object …
makasim Oct 8, 2018
7fc8cca
[consumption] Implement only required extension interfaces. Remvoe Em…
makasim Oct 8, 2018
98dd6b5
Merge pull request #554 from php-enqueue/queue-consumer-extensions
makasim Oct 8, 2018
10e05d6
[consumption] add InitLogger extension point. Before start.
makasim Oct 8, 2018
9ad9bc2
[consumption] Add LogExtension.
makasim Oct 8, 2018
d93da58
[consumption][client] Add client aware log extension.
makasim Oct 8, 2018
0b30496
fix tests.
makasim Oct 8, 2018
fced817
[simple-client] Register log extension.
makasim Oct 8, 2018
0362766
Merge pull request #555 from php-enqueue/loging-improvements
makasim Oct 9, 2018
2861bd5
[client] Move services definition to ClientFactory.
makasim Oct 9, 2018
d3ac383
Update supported_brokers.md
edgji Oct 10, 2018
7e01340
Merge pull request #558 from edgji/patch-1
makasim Oct 11, 2018
97de2f5
Fixed exception message in testThrowErrorIfServiceDoesNotImplementPro…
rosamarsky Oct 12, 2018
d3a087d
Merge pull request #559 from rosamarsky/fix-exception-message-in-test
makasim Oct 12, 2018
102cc03
Merge remote-tracking branch 'origin/0.8'
makasim Oct 16, 2018
02659a5
Dbal Subscription Consumer feature
rosamarsky Oct 17, 2018
460f1d7
Remove deprecated testcase implementation
samnela Oct 17, 2018
63ee2fc
MongoDB Subscription Consumer feature
rosamarsky Oct 17, 2018
314e790
Renamed named constructor of DbalMessage
rosamarsky Oct 18, 2018
d86e9cd
Merge pull request #564 from samnela/remove-deprecated-testcase
makasim Oct 18, 2018
b3d26f6
Replaced DbalMessage::fromArrrayDbResult() with DbalContext::convertM…
rosamarsky Oct 18, 2018
e57a76c
Replaced MongodbMessage::fromArrrayDbResult() with MongodbContext::co…
rosamarsky Oct 18, 2018
948000b
Fixing composer.json to require enqueue/dsn
adumas37 Oct 18, 2018
607780b
Merge pull request #566 from adumas37/fx-enqueue-require-dsn
makasim Oct 18, 2018
fa41a17
Replaced constructor with owned method createMessage() in DbalContext.
rosamarsky Oct 18, 2018
d049817
Replaced constructor with owned method createMessage() in MongodbCont…
rosamarsky Oct 18, 2018
b8ab683
Merge branch 'master' into move-services-to-client-factory
makasim Oct 18, 2018
348e9e4
fixes https://github.com/php-enqueue/enqueue-dev/issues/557
rosamarsky Oct 18, 2018
0fd466c
Merge pull request #567 from rosamarsky/fix-kafka-consuming
makasim Oct 18, 2018
4eab59c
Added Subscription consumer to docs
rosamarsky Oct 18, 2018
5abf4dc
[client][bundle] Move client configuration to ClientFactory.
makasim Oct 18, 2018
1c9f591
Added usleep 200ms when no messages are recieved
rosamarsky Oct 18, 2018
d0ea85f
Added usleep 200ms when no messages are recieved
rosamarsky Oct 18, 2018
4a62957
Added Subscription consumer to docs
rosamarsky Oct 18, 2018
6233667
Merge pull request #565 from rosamarsky/mongodb-subscription-consumer
makasim Oct 18, 2018
a4392ca
Merge pull request #563 from rosamarsky/dbal-subscription-consumer
makasim Oct 18, 2018
fe8101f
Merge pull request #556 from php-enqueue/move-services-to-client-factory
makasim Oct 18, 2018
af1ac04
Merge branch '0.8'
makasim Oct 19, 2018
3ae4d49
Update quick_tour.md
luceos Oct 19, 2018
85e1e15
Merge pull request #569 from luceos/patch-1
makasim Oct 19, 2018
ed46b62
[client] Move client config to the factory.
makasim Oct 21, 2018
7c26ed1
Merge pull request #571 from php-enqueue/move-client-config-to-factory
makasim Oct 21, 2018
811d0d8
[client] Rename resource key factoryClass -> driverClass
makasim Oct 21, 2018
c67c6b7
[bundle] configure multiple transports.
makasim Oct 21, 2018
181740d
Make build processor registyry pass support multi transports.
makasim Oct 21, 2018
057aeda
Merge pull request #572 from php-enqueue/bundle-multi-transport-confi…
makasim Oct 21, 2018
7b8e1d5
Added index for queue field in the enqueue collection
rosamarsky Oct 22, 2018
b6387e9
[client] migrate passes.
makasim Oct 22, 2018
07af0c5
[client] migrate passes.
makasim Oct 22, 2018
e5211ea
Removed predis from composer.json
rosamarsky Oct 22, 2018
08a20a5
[client] migrate passes.
makasim Oct 22, 2018
a230cf4
[client] migrate passes.
makasim Oct 22, 2018
09bbfdb
[client] migrate passes.
makasim Oct 22, 2018
4f3c115
Merge pull request #574 from rosamarsky/add-index-to-mongodb-collection
makasim Oct 22, 2018
564826c
Merge branch '0.8'
makasim Oct 22, 2018
ada1cd4
[doc][skip ci] update laravel doc.
makasim Oct 22, 2018
f31f1d7
Changed exception message
rosamarsky Oct 22, 2018
3274656
Merge pull request #577 from php-enqueue/client-passes-migration
makasim Oct 22, 2018
ff65828
Merge pull request #576 from rosamarsky/remove-phpredis-dependency-fr…
makasim Oct 22, 2018
b63dcc8
fix redis tests
ASKozienko Oct 23, 2018
c0df39e
Merge pull request #578 from php-enqueue/fix-redis
makasim Oct 23, 2018
f99c2c1
wamp
ASKozienko Oct 22, 2018
5e2d4ef
wamp
ASKozienko Oct 22, 2018
99778d7
wamp
ASKozienko Oct 22, 2018
a512b53
wamp
ASKozienko Oct 23, 2018
18273bf
wamp
ASKozienko Oct 23, 2018
49538de
wamp
ASKozienko Oct 23, 2018
3d406cc
wamp
ASKozienko Oct 23, 2018
3364d61
wamp
ASKozienko Oct 23, 2018
ba418ad
wamp
ASKozienko Oct 23, 2018
24f8f90
wamp
ASKozienko Oct 23, 2018
715bb7f
wamp
ASKozienko Oct 23, 2018
74c1339
wamp
ASKozienko Oct 23, 2018
3ebdb43
wamp
ASKozienko Oct 23, 2018
11d1e3e
Merge pull request #573 from php-enqueue/wamp
makasim Oct 24, 2018
45ead91
fix redis tests
ASKozienko Oct 24, 2018
c00b753
Update wamp.md
makasim Oct 24, 2018
c34dc71
Merge pull request #582 from php-enqueue/fix-redis
makasim Oct 24, 2018
4ca285f
redis new implementation
ASKozienko Oct 26, 2018
404fae1
Do not export non source files
webmake Oct 27, 2018
d0c1a5d
Merge pull request #588 from webmake/master
makasim Oct 27, 2018
e420a55
[doc][skip ci] Add WAMP transport to README
makasim Oct 28, 2018
a25f83e
redis new implementation
ASKozienko Oct 29, 2018
b626b11
redis new implementation
ASKozienko Oct 29, 2018
50379c7
redis new implementation
ASKozienko Oct 29, 2018
7716a82
redis new implementation
ASKozienko Oct 29, 2018
3681e17
redis new implementation
ASKozienko Oct 29, 2018
c641c2a
Introduce redelivery support based on visibility approach
rosamarsky Oct 23, 2018
5f4ef90
Consumer minor fixes
rosamarsky Oct 29, 2018
a22fd46
[doc][skip ci] Add supporting section
makasim Oct 29, 2018
29af667
Merge pull request #595 from php-enqueue/makasim-patch-1
makasim Oct 29, 2018
fe18383
Update README.md
makasim Oct 29, 2018
8e364ca
[skip ci] add badges
makasim Oct 29, 2018
5615d56
redis new implementation
ASKozienko Oct 30, 2018
9d45b78
fix amp
ASKozienko Oct 30, 2018
66a1774
Merge pull request #585 from php-enqueue/redis
makasim Oct 30, 2018
0cb41ff
Merge branch '0.8'
makasim Oct 30, 2018
dfc6768
Merge pull request #597 from php-enqueue/fix-wamp
makasim Oct 30, 2018
6532d1e
Updated docs
rosamarsky Oct 30, 2018
10f507d
Moved common logic to trait
rosamarsky Oct 30, 2018
697d951
Fixed message deleting in consumer
rosamarsky Oct 30, 2018
41823bf
United methods in trait. Covered by transaction
rosamarsky Oct 30, 2018
03c40ab
Added write lock
rosamarsky Oct 30, 2018
50f3f07
Fixes.
rosamarsky Oct 30, 2018
e43a063
Fixed docs. Removed prefix Psr
yurez Oct 31, 2018
16a9490
Merge pull request #603 from yurez/master
makasim Oct 31, 2018
239161b
Deleting of expired messages
rosamarsky Oct 31, 2018
dee836c
Merge pull request #581 from rosamarsky/dbal-subscription-consumer-im…
makasim Oct 31, 2018
321e105
Fix comment about queue deletion
a-ast Oct 31, 2018
da0b24d
Merge pull request #604 from a-ast/patch-1
makasim Nov 1, 2018
e97a338
metrics
ASKozienko Nov 1, 2018
207b472
metrics
ASKozienko Nov 1, 2018
5b62fd1
metrics
ASKozienko Nov 2, 2018
d4d0f17
monitoring
ASKozienko Nov 2, 2018
df11f07
monitoring
ASKozienko Nov 2, 2018
5b22555
monitoring
ASKozienko Nov 2, 2018
95d6b72
[client][bundle] Take queue prefix into account while queue binding.
makasim Nov 3, 2018
7ae7fc3
Merge pull request #611 from php-enqueue/fix-client-consume-command
makasim Nov 3, 2018
c44b7c0
[fs] Use enqueue/dsn to parse DSN
makasim Nov 3, 2018
d604329
[dsn] add more octal tests
makasim Nov 3, 2018
42ec298
Merge pull request #612 from php-enqueue/fs-use-dsn
makasim Nov 3, 2018
96718fd
[doc][skip ci] Add doc for DSN parser.
makasim Nov 3, 2018
2e9fb0b
[skip ci][doc] Update link
makasim Nov 3, 2018
76f6583
[dbal] Use concurrent fetch message approach (no transaction, no pess…
makasim Nov 3, 2018
1b0c325
[dbal] fix remove expired messages.
makasim Nov 5, 2018
95c3659
compatibility with 0.8x
ASKozienko Nov 5, 2018
4747256
[dbal] Optimize query so an index is used, not filesort.
makasim Nov 5, 2018
c638694
compatibility with 0.8x
ASKozienko Nov 5, 2018
38c4d7f
monitoring
ASKozienko Nov 5, 2018
287b0b6
fixes
makasim Nov 5, 2018
b3d04a0
Merge pull request #616 from php-enqueue/compatibility-with-08
makasim Nov 5, 2018
5316a97
make delivery_id field binary, review indexes.
makasim Nov 5, 2018
1e5ad2c
Merge remote-tracking branch 'origin/0.8' into merge-08
ASKozienko Nov 6, 2018
3465a66
Merge pull request #617 from php-enqueue/merge-08
makasim Nov 6, 2018
09e148c
[dbal] fix tests.
makasim Nov 6, 2018
e850546
Merge remote-tracking branch 'origin/master' into metrics
ASKozienko Nov 6, 2018
77458a2
monitoring
ASKozienko Nov 6, 2018
65fed18
monitoring
ASKozienko Nov 6, 2018
d5d0a98
monitoring
ASKozienko Nov 6, 2018
77febe7
[doc][skip ci] Add sponsoring section.
makasim Nov 6, 2018
24d8b31
Merge pull request #618 from php-enqueue/sponsoring
makasim Nov 6, 2018
dec922e
[docs][skip ci] Add sponsoring to docs.
makasim Nov 6, 2018
2445ef2
use uuid v4 to prevent collisions
makasim Nov 6, 2018
15749bd
xMerge remote-tracking branch 'origin/metrics' into doc-moniotoring
makasim Nov 6, 2018
2f6e902
add driver send result
ASKozienko Nov 7, 2018
f08e2af
add driver send result
ASKozienko Nov 7, 2018
471d3e8
monitoring
ASKozienko Nov 7, 2018
170bf32
enqueue client extension interface segregation
ASKozienko Nov 7, 2018
cb43aec
enqueue client extension interface segregation
ASKozienko Nov 7, 2018
1edbf7d
monitoring
ASKozienko Nov 7, 2018
78f9526
monitoring
ASKozienko Nov 7, 2018
9e3ad98
Merge remote-tracking branch 'origin/metrics' into doc-moniotoring
makasim Nov 7, 2018
a7124d3
Add context services to locator
Gnucki Nov 7, 2018
e1a0042
[monitoring] Add docs.
makasim Nov 7, 2018
dbeef43
Merge pull request #623 from Gnucki/add-context-services-to-locator
makasim Nov 7, 2018
88fa8aa
add image.
makasim Nov 7, 2018
564ce45
Merge remote-tracking branch 'origin/metrics' into metrics
ASKozienko Nov 7, 2018
bbd54e7
[docs][skip ci] Update link
makasim Nov 7, 2018
062f0a8
Merge pull request #606 from php-enqueue/metrics
makasim Nov 7, 2018
c465116
Update README.md
makasim Nov 7, 2018
094b446
Update README.md
makasim Nov 8, 2018
6fc8d30
Avoid receiveNoWait when only one subscriber
deguif Nov 8, 2018
572310f
Merge pull request #626 from deguif/master
makasim Nov 8, 2018
5729f6c
removed some dots
OskarStark Nov 9, 2018
611954e
Merge pull request #627 from OskarStark/patch-1
makasim Nov 9, 2018
d58622b
multi client configuration
ASKozienko Nov 9, 2018
564448f
Update index.md
makasim Nov 12, 2018
b322101
multi client configuration
ASKozienko Nov 12, 2018
3e9a367
multi client configuration
ASKozienko Nov 12, 2018
9acc6eb
multi client configuration
ASKozienko Nov 13, 2018
bbc342f
multi client configuration
ASKozienko Nov 13, 2018
263949a
multi client configuration
ASKozienko Nov 13, 2018
6e0cab6
multi client configuration
ASKozienko Nov 13, 2018
fe05a60
better readability
OskarStark Nov 13, 2018
9bc6693
Merge pull request #632 from OskarStark/patch-2
makasim Nov 13, 2018
7c486c5
multi client configuration
ASKozienko Nov 13, 2018
152e9ca
multi client configuration
ASKozienko Nov 14, 2018
d43798b
multi client configuration
ASKozienko Nov 14, 2018
bc0071d
multi client configuration
ASKozienko Nov 14, 2018
3e4d486
multi client configuration
ASKozienko Nov 15, 2018
6a84f65
multi client configuration
ASKozienko Nov 15, 2018
39bcab2
multi client configuration
ASKozienko Nov 15, 2018
a4f5524
multi client configuration
ASKozienko Nov 15, 2018
cec8fb3
multi client configuration
ASKozienko Nov 15, 2018
8b44199
multi client configuration
ASKozienko Nov 15, 2018
1351930
multi client configuration
ASKozienko Nov 15, 2018
8d38bb2
Merge pull request #628 from php-enqueue/multi-client-configuration
makasim Nov 15, 2018
18a3f67
add moniotoring to sub tree split.
makasim Nov 15, 2018
2fd6cc2
[doc][skip ci] Update EnqueuBundle config reference
makasim Nov 15, 2018
1f96246
Merge pull request #613 from php-enqueue/dbal-concurent-fetch
makasim Nov 15, 2018
d5c497c
multi client configuration
ASKozienko Nov 15, 2018
5ca13f5
Merge remote-tracking branch 'origin/master' into multi-client-config…
ASKozienko Nov 15, 2018
0afd9ca
multi client configuration
ASKozienko Nov 15, 2018
431ed59
Fix wrong exceptions in transports
FrankGiesecke Nov 15, 2018
15e9260
multi client configuration
ASKozienko Nov 15, 2018
0842340
multi client configuration
ASKozienko Nov 15, 2018
7fb8ac3
Merge pull request #637 from FrankGiesecke/635-fix-wrong-exceptions-i…
makasim Nov 15, 2018
134b603
multi client configuration
ASKozienko Nov 15, 2018
2a7d75a
multi client configuration
ASKozienko Nov 15, 2018
1db3a2e
multi client configuration
ASKozienko Nov 15, 2018
8bdc8df
fix monitoring tests.
makasim Nov 15, 2018
a25506e
Merge pull request #636 from php-enqueue/multi-client-configuration
makasim Nov 15, 2018
c30bf3d
Update monitoring.md
makasim Nov 15, 2018
16a5218
multi client configuration
ASKozienko Nov 16, 2018
ea0a50c
multi client configuration
ASKozienko Nov 16, 2018
a781b3c
multi client configuration
ASKozienko Nov 16, 2018
0f3096e
multi client configuration
ASKozienko Nov 16, 2018
db7c6bd
[dbal] handle gracefully concurancy issues.
makasim Nov 16, 2018
9a182c1
Merge pull request #639 from php-enqueue/multi-client-configuration
makasim Nov 16, 2018
815083c
Merge pull request #640 from php-enqueue/dbal-do-not-fail-on-consumption
makasim Nov 16, 2018
b617dea
[bundle] Add BC for topic\command subscribers.
makasim Nov 16, 2018
53962b9
fix tests.
makasim Nov 16, 2018
301522f
[dbal] Use RetryableException, wrap fetchMessage exception to it too.
makasim Nov 16, 2018
1739ea5
Merge pull request #641 from php-enqueue/add-bc-topic-command-subsrib…
makasim Nov 16, 2018
c8936f8
Merge pull request #642 from php-enqueue/dbal-use-retryable-exception
makasim Nov 16, 2018
0d57187
[dsn] Cluster DSN
makasim Nov 17, 2018
728bf1c
always return query bag on getArray.
makasim Nov 17, 2018
1af223d
fix
makasim Nov 17, 2018
7f70319
Merge remote-tracking branch 'origin/master' into merge08
makasim Nov 19, 2018
9c8a399
remove unrelated changes.
makasim Nov 19, 2018
79b5cf5
remove unrelated changes.
makasim Nov 19, 2018
9e44afe
Merge pull request #644 from php-enqueue/merge08
makasim Nov 19, 2018
ec2ffbb
Merge remote-tracking branch 'origin/master' into dsn-cluster
makasim Nov 20, 2018
84bd457
fix tests.
makasim Nov 20, 2018
fa06187
Merge pull request #643 from php-enqueue/dsn-cluster
makasim Nov 20, 2018
e7f64ae
Rework DriverFactory, add separator option to Client Config.
makasim Nov 21, 2018
01f00d8
[client] update rabbitmq stomp driver configuration
makasim Nov 21, 2018
dab2bc4
[doc] update config ref.
makasim Nov 21, 2018
973ac0f
Merge pull request #646 from php-enqueue/driver-factory-rework
makasim Nov 21, 2018
72d4097
Fix ping to check each connection, not only first one
Nov 22, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 4 additions & 1 deletion .php_cs.dist → .php_cs.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,12 @@
'phpdoc_order' => true,
'psr4' => true,
'strict_param' => true,
'native_function_invocation' => false,
))
->setCacheFile(getenv('TRAVIS') ? getenv('HOME') . '/php-cs-fixer/.php-cs-fixer' : __DIR__.'/var/.php_cs.cache')
->setFinder(
PhpCsFixer\Finder::create()
->name('/\.php$/')
->in(__DIR__)
)
;
;
51 changes: 24 additions & 27 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
sudo: required

git:
depth: 10

Expand All @@ -8,61 +6,60 @@ language: php
matrix:
include:
- php: 7.1
env: SYMFONY_VERSION=3.0.* PHPSTAN=true
- php: 7.1
env: SYMFONY_VERSION=3.0.* PHP_CS_FIXER=true
- php: 7.0
env: SYMFONY_VERSION=2.8.* UNIT_TESTS=true
- php: 7.0
env: SYMFONY_VERSION=3.0.* UNIT_TESTS=true
sudo: false
env: SYMFONY_VERSION=3.4.* PHPSTAN=true
- php: 7.1
env: SYMFONY_VERSION=4.0.* UNIT_TESTS=true
sudo: false
env: SYMFONY_VERSION=3.4.* PHP_CS_FIXER=true
- php: 7.1
sudo: false
env: SYMFONY_VERSION=3.4.* UNIT_TESTS=true
- php: 7.2
services: docker
env: SYMFONY_VERSION=2.8.* FUNCTIONAL_TESTS=true PREPARE_CONTAINER=true
- php: 7.1
services: docker
env: SYMFONY_VERSION=3.0.* FUNCTIONAL_TESTS=true PREPARE_CONTAINER=true
- php: 7.1
services: docker
env: SYMFONY_VERSION=3.2.* FUNCTIONAL_TESTS=true PREPARE_CONTAINER=true
sudo: false
env: SYMFONY_VERSION=4.0.* UNIT_TESTS=true
- php: 7.2
sudo: false
env: SYMFONY_VERSION=4.0.* UNIT_TESTS=true
- php: 7.1
services: docker
env: SYMFONY_VERSION=3.3.* FUNCTIONAL_TESTS=true PREPARE_CONTAINER=true
sudo: required
env: SYMFONY_VERSION=3.4.* FUNCTIONAL_TESTS=true PREPARE_CONTAINER=true
- php: 7.1
sudo: required
services: docker
env: SYMFONY_VERSION=4.0.* FUNCTIONAL_TESTS=true PREPARE_CONTAINER=true
- php: 7.1
sudo: required
services: docker
env: SYMFONY_VERSION=3.3.* RDKAFKA_TESTS=true PREPARE_CONTAINER=true
env: SYMFONY_VERSION=3.4.* RDKAFKA_TESTS=true PREPARE_CONTAINER=true
allow_failures:
- env: SYMFONY_VERSION=3.3.* RDKAFKA_TESTS=true PREPARE_CONTAINER=true
- env: SYMFONY_VERSION=3.4.* RDKAFKA_TESTS=true PREPARE_CONTAINER=true

cache:
directories:
- $HOME/.composer/cache
- $HOME/php-cs-fixer

before_install:
- echo "extension = mongodb.so" >> $HOME/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- echo "extension = redis.so" >> $HOME/.phpenv/versions/$(phpenv version-name)/etc/php.ini

install:
- rm $HOME/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini;
- echo "memory_limit=2048M" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- composer require symfony/symfony:${SYMFONY_VERSION} --no-update
- php ./bin/fix-symfony-version.php "$SYMFONY_VERSION"
- composer install
- if [ "$PREPARE_CONTAINER" = true ]; then docker --version; fi
- if [ "$PREPARE_CONTAINER" = true ]; then docker-compose --version; fi
- if [ "$PREPARE_CONTAINER" = true ]; then bin/dev -b; fi

script:
- if [ "$PHPSTAN" = true ]; then composer require "phpstan/phpstan:^0.8" ; php -d memory_limit=512M bin/phpstan analyse -l 1 -c phpstan.neon pkg/gps 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 pkg/rdkafka; fi
- if [ "$PHP_CS_FIXER" = true ]; then IFS=$'\n'; COMMIT_SCA_FILES=($(git diff --name-only --diff-filter=ACMRTUXB "${TRAVIS_COMMIT_RANGE}")); unset IFS; fi
- 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
- PKG_PHP_CHANGED_FILES=`./bin/git-find-changed-php-files.sh "${TRAVIS_COMMIT_RANGE}"`
- if [ "$PHP_CS_FIXER" = true ] && [ ! -z "${PKG_PHP_CHANGED_FILES}" ]; then ./bin/php-cs-fixer fix --config=.php_cs.php --no-interaction --dry-run --diff -v --path-mode=intersection -- ${PKG_PHP_CHANGED_FILES[@]} ; fi
- if [ "$PHPSTAN" = true ] && [ ! -z "${PKG_PHP_CHANGED_FILES}" ]; then docker run --workdir="/mqdev" -v "`pwd`:/mqdev" --rm enqueue/dev:latest php -d memory_limit=1024M bin/phpstan analyse -l 1 -c phpstan.neon -- ${PKG_PHP_CHANGED_FILES[@]} ; fi
- if [ "$UNIT_TESTS" = true ]; then bin/phpunit --exclude-group=functional; fi
- if [ "$FUNCTIONAL_TESTS" = true ]; then bin/run-fun-test.sh --exclude-group=rdkafka; fi
- if [ "RDKAFKA_TESTS" = true ]; then bin/run-fun-test.sh --group=rdkafka; fi
- if [ "$FUNCTIONAL_TESTS" = true ]; then bin/test.sh --exclude-group=rdkafka; fi
- if [ "RDKAFKA_TESTS" = true ]; then bin/test.sh --group=rdkafka; fi

notifications:
webhooks:
Expand Down
8 changes: 8 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Contributing
------------

Enqueue is an open source, community-driven project.

If you'd like to contribute, please read the following documents:

* [Contribution](docs/contribution.md)
40 changes: 31 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,48 @@
<p align="center"><img width="700" src="https://github.com/php-enqueue/logos/blob/master/Enqueue%20logo.png" alt="Enqueue logo" /></p>

<p align="center">
<a href="https://gitter.im/php-enqueue/Lobby"><img src="https://badges.gitter.im/php-enqueue/Lobby.svg" alt="Enqueue Chat"></a>
<a href="https://travis-ci.org/php-enqueue/enqueue-dev"><img src="https://travis-ci.org/php-enqueue/enqueue-dev.png?branch=master" alt="Build Status"></a>
<a href="https://packagist.org/packages/enqueue/enqueue/stats"><img src="https://poser.pugx.org/enqueue/enqueue/d/total.png?branch=master" alt="Total Downloads"></a>
<a href="https://packagist.org/packages/enqueue/enqueue"><img src="https://poser.pugx.org/enqueue/enqueue/version.png" alt="Latest Stable Version"></a>
<a href="./LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="License"></a>
</p>

<h2 align="center">Supporting Enqueue</h2>

Enqueue is an MIT-licensed open source project with its ongoing development made possible entirely by the support of community and our customers. If you'd like to join them, please consider:

- [Become a sponsor](https://www.patreon.com/makasim)
- [Become our client](http://forma-pro.com/)

---

## Introduction

**Enqueue** is production ready, battle-tested messaging solution for PHP. Provides a common way for programs to create, send, read messages.

This is a main development repository. It provides a friendly environment for productive development and testing of all Enqueue related features&packages.

[![Gitter](https://badges.gitter.im/php-enqueue/Lobby.svg)](https://gitter.im/php-enqueue/Lobby)
[![Build Status](https://travis-ci.org/php-enqueue/enqueue-dev.png?branch=master)](https://travis-ci.org/php-enqueue/enqueue-dev)
[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)

Features:

* [Feature rich](docs/quick_tour.md).

* Adopts [queue interoperable](https://github.com/queue-interop/queue-interop) interfaces (inspired by [Java JMS](https://docs.oracle.com/javaee/7/api/javax/jms/package-summary.html)).
* Battle-tested. Used in production.
* Supported transports
* [AMQP(s)](docs/transport/amqp.md) based on [PHP AMQP extension](https://github.com/pdezwart/php-amqp).
* [AMQP(s)](docs/transport/amqp.md) based on [PHP AMQP extension](https://github.com/pdezwart/php-amqp)
[![Build Status](https://travis-ci.org/php-enqueue/amqp-ext.png?branch=master)](https://travis-ci.org/php-enqueue/amqp-ext)
[![Total Downloads](https://poser.pugx.org/enqueue/amqp-ext/d/total.png)](https://packagist.org/packages/enqueue/amqp-ext/stats)
[![Latest Stable Version](https://poser.pugx.org/enqueue/amqp-ext/version.png)](https://packagist.org/packages/enqueue/amqp-ext)
* [AMQP](docs/transport/amqp_bunny.md) based on [bunny](https://github.com/jakubkulhan/bunny).
* [AMQP](docs/transport/amqp_bunny.md) based on [bunny](https://github.com/jakubkulhan/bunny)
[![Build Status](https://travis-ci.org/php-enqueue/amqp-bunny.png?branch=master)](https://travis-ci.org/php-enqueue/amqp-bunny)
[![Total Downloads](https://poser.pugx.org/enqueue/amqp-bunny/d/total.png)](https://packagist.org/packages/enqueue/amqp-bunny/stats)
[![Latest Stable Version](https://poser.pugx.org/enqueue/amqp-bunny/version.png)](https://packagist.org/packages/enqueue/amqp-bunny)
* [AMQP(s)](docs/transport/amqp_lib.md) based on [php-amqplib](https://github.com/php-amqplib/php-amqplib).
* [AMQP(s)](docs/transport/amqp_lib.md) based on [php-amqplib](https://github.com/php-amqplib/php-amqplib)
[![Build Status](https://travis-ci.org/php-enqueue/amqp-lib.png?branch=master)](https://travis-ci.org/php-enqueue/amqp-lib)
[![Total Downloads](https://poser.pugx.org/enqueue/amqp-lib/d/total.png)](https://packagist.org/packages/enqueue/amqp-lib/stats)
[![Latest Stable Version](https://poser.pugx.org/enqueue/amqp-lib/version.png)](https://packagist.org/packages/enqueue/amqp-lib)
* [Beanstalk](docs/transport/pheanstalk.md).
* [Beanstalk](docs/transport/pheanstalk.md)
[![Build Status](https://travis-ci.org/php-enqueue/pheanstalk.png?branch=master)](https://travis-ci.org/php-enqueue/pheanstalk)
[![Total Downloads](https://poser.pugx.org/enqueue/pheanstalk/d/total.png)](https://packagist.org/packages/enqueue/pheanstalk/stats)
[![Latest Stable Version](https://poser.pugx.org/enqueue/pheanstalk/version.png)](https://packagist.org/packages/enqueue/pheanstalk)
Expand Down Expand Up @@ -65,7 +82,11 @@ Features:
[![Build Status](https://travis-ci.org/php-enqueue/mongodb.png?branch=master)](https://travis-ci.org/php-enqueue/mongodb)
[![Total Downloads](https://poser.pugx.org/enqueue/mongodb/d/total.png)](https://packagist.org/packages/enqueue/mongodb/stats)
[![Latest Stable Version](https://poser.pugx.org/enqueue/mongodb/version.png)](https://packagist.org/packages/enqueue/mongodb)
* [Null](docs/transport/null.md).
* [WAMP](docs/transport/wamp.md)
[![Build Status](https://travis-ci.org/php-enqueue/wamp.png?branch=master)](https://travis-ci.org/php-enqueue/wamp)
[![Total Downloads](https://poser.pugx.org/enqueue/wamp/d/total.png)](https://packagist.org/packages/enqueue/wamp/stats)
[![Latest Stable Version](https://poser.pugx.org/enqueue/wamp/version.png)](https://packagist.org/packages/enqueue/wamp)
* [Null](docs/transport/null.md)
[![Build Status](https://travis-ci.org/php-enqueue/null.png?branch=master)](https://travis-ci.org/php-enqueue/null)
[![Total Downloads](https://poser.pugx.org/enqueue/null/d/total.png)](https://packagist.org/packages/enqueue/null/stats)
[![Latest Stable Version](https://poser.pugx.org/enqueue/null/version.png)](https://packagist.org/packages/enqueue/null)
Expand All @@ -77,6 +98,7 @@ Features:
* [Yii2. Amqp driver](docs/yii/amqp_driver.md)
* [Message bus](docs/quick_tour.md#client) support.
* [RPC over MQ](docs/quick_tour.md#remote-procedure-call-rpc) support.
* [Monitoring](docs/monitoring.md)
* Temporary queues support.
* Well designed, decoupled and reusable components.
* Carefully tested (unit & functional).
Expand Down
5 changes: 3 additions & 2 deletions bin/build-rabbitmq-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
set -e
set -x

(cd docker && docker build --rm --force-rm --no-cache --pull --squash --tag "enqueue/rabbitmq:latest" -f Dockerfile.rabbitmq .)
(cd docker && docker build --rm --force-rm --no-cache --pull --squash --tag "enqueue/rabbitmq-local-build" -f Dockerfile."$1"-rabbitmq .)
(cd docker && docker login --username="$DOCKER_USER" --password="$DOCKER_PASSWORD")
(cd docker && docker push "enqueue/rabbitmq:latest")
(cd docker && docker tag enqueue/rabbitmq-local-build enqueue/rabbitmq:"$1")
(cd docker && docker push "enqueue/rabbitmq:$1")
14 changes: 14 additions & 0 deletions bin/fix-symfony-version.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php

if (empty($argv[1])) {
throw new \LogicException('The new symfony version must be provided');
}

$newVersion = $argv[1];

$composer = file_get_contents(__DIR__.'/../composer.json');

$updatedComposer = preg_replace('/"symfony\/(.*)": ".*"/', '"symfony/$1": "'.$newVersion.'"', $composer).PHP_EOL;
echo $updatedComposer.PHP_EOL;

file_put_contents(__DIR__.'/../composer.json', $updatedComposer);
15 changes: 15 additions & 0 deletions bin/git-find-changed-php-files.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash

if (( "$#" != 1 ))
then
echo "Git range must be provided"
exit 1
fi


IFS='
'
ALL_CHANGED_FILES=$(git diff --name-only --diff-filter=ACMRTUXB "$1");
PKG_PHP_CHANGED_FILES=$(echo "$ALL_CHANGED_FILES" | grep -E "^pkg\/" | grep -E ".*?\.php$");

echo "$PKG_PHP_CHANGED_FILES";
85 changes: 51 additions & 34 deletions bin/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ function getFilesToFix()
return (bool) preg_match('/\.(php|twig|translations\/*.yml)$/', $file);
});

echo sprintf('Found %s staged files', count($stagedFiles)).PHP_EOL;
$stagedFiles = array_filter($stagedFiles, function ($file) {
return (bool) preg_match('/^pkg\//', $file);
});

return $stagedFiles;
}
Expand All @@ -77,18 +79,18 @@ function runPhpLint()
{
global $phpBin, $projectRootDir;

$filesWithErrors = array();
$output = [];
foreach (getFilesToFix() as $file) {
$output = '';
$commandOutput = null;
$returnCode = null;
exec(sprintf('%s -l %s 2>/dev/null', $phpBin, $projectRootDir.'/'.$file), $output, $returnCode);
exec(sprintf('%s -l %s', $phpBin, $projectRootDir.'/'.$file), $commandOutput, $returnCode);

if ($returnCode) {
$filesWithErrors[] = $file;
$output[] = $commandOutput;
}
}

return $filesWithErrors;
return $output;
}

function runPhpCsFixer()
Expand All @@ -101,56 +103,71 @@ function runPhpCsFixer()
}

$filesWithErrors = array();
foreach (getFilesToFix() as $file) {
$output = '';
$returnCode = null;
$output = '';
$returnCode = null;

exec(sprintf(
'%s %s fix --config=.php_cs.php --dry-run --no-interaction --path-mode=intersection -- %s',
$phpBin,
$phpCsFixerBin,
implode(' ', getFilesToFix())
), $output, $returnCode);

if ($returnCode) {
exec(sprintf(
'%s %s fix %s --dry-run',
'%s %s fix --config=.php_cs.php --no-interaction -v --path-mode=intersection -- %s',
$phpBin,
$phpCsFixerBin,
$projectRootDir.'/'.$file
), $output, $returnCode);
implode(' ', getFilesToFix())
), $output);
}

if ($returnCode) {
$output = '';
return $returnCode;
}

exec(sprintf(
'%s %s fix %s',
$phpBin,
$phpCsFixerBin,
$projectRootDir.'/'.$file
), $output);
function runPhpstan()
{
$output = '';
$returnCode = null;

$filesWithErrors[] = $file;
}
}
exec(sprintf(
'docker run --workdir="/mqdev" -v "`pwd`:/mqdev" --rm enqueue/dev:latest php -d memory_limit=1024M bin/phpstan analyse -l 1 -c phpstan.neon %s',
implode(' ', getFilesToFix())
), $output, $returnCode);

return $filesWithErrors;
return $returnCode ? $output : false;
}

echo sprintf('Found %s staged files', count(getFilesToFix())).PHP_EOL;

$phpSyntaxErrors = runPhpLint();
if ($phpSyntaxErrors) {
echo "Php syntax errors were found in next files:" . PHP_EOL;

foreach ($phpSyntaxErrors as $error) {
echo $error . PHP_EOL;
foreach ($phpSyntaxErrors as $phpSyntaxErrors) {
echo array_walk_recursive($phpSyntaxErrors, function($item) {
echo $item.PHP_EOL;
}) . PHP_EOL;
}

exit(1);
}

$phpCSFixerErrors = runPhpCsFixer();
if ($phpCSFixerErrors) {
$phpCSFixed = runPhpCsFixer();
if ($phpCSFixed) {
echo "Incorrect coding standards were detected and fixed." . PHP_EOL;
echo "Please stash changes and run commit again." . PHP_EOL;
echo "List of changed files:" . PHP_EOL;

foreach ($phpCSFixerErrors as $error) {
echo $error . PHP_EOL;
}
exit(1);
}

$phpStanErrors = runPhpstan();
if ($phpStanErrors) {
echo array_walk_recursive($phpStanErrors, function($item) {
echo $item.PHP_EOL;
}) . PHP_EOL;
echo PHP_EOL;

exit(1);
}

exit(0);
exit(0);
6 changes: 0 additions & 6 deletions bin/run-fun-test.sh

This file was deleted.

Loading