diff --git a/.gitignore b/.gitignore index e22b4623..a0372101 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,6 @@ /vendor composer.lock .phpstorm.meta.php -phpunit.xml \ No newline at end of file +phpunit.xml +/nbproject/private/ +/nbproject diff --git a/Dockerfile b/Dockerfile new file mode 100755 index 00000000..f633fe61 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,24 @@ +FROM php:7.1 + +RUN apt-get update && apt-get install -y libfreetype6-dev \ + libjpeg62-turbo-dev \ + libmcrypt-dev \ + libpng-dev \ + libpq-dev \ + git \ + zip \ + && docker-php-ext-install zip \ + && docker-php-ext-install pdo bcmath \ + && docker-php-ext-install -j$(nproc) iconv mcrypt \ + && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \ + && docker-php-ext-install -j$(nproc) gd +# Install xdebug +RUN pecl install xdebug && docker-php-ext-enable xdebug + +RUN apt-get install -y libssl-dev +#PHP Composer +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer + + +#COPY . /var/www/html +WORKDIR /var/www/html diff --git a/composer.json b/composer.json index e2d75bcd..6452d4c1 100644 --- a/composer.json +++ b/composer.json @@ -1,11 +1,11 @@ { - "name": "vladimir-yuldashev/laravel-queue-rabbitmq", + "name": "filkhedma/laravel-queue-rabbitmq", "description": "RabbitMQ driver for Laravel Queue", "license": "MIT", "authors": [ { - "name": "Vladimir Yuldashev", - "email": "misterio92@gmail.com" + "name": "Mostafa Saeed", + "email": "msaeed@filkhedma.com" } ], "require": { diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100755 index 00000000..e9b6d0cd --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,15 @@ +version: '3.2' +services: +#-------------------------------------------------------------------------- +# PHP Service +#-------------------------------------------------------------------------- + rabbitmq_php: + container_name: rabbitmq_php + build: + context: . + dockerfile: ./Dockerfile + volumes: + - type: bind + source: . + target: /var/www/html + command: composer install diff --git a/src/Queue/Connectors/RabbitMQConnector.php b/src/Queue/Connectors/RabbitMQConnector.php index 8e8e0232..f8267c51 100644 --- a/src/Queue/Connectors/RabbitMQConnector.php +++ b/src/Queue/Connectors/RabbitMQConnector.php @@ -60,7 +60,7 @@ public function connect(array $config): Queue ]); if ($factory instanceof DelayStrategyAware) { - $factory->setDelayStrategy(new RabbitMqDlxDelayStrategy()); + $factory->setDelayStrategy(new RabbitMqDelayPluginDelayStrategy()); } /** @var AmqpContext $context */