Skip to content
Open
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: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
/Dockerfile export-ignore
/support export-ignore
/stubs export-ignore
/rector.php export-ignore
31 changes: 31 additions & 0 deletions .github/workflows/rector.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: rector

permissions:
contents: read

on:
pull_request: &ignore-paths
paths-ignore:
- 'docs/**'
- '.github/CONTRIBUTING.md'
- '.github/FUNDING.yml'
- '.github/SECURITY.md'
- 'README.md'
- 'CHANGELOG.md'
- 'LICENSE.md'
- 'UPGRADE.md'
- '.gitignore'
- '.gitattributes'
- '.editorconfig'
- 'docker-compose.yml'
- 'Dockerfile'
- 'Makefile'
- 'phpunit.xml.dist'

push: *ignore-paths

jobs:
rector:
uses: yiisoft/yii2-actions/.github/workflows/rector.yml@6f8dc7a0de4cbcc0fffb6a20881f32bba0e13f44 # master
with:
php-version: '["8.5"]'
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Yii2 Queue Extension Change Log
- Enh #544: Applying Yii2 coding standards (@s1lver)
- Bug #563: Fix `@property` annotations in `InfoAction` and `Queue` drivers (mspirkov)
- Enh #564: Allow `symfony/process` `^8.0` (lukascernydis)
- Enh #565: Add the missing `@property` tags (mspirkov)

2.3.8 January 08, 2026
----------------------
Expand Down
7 changes: 5 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@
"pda/pheanstalk": "^8.0.0",
"aws/aws-sdk-php": "^3.369.0",
"phpstan/phpstan": "^2.1",
"phpstan/phpstan-phpunit": "^2.0"
"phpstan/phpstan-phpunit": "^2.0",
"rector/rector": "^2.6",
"mspirkov/yii2-rector": "^0.1"
},
"suggest": {
"ext-pcntl": "Need for process signals.",
Expand Down Expand Up @@ -87,6 +89,7 @@
"cs": "./vendor/bin/phpcs",
"cs-fix": "./vendor/bin/phpcbf",
"static": "./vendor/bin/phpstan --memory-limit=-1",
"tests": "./make test"
"tests": "./make test",
"rector": "./vendor/bin/rector"
}
}
15 changes: 15 additions & 0 deletions rector.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

use MSpirkov\Yii2\Rector\Rules\AddPropertyTagsRector;
use MSpirkov\Yii2\Rector\Rules\RemoveRedundantPropertyTagsRector;
use Rector\Config\RectorConfig;

return RectorConfig::configure()
->withPaths([
__DIR__ . '/src',
__DIR__ . '/tests',
])
->withRules([
AddPropertyTagsRector::class,
RemoveRedundantPropertyTagsRector::class,
]);
2 changes: 2 additions & 0 deletions src/Queue.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
/**
* Base Queue.
*
* @property-read int|null $workerPid
*
* @author Roman Zhuravlev <zhuravljov@gmail.com>
*/
abstract class Queue extends Component
Expand Down
2 changes: 2 additions & 0 deletions src/debug/Panel.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
/**
* Debug Panel.
*
* @property-read string $viewPath The view path that may be prefixed to a relative view name.
*
* @author Roman Zhuravlev <zhuravljov@gmail.com>
*/
class Panel extends BasePanel implements ViewContextInterface
Expand Down
5 changes: 5 additions & 0 deletions src/drivers/db/StatisticsProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@
/**
* Statistics Provider
*
* @property-read int $waitingCount
* @property-read int $delayedCount
* @property-read int $reservedCount
* @property-read int $doneCount
*
* @author Kalmer Kaurson <kalmerkaurson@gmail.com>
*/
class StatisticsProvider extends BaseObject implements
Expand Down
5 changes: 5 additions & 0 deletions src/drivers/file/StatisticsProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
/**
* Statistics Provider
*
* @property-read int $waitingCount
* @property-read int $delayedCount
* @property-read int $reservedCount
* @property-read int $doneCount
*
* @author Kalmer Kaurson <kalmerkaurson@gmail.com>
*/
class StatisticsProvider extends BaseObject implements
Expand Down
5 changes: 5 additions & 0 deletions src/drivers/redis/StatisticsProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
/**
* Statistics Provider
*
* @property-read int $waitingCount
* @property-read int $delayedCount
* @property-read int $reservedCount
* @property-read int $doneCount
*
* @author Kalmer Kaurson <kalmerkaurson@gmail.com>
*/
class StatisticsProvider extends BaseObject implements
Expand Down
3 changes: 3 additions & 0 deletions tests/app/RetryJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
/**
* Retry Job.
*
* @property-read bool|string $fileName
* @property-read int $ttr Time to reserve in seconds.
*
* @author Roman Zhuravlev <zhuravljov@gmail.com>
*/
class RetryJob extends BaseObject implements RetryableJobInterface
Expand Down
2 changes: 2 additions & 0 deletions tests/app/SimpleJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
/**
* Simple Job.
*
* @property-read bool|string $fileName
*
* @author Roman Zhuravlev <zhuravljov@gmail.com>
*/
class SimpleJob extends BaseObject implements JobInterface
Expand Down
2 changes: 2 additions & 0 deletions tests/cli/Queue.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
/**
* test Queue.
*
* @property-read StatisticsInterface $statisticsProvider
*
* @author Kalmer Kaurson <kalmerkaurson@gmail.com>
*/
class Queue extends CliQueue implements StatisticsProviderInterface
Expand Down
2 changes: 2 additions & 0 deletions tests/cli/providers/DelayedCountProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
/**
* Delayed Count Provider
*
* @property-read int $delayedCount
*
* @author Kalmer Kaurson <kalmerkaurson@gmail.com>
*/
class DelayedCountProvider extends BaseStatisticsProvider implements DelayedCountInterface
Expand Down
2 changes: 2 additions & 0 deletions tests/cli/providers/DoneCountProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
/**
* Done Count Provider
*
* @property-read int $doneCount
*
* @author Kalmer Kaurson <kalmerkaurson@gmail.com>
*/
class DoneCountProvider extends BaseStatisticsProvider implements DoneCountInterface
Expand Down
2 changes: 2 additions & 0 deletions tests/cli/providers/ReservedCountProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
/**
* Reserved Count Provider
*
* @property-read int $reservedCount
*
* @author Kalmer Kaurson <kalmerkaurson@gmail.com>
*/
class ReservedCountProvider extends BaseStatisticsProvider implements ReservedCountInterface
Expand Down
2 changes: 2 additions & 0 deletions tests/cli/providers/WaitingCountProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
/**
* Waiting Count Provider
*
* @property-read int $waitingCount
*
* @author Kalmer Kaurson <kalmerkaurson@gmail.com>
*/
class WaitingCountProvider extends BaseStatisticsProvider implements WaitingCountInterface
Expand Down
Loading