From 17c5a5d0cc27a8544a0134d663d1a15df5739f19 Mon Sep 17 00:00:00 2001
From: Wilmer Arambula
Date: Wed, 4 Mar 2026 06:40:16 -0300
Subject: [PATCH 1/4] Enhance documentation and add scripts for
`composer.json`.
---
.github/workflows/linter.yml | 1 -
README.md | 33 +++++++++++++++++-------
composer.json | 6 +++--
docs/guide/README.md | 1 +
docs/guide/internals.md | 49 ++++++++++++++++++++++++++++++++++++
phpcs.xml.dist | 4 +++
6 files changed, 82 insertions(+), 12 deletions(-)
create mode 100644 docs/guide/internals.md
diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml
index eee2a53720..ae398fc2d1 100644
--- a/.github/workflows/linter.yml
+++ b/.github/workflows/linter.yml
@@ -28,5 +28,4 @@ jobs:
phpcs:
uses: yiisoft/yii2-actions/.github/workflows/linter.yml@master
with:
- directories: src/ tests/
extensions: 'amqp'
diff --git a/README.md b/README.md
index 7fc02a8fd6..c2a6dc9f79 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,9 @@
-
-
-
+
+
+
+
+
Yii2 Queue Extension
@@ -12,11 +14,11 @@ It supports queues based on **DB**, **Redis**, **RabbitMQ**, **AMQP**, **Beansta
Documentation is at [docs/guide/README.md](docs/guide/README.md).
-[](https://packagist.org/packages/yiisoft/yii2-queue)
-[](https://packagist.org/packages/yiisoft/yii2-queue)
-[](https://github.com/yiisoft/yii2-queue/actions)
-[](https://github.com/yiisoft/yii2-queue/actions?query=workflow%3A%22static+analysis%22)
-[](https://codecov.io/gh/yiisoft/yii2-queue)
+[](https://packagist.org/packages/yiisoft/yii2-queue)
+[](https://packagist.org/packages/yiisoft/yii2-queue)
+[](https://github.com/yiisoft/yii2-queue/actions?query=workflow%3Abuild)
+[](https://codecov.io/gh/yiisoft/yii2-queue)
+[](https://github.com/yiisoft/yii2-queue/actions/workflows/static.yml)
Installation
------------
@@ -99,4 +101,17 @@ Yii::$app->queue->isReserved($id);
Yii::$app->queue->isDone($id);
```
-For more details see [the guide](docs/guide/README.md).
+## Documentation
+
+- [the guide](docs/guide/README.md)
+
+## Support the project
+
+[](https://opencollective.com/yiisoft)
+
+## Follow updates
+
+[](https://www.yiiframework.com/)
+[](https://x.com/yiiframework)
+[](https://t.me/yii_framework_in_english)
+[](https://yiiframework.com/go/slack)
diff --git a/composer.json b/composer.json
index d83e1e6ec7..20a742fd6a 100644
--- a/composer.json
+++ b/composer.json
@@ -84,7 +84,9 @@
}
],
"scripts": {
- "phpcbf": "./vendor/bin/phpcbf -q src/ tests/",
- "phpcs": "./vendor/bin/phpcs -q src/ tests/"
+ "cs": "./vendor/bin/phpcs",
+ "cs-fix": "./vendor/bin/phpcbf",
+ "static": "./vendor/bin/phpstan --memory-limit=-1",
+ "tests": "./make test"
}
}
diff --git a/docs/guide/README.md b/docs/guide/README.md
index 0811c2dd66..c30231fe70 100644
--- a/docs/guide/README.md
+++ b/docs/guide/README.md
@@ -33,3 +33,4 @@ Developer tools
Contributing
------------
* [Tests](tests.md)
+* [Internals](internals.md)
diff --git a/docs/guide/internals.md b/docs/guide/internals.md
new file mode 100644
index 0000000000..8241f9763d
--- /dev/null
+++ b/docs/guide/internals.md
@@ -0,0 +1,49 @@
+# Testing
+
+This package provides a consistent set of [Composer](https://getcomposer.org/) scripts for local validation.
+
+Tool references:
+
+- [PHPCodeSniffer](https://github.com/PHPCSStandards/PHP_CodeSniffer) for code style checks.
+- [PHPStan](https://phpstan.org/) for static analysis.
+- [PHPUnit](https://phpunit.de/) for unit tests.
+
+## Code style checks (PHPCodeSniffer)
+
+Run code style checks.
+
+```bash
+composer cs
+```
+
+Fix code style issues.
+
+```bash
+composer cs-fix
+```
+
+## Static analysis (PHPStan)
+
+Run static analysis.
+
+```bash
+composer static
+```
+
+## Unit tests (PHPUnit)
+
+Run the full test suite.
+
+```bash
+composer tests
+```
+
+## Passing extra arguments
+
+Composer scripts support forwarding additional arguments using `--`.
+
+Run PHPStan with a different memory limit.
+
+```bash
+composer static -- --memory-limit=512M
+```
diff --git a/phpcs.xml.dist b/phpcs.xml.dist
index ee986fbad5..034a5e11f2 100644
--- a/phpcs.xml.dist
+++ b/phpcs.xml.dist
@@ -5,6 +5,10 @@
+
+ src
+ tests
+
/*\.php$
From 975929e8db9224d2fde273796d075b3016c5cdc8 Mon Sep 17 00:00:00 2001
From: Wilmer Arambula
Date: Wed, 4 Mar 2026 06:49:49 -0300
Subject: [PATCH 2/4] Apply fixed Copilot review.
---
docs/guide/internals.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/guide/internals.md b/docs/guide/internals.md
index 8241f9763d..6e93fae6fa 100644
--- a/docs/guide/internals.md
+++ b/docs/guide/internals.md
@@ -1,4 +1,4 @@
-# Testing
+# Internals
This package provides a consistent set of [Composer](https://getcomposer.org/) scripts for local validation.
From 74a59ebd92e37f25aed7bfc46dd8030f175f914b Mon Sep 17 00:00:00 2001
From: Wilmer Arambula
Date: Wed, 4 Mar 2026 08:24:23 -0300
Subject: [PATCH 3/4] Fix `README.md`.
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index c2a6dc9f79..f2eef6cd24 100644
--- a/README.md
+++ b/README.md
@@ -12,7 +12,7 @@ An extension for running tasks asynchronously via queues.
It supports queues based on **DB**, **Redis**, **RabbitMQ**, **AMQP**, **Beanstalk**, **ActiveMQ** and **Gearman**.
-Documentation is at [docs/guide/README.md](docs/guide/README.md).
+For license information, see the [LICENSE](LICENSE.md) file.
[](https://packagist.org/packages/yiisoft/yii2-queue)
[](https://packagist.org/packages/yiisoft/yii2-queue)
From 656392b85079498d8d76c038849ba470b57f14bb Mon Sep 17 00:00:00 2001
From: Wilmer Arambula
Date: Wed, 4 Mar 2026 08:36:14 -0300
Subject: [PATCH 4/4] Add badge license to `README.md`.
---
README.md | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index f2eef6cd24..a7b25c1e73 100644
--- a/README.md
+++ b/README.md
@@ -12,8 +12,6 @@ An extension for running tasks asynchronously via queues.
It supports queues based on **DB**, **Redis**, **RabbitMQ**, **AMQP**, **Beanstalk**, **ActiveMQ** and **Gearman**.
-For license information, see the [LICENSE](LICENSE.md) file.
-
[](https://packagist.org/packages/yiisoft/yii2-queue)
[](https://packagist.org/packages/yiisoft/yii2-queue)
[](https://github.com/yiisoft/yii2-queue/actions?query=workflow%3Abuild)
@@ -115,3 +113,7 @@ Yii::$app->queue->isDone($id);
[](https://x.com/yiiframework)
[](https://t.me/yii_framework_in_english)
[](https://yiiframework.com/go/slack)
+
+## License
+
+[](LICENSE.md)