Skip to content

Commit

Permalink
Merge branch 'master' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
noname007 authored Mar 2, 2025
2 parents 46ed009 + 8f4c350 commit 3efc50f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Yii2 Queue Extension Change Log
2.3.8 under development
-----------------------

- no changes in this release.
- Bug #522: Fix SQS driver type error with custom value passed to `queue/listen` (flaviovs)


2.3.7 April 29, 2024
Expand Down
20 changes: 10 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,31 @@ help: ## Display help information

build: ## Build an image from a docker-compose file. Params: {{ v=5.6 }}. Default latest PHP 5.6
@cp -n .env.example .env
PHP_VERSION=$(filter-out $@,$(v)) docker-compose up -d --build
PHP_VERSION=$(filter-out $@,$(v)) docker compose up -d --build

test: ## Run tests. Params: {{ v=5.6 }}. Default latest PHP 5.6
PHP_VERSION=$(filter-out $@,$(v)) docker-compose build --pull yii2-queue-php
PHP_VERSION=$(filter-out $@,$(v)) docker-compose run yii2-queue-php vendor/bin/phpunit --colors=always -v --debug
PHP_VERSION=$(filter-out $@,$(v)) docker compose build --pull yii2-queue-php
PHP_VERSION=$(filter-out $@,$(v)) docker compose run yii2-queue-php vendor/bin/phpunit --colors=always -v --debug
make down

down: ## Stop and remove containers, networks
docker-compose down
docker compose down

benchmark: ## Run benchmark. Params: {{ v=5.6 }}. Default latest PHP 5.6
PHP_VERSION=$(filter-out $@,$(v)) docker-compose build --pull yii2-queue-php
PHP_VERSION=$(filter-out $@,$(v)) docker-compose run yii2-queue-php tests/yii benchmark/waiting
PHP_VERSION=$(filter-out $@,$(v)) docker compose build --pull yii2-queue-php
PHP_VERSION=$(filter-out $@,$(v)) docker compose run yii2-queue-php tests/yii benchmark/waiting
make down

sh: ## Enter the container with the application
docker exec -it yii2-queue-php bash

check-cs:
docker-compose build php72
docker-compose run php72 php-cs-fixer fix --diff --dry-run
docker-compose down
docker compose build php72
docker compose run php72 php-cs-fixer fix --diff --dry-run
docker compose down

clean:
docker-compose down
docker compose down
rm -rf tests/runtime/*
rm -f .php_cs.cache
rm -rf composer.lock
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "yiisoft/yii2-queue",
"description": "Yii2 Queue Extension which supported DB, Redis, RabbitMQ, Beanstalk, SQS and Gearman",
"description": "Yii2 Queue Extension which supports queues based on DB, Redis, RabbitMQ, Beanstalk, SQS, and Gearman",
"type": "yii2-extension",
"keywords": ["yii", "queue", "async", "gii", "db", "redis", "rabbitmq", "beanstalk", "gearman", "sqs"],
"license": "BSD-3-Clause",
Expand Down
2 changes: 2 additions & 0 deletions src/drivers/sqs/Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ public function actionListen($timeout = 3)
if (!is_numeric($timeout)) {
throw new Exception('Timeout must be numeric.');
}
$timeout = (int) $timeout;

if ($timeout < 1 || $timeout > 20) {
throw new Exception('Timeout must be between 1 and 20');
}
Expand Down

0 comments on commit 3efc50f

Please sign in to comment.