File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,11 +37,6 @@ cache:
3737 - $HOME/.composer/cache
3838
3939install :
40- - git clone https://github.com/edenhill/librdkafka.git $HOME/librdkafka
41- - cd $HOME/librdkafka && git checkout v0.11.0-RC2 && ./configure && make && sudo make install
42- - pecl install rdkafka
43- - cd $TRAVIS_BUILD_DIR
44-
4540 - rm $HOME/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini;
4641 - echo "memory_limit=2048M" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
4742 - composer require symfony/symfony:${SYMFONY_VERSION} --no-update
@@ -51,7 +46,6 @@ install:
5146 - if [ "$FUNCTIONAL_TESTS" = true ]; then bin/dev -b; fi
5247
5348script :
54- # misssing pkg/amqp-ext pkg/job-queue pkg/redis
5549 - 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 pkg/rdkafka; fi
5650 - if [ "$PHP_CS_FIXER" = true ]; then IFS=$'\n'; COMMIT_SCA_FILES=($(git diff --name-only --diff-filter=ACMRTUXB "${TRAVIS_COMMIT_RANGE}")); unset IFS; fi
5751 - 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
Original file line number Diff line number Diff line change 3737 "phpstan/phpstan" : " ^0.7.0"
3838 },
3939 "autoload" : {
40- "files" : [" pkg/enqueue/functions_include.php" ]
40+ "files" : [
41+ " pkg/enqueue/functions_include.php" ,
42+ " pkg/rdkafka/Tests/bootstrap.php"
43+ ],
44+ "psr-0" : {
45+ "RdKafka" : " vendor/kwn/php-rdkafka-stubs/stubs"
46+ },
47+ "psr-4" : {
48+ "RdKafka\\ " : " vendor/kwn/php-rdkafka-stubs/stubs/RdKafka"
49+ }
4150 },
4251 "config" : {
4352 "bin-dir" : " bin"
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ if (extension_loaded ('rdkafka ' )) {
4+ return ;
5+ }
6+
7+ $ kafkaStubsDir = __DIR__ .'/../vendor/kwh/php-rdkafka-stubs ' ;
8+ if (false == file_exists ($ kafkaStubsDir )) {
9+ $ kafkaStubsDir = __DIR__ .'/../../../vendor/kwn/php-rdkafka-stubs ' ;
10+ if (false == file_exists ($ kafkaStubsDir )) {
11+ throw new \LogicException ('The kafka extension is not loaded and stubs could not be found as well ' );
12+ }
13+ }
14+
15+ include_once $ kafkaStubsDir .'/stubs/constants.php ' ;
16+ include_once $ kafkaStubsDir .'/stubs/functions.php ' ;
Original file line number Diff line number Diff line change 3030 " /Tests/"
3131 ]
3232 },
33+ "autoload-dev" : {
34+ "files" : [
35+ " Tests/bootstrap.php"
36+ ],
37+ "psr-0" : {
38+ "RdKafka" : " vendor/kwn/php-rdkafka-stubs/stubs"
39+ },
40+ "psr-4" : {
41+ "RdKafka\\ " : " vendor/kwn/php-rdkafka-stubs/stubs/RdKafka"
42+ }
43+ },
3344 "suggest" : {
3445 "enqueue/enqueue" : " If you'd like to use advanced features like Client abstract layer or Symfony integration features"
3546 },
You can’t perform that action at this time.
0 commit comments