Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
/.github
/.gitignore
/.php_cs.cache
/.travis.yml
/composer.lock
/tests/runtime/*
/vendor
12 changes: 3 additions & 9 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
# Ignore all test and documentation for archive
/.github export-ignore
.* export-ignore
*.dist export-ignore
*.xml export-ignore
/docs export-ignore
/tests export-ignore
/.dockerignore export-ignore
/.editorconfig export-ignore
/.env.example export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.php_cs export-ignore
/Makefile export-ignore
/phpunit.xml.dist export-ignore
/support export-ignore
/psalm.xml export-ignore
/stubs export-ignore
6 changes: 4 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: build

on:
Expand Down Expand Up @@ -30,7 +31,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [ '8.2', '8.3' ]
php: [ '8.3', '8.4', '8.5' ]
steps:
- name: Checkout.
uses: actions/checkout@v2
Expand All @@ -39,6 +40,7 @@ jobs:
run: make test v=${{ matrix.php }}

- name: Upload coverage to Codecov.
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v5
with:
files: ./coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
3 changes: 2 additions & 1 deletion .github/workflows/static.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
on:
pull_request:
paths-ignore:
Expand Down Expand Up @@ -32,7 +33,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [ '8.2', '8.3', '8.4' ]
php: [ '8.3', '8.4', '8.5' ]
steps:
- name: Checkout.
uses: actions/checkout@v2
Expand Down
124 changes: 0 additions & 124 deletions .php_cs

This file was deleted.

32 changes: 18 additions & 14 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,26 @@ Yii2 Queue Extension Change Log

3.0.0 under development
---
- The minimum supported PHP version is 8.2
- Added PSALM for static code analysis. Error level set to 1
- Added strict typing
- The `pda/pheanstalk` package of the Beanstalk driver has been updated to version 5.*
- Removed deprecated interfaces `RetryableJob`, `Job`, `Serializer`
- Removed deprecated classes `Signal`, `Verbose`
- Deprecated driver amqp has been removed
- Returned tests for the SQS driver
- All dependent packages for supported drivers have been updated to the latest versions
- The `opis/closure` package did not support PHP 8.1 and was replaced by the `laravel/serializable-closure` package

2.3.8 under development
-----------------------
- Enh #516: Ensure Redis driver messages are consumed at least once (soul11201)
- The minimum supported PHP version is 8.3 (@s1lver)
- Added PSALM for static code analysis. Error level set to 1 (@s1lver)
- Added strict typing (@s1lver)
- The `pda/pheanstalk` package of the Beanstalk driver has been updated to version 8.* (@s1lver)
- Removed deprecated interfaces `RetryableJob`, `Job`, `Serializer` (@s1lver)
- Removed deprecated classes `Signal`, `Verbose` (@s1lver)
- Deprecated driver amqp has been removed (@s1lver)
- Returned tests for the SQS driver (@s1lver)
- All dependent packages for supported drivers have been updated to the latest versions (@s1lver)
- The `opis/closure` package did not support PHP 8.1 and was replaced by the `laravel/serializable-closure` package (@s1lver)

2.3.8 January 08, 2026
----------------------

- Bug #522: Fix SQS driver type error with custom value passed to `queue/listen` (flaviovs)
- Bug #528: Prevent multiple execution of aborted jobs (luke-)
- Bug #538: Fix type hint for previous parameter in `InvalidJobException` class constructor in PHP `8.4` (implicitly marking parameter nullable) (terabytesoftw)
- Enh #493: Pass environment variables to sub-processes (mgrechanik)
- Enh #516: Ensure Redis driver messages are consumed at least once (soul11201)


2.3.7 April 29, 2024
--------------------
Expand Down
15 changes: 10 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,29 +1,34 @@
help: ## Display help information
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'

build: ## Build an image from a docker-compose file. Params: {{ v=8.2 }}. Default latest PHP 8.2
@cp -n .env.example .env
build: ## Build an image from a docker-compose file. Params: {{ v=8.3 }}. Default latest PHP 8.3
@if [ ! -f .env ]; then \
cp .env.example .env; \
echo "Created .env file from .env.example"; \
else \
echo ".env file already exists, skipping creation"; \
fi
PHP_VERSION=$(filter-out $@,$(v)) docker compose up -d --build
make create-sqs-queue
make create-sqs-fifo-queue

test: ## Run tests. Params: {{ v=8.2 }}. Default latest PHP 8.2
test: ## Run tests. Params: {{ v=8.3 }}. Default latest PHP 8.3
make build
PHP_VERSION=$(filter-out $@,$(v)) docker compose run yii2-queue-php vendor/bin/phpunit --coverage-clover coverage.xml
make down

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

benchmark: ## Run benchmark. Params: {{ v=8.2 }}. Default latest PHP 8.2
benchmark: ## Run benchmark. Params: {{ v=8.3 }}. Default latest PHP 8.3
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 sh

static-analyze: ## Run code static analyze. Params: {{ v=8.2 }}. Default latest PHP 8.2
static-analyze: ## Run code static analyze. Params: {{ v=8.3 }}. Default latest PHP 8.3
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/psalm --config=psalm.xml --shepherd --stats --php-version=$(v)
make down
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,15 @@ Documentation is at [docs/guide/README.md](docs/guide/README.md).
[![Latest Stable Version](https://poser.pugx.org/yiisoft/yii2-queue/v/stable.svg)](https://packagist.org/packages/yiisoft/yii2-queue)
[![Total Downloads](https://poser.pugx.org/yiisoft/yii2-queue/downloads.svg)](https://packagist.org/packages/yiisoft/yii2-queue)
[![Build Status](https://github.com/yiisoft/yii2-queue/workflows/build/badge.svg)](https://github.com/yiisoft/yii2-queue/actions)

## Requirements

- PHP 8.2 or higher.
[![Static status](https://github.com/yiisoft/yii2-queue/workflows/static%20analysis/badge.svg)](https://github.com/yiisoft/yii2-queue/actions?query=workflow%3A%22static+analysis%22)
[![codecov](https://codecov.io/gh/yiisoft/yii2-queue/graph/badge.svg)](https://codecov.io/gh/yiisoft/yii2-queue)

Installation
------------

> [!IMPORTANT]
> - The minimum required [PHP](https://www.php.net/) version is PHP `8.3`.

The preferred way to install this extension is through [composer](https://getcomposer.org/download/):

```
Expand Down
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,23 @@
"docs": "https://github.com/yiisoft/yii2-queue/blob/master/docs/guide"
},
"require": {
"php": ">=8.2",
"yiisoft/yii2": "~2.0.50",
"php": ">=8.3",
"yiisoft/yii2": "~2.0.54",
"symfony/process": "^7.0",
"laravel/serializable-closure": "^v1.3.0"
"laravel/serializable-closure": "^v2.0.0"
},
"require-dev": {
"phpunit/phpunit": "^10.3.0",
"yiisoft/yii2-redis": "~2.0.0",
"yiisoft/yii2-redis": "~2.1.0",
"yiisoft/yii2-debug": "~2.1.0",
"yiisoft/yii2-gii": "~2.2.0",
"php-amqplib/php-amqplib": "^3.0.0",
"enqueue/amqp-lib": "^0.10.0",
"enqueue/amqp-bunny": "^0.10.0",
"enqueue/amqp-ext": "^0.10.8",
"enqueue/stomp": "^0.10.0",
"pda/pheanstalk": "^5.0.0",
"aws/aws-sdk-php": "3.285.0",
"pda/pheanstalk": "^8.0.0",
"aws/aws-sdk-php": "^3.369.0",
"vimeo/psalm": "^6.0.0"
},
"suggest": {
Expand Down
2 changes: 2 additions & 0 deletions docs/guide-ja/driver-sqs.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ return [
'key' => '<key>',
'secret' => '<secret>',
'region' => '<region>',
'endpoint' => '<endpoint>', // https://docs.aws.amazon.com/general/latest/gr/sqs-service.html#sqs_region
],
],
];
Expand All @@ -39,6 +40,7 @@ return [
'secret' => '<secret>',
'region' => '<region>',
'messageGroupId' => '<Group ID>',
'endpoint' => '<endpoint>', // https://docs.aws.amazon.com/general/latest/gr/sqs-service.html#sqs_region
],
],
];
Expand Down
2 changes: 2 additions & 0 deletions docs/guide-ru/driver-sqs.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ return [
'key' => '<key>',
'secret' => '<secret>',
'region' => '<region>',
'endpoint' => '<endpoint>', // https://docs.aws.amazon.com/general/latest/gr/sqs-service.html#sqs_region
],
],
];
Expand All @@ -39,6 +40,7 @@ return [
'secret' => '<secret>',
'region' => '<region>',
'messageGroupId' => '<Group ID>',
'endpoint' => '<endpoint>', // https://docs.aws.amazon.com/general/latest/gr/sqs-service.html#sqs_region
],
],
];
Expand Down
2 changes: 2 additions & 0 deletions docs/guide-zh-CN/driver-sqs.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ return [
'key' => '<key>',
'secret' => '<secret>',
'region' => '<region>',
'endpoint' => '<endpoint>', // https://docs.aws.amazon.com/general/latest/gr/sqs-service.html#sqs_region
],
],
];
Expand All @@ -39,6 +40,7 @@ return [
'secret' => '<secret>',
'region' => '<region>',
'messageGroupId' => '<Group ID>',
'endpoint' => '<endpoint>', // https://docs.aws.amazon.com/general/latest/gr/sqs-service.html#sqs_region
],
],
];
Expand Down
2 changes: 2 additions & 0 deletions docs/guide/driver-sqs.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ return [
'key' => '<key>',
'secret' => '<secret>',
'region' => '<region>',
'endpoint' => '<endpoint>', // https://docs.aws.amazon.com/general/latest/gr/sqs-service.html#sqs_region
],
],
];
Expand All @@ -39,6 +40,7 @@ return [
'secret' => '<secret>',
'region' => '<region>',
'messageGroupId' => '<Group ID>',
'endpoint' => '<endpoint>', // https://docs.aws.amazon.com/general/latest/gr/sqs-service.html#sqs_region
],
],
];
Expand Down
Loading