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 .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,4 @@ jobs:
phpcs:
uses: yiisoft/yii2-actions/.github/workflows/linter.yml@master
with:
directories: src/ tests/
extensions: 'amqp'
39 changes: 28 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<p align="center">
<a href="https://github.com/yiisoft" target="_blank">
<img src="https://avatars0.githubusercontent.com/u/993323" height="100px">
</a>
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://www.yiiframework.com/image/yii_logo_dark.svg">
<source media="(prefers-color-scheme: light)" srcset="https://www.yiiframework.com/image/yii_logo_light.svg">
<img src="https://www.yiiframework.com/image/yii_logo_light.svg" alt="Yii Framework" height="100px">
</picture>
<h1 align="center">Yii2 Queue Extension</h1>
<br>
</p>
Expand All @@ -10,13 +12,11 @@ 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).

[![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)
[![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)
[![Latest Stable Version](https://img.shields.io/packagist/v/yiisoft/yii2-queue.svg?style=for-the-badge&label=Stable&logo=packagist)](https://packagist.org/packages/yiisoft/yii2-queue)
[![Total Downloads](https://img.shields.io/packagist/dt/yiisoft/yii2-queue.svg?style=for-the-badge&label=Downloads)](https://packagist.org/packages/yiisoft/yii2-queue)
[![build](https://img.shields.io/github/actions/workflow/status/yiisoft/yii2-queue/main.yml?style=for-the-badge&logo=github&label=Build)](https://github.com/yiisoft/yii2-queue/actions?query=workflow%3Abuild)
[![codecov](https://img.shields.io/codecov/c/github/yiisoft/yii2-queue.svg?style=for-the-badge&logo=codecov&logoColor=white&label=Codecov)](https://codecov.io/gh/yiisoft/yii2-queue)
[![Static Analysis](https://img.shields.io/github/actions/workflow/status/yiisoft/yii2-queue/static.yml?style=for-the-badge&label=Static)](https://github.com/yiisoft/yii2-queue/actions/workflows/static.yml)

Installation
------------
Expand Down Expand Up @@ -99,4 +99,21 @@ 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

[![Open Collective](https://img.shields.io/badge/Open%20Collective-sponsor-7eadf1?style=for-the-badge&logo=open%20collective&logoColor=7eadf1&labelColor=555555)](https://opencollective.com/yiisoft)

## Follow updates

[![Official website](https://img.shields.io/badge/Powered_by-Yii_Framework-green.svg?style=for-the-badge&logo=yii)](https://www.yiiframework.com/)
[![Follow on X](https://img.shields.io/badge/-Follow%20on%20X-1DA1F2.svg?style=for-the-badge&logo=x&logoColor=white&labelColor=000000)](https://x.com/yiiframework)
[![Telegram](https://img.shields.io/badge/telegram-join-1DA1F2?style=for-the-badge&logo=telegram)](https://t.me/yii_framework_in_english)
[![Slack](https://img.shields.io/badge/slack-join-1DA1F2?style=for-the-badge&logo=slack)](https://yiiframework.com/go/slack)

## License

[![License](https://img.shields.io/badge/License-BSD--3--Clause-brightgreen.svg?style=for-the-badge&logo=opensourceinitiative&logoColor=white&labelColor=555555)](LICENSE.md)
6 changes: 4 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
1 change: 1 addition & 0 deletions docs/guide/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,4 @@ Developer tools
Contributing
------------
* [Tests](tests.md)
* [Internals](internals.md)
49 changes: 49 additions & 0 deletions docs/guide/internals.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Internals

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
```
4 changes: 4 additions & 0 deletions phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
<!-- generate relative paths -->
<arg name="basepath" value="src"/>

<!-- directories to check -->
<file>src</file>
<file>tests</file>

<rule ref="Squiz.NamingConventions.ValidVariableName.PrivateNoUnderscore">
<exclude-pattern>/*\.php$</exclude-pattern>
</rule>
Expand Down
Loading