mirror of
https://gitee.com/hyperf/hyperf.git
synced 2024-11-29 18:27:44 +08:00
Optimized code about amqp and upgrade all requirements from v2.2 to v3.0 (#4196)
This commit is contained in:
parent
afab0bbf35
commit
74a21bbab3
10
.github/workflows/test-components.yml
vendored
10
.github/workflows/test-components.yml
vendored
@ -16,7 +16,7 @@ jobs:
|
||||
PHP_VERSION: ${{ matrix.php-version }}
|
||||
strategy:
|
||||
matrix:
|
||||
php-version: [ '7.4', '8.0' ]
|
||||
php-version: [ '8.0' ]
|
||||
mysql-version: [ '5.7', '8.0' ]
|
||||
max-parallel: 2
|
||||
fail-fast: false
|
||||
@ -53,7 +53,7 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
version: [ '^1.0', '^2.0' ]
|
||||
php-version: [ '7.4', '8.0' ]
|
||||
php-version: [ '8.0' ]
|
||||
max-parallel: 2
|
||||
fail-fast: false
|
||||
steps:
|
||||
@ -134,13 +134,14 @@ jobs:
|
||||
|
||||
|
||||
container:
|
||||
name: Test for Psr Container V2.0
|
||||
name: Test for Psr Container V1.0 ~ V2.0
|
||||
runs-on: 'ubuntu-latest'
|
||||
env:
|
||||
PHP_VERSION: ${{ matrix.php-version }}
|
||||
strategy:
|
||||
matrix:
|
||||
php-version: [ '7.4', '8.0' ]
|
||||
php-version: [ '8.0' ]
|
||||
version: [ '^1.0', '^2.0' ]
|
||||
max-parallel: 6
|
||||
fail-fast: false
|
||||
steps:
|
||||
@ -162,6 +163,7 @@ jobs:
|
||||
cp .travis/.env.example .env
|
||||
composer remove friendsofphp/php-cs-fixer --dev -W
|
||||
composer remove symfony/console --dev -W
|
||||
composer require "psr/container:${{ matrix.version }}"
|
||||
composer update -oW
|
||||
- name: Run Test Cases
|
||||
run: |
|
||||
|
4
.github/workflows/test.yml
vendored
4
.github/workflows/test.yml
vendored
@ -13,8 +13,8 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ ubuntu-latest ]
|
||||
php-version: [ '7.4', '8.0' ]
|
||||
sw-version: [ 'v4.5.11', 'v4.6.7', 'v4.7.1', 'v4.8.0', 'master' ]
|
||||
php-version: [ '8.0' ]
|
||||
sw-version: [ 'v4.5.11', 'v4.6.7', 'v4.7.1', 'v4.8.1', 'master' ]
|
||||
max-parallel: 12
|
||||
fail-fast: false
|
||||
env:
|
||||
|
24
CHANGELOG-3.0.md
Normal file
24
CHANGELOG-3.0.md
Normal file
@ -0,0 +1,24 @@
|
||||
# v3.0.0 - TBD
|
||||
|
||||
- Upgraded the minimum php version to `^8.0`;
|
||||
|
||||
## BC breaks
|
||||
|
||||
- 框架移除了 `@Annotation` 的支持,全部使用 `PHP8` 原生注解 `Attribute`,更新前务必检查项目中,是否已经全部替换为 `Attribute`。
|
||||
|
||||
> TODO: 提供检测注解的脚本
|
||||
|
||||
- 框架为类库增加了更多的类型限制,所以从 `2.2` 更新到 `3.0` 版本时,需要跑一遍静态检测。
|
||||
|
||||
```shell
|
||||
composer analyse
|
||||
```
|
||||
|
||||
## Dependencies Upgrade
|
||||
|
||||
- Upgraded `php-amqplib/php-amqplib` to `^3.1`;
|
||||
- Upgraded `phpstan/phpstan` to `^1.0`;
|
||||
|
||||
## Added
|
||||
|
||||
- [#4196](https://github.com/hyperf/hyperf/pull/4196) Added `Hyperf\Amqp\IO\IOFactory` which used to create amqp io by yourself.
|
@ -16,7 +16,7 @@
|
||||
"source": "https://github.com/hyperf/hyperf"
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.3",
|
||||
"php": ">=8.0",
|
||||
"ext-bcmath": "*",
|
||||
"ext-json": "*",
|
||||
"ext-redis": "*",
|
||||
@ -61,7 +61,7 @@
|
||||
"nikic/fast-route": "^1.3",
|
||||
"nikic/php-parser": "^4.1",
|
||||
"opentracing/opentracing": "^1.0",
|
||||
"php-amqplib/php-amqplib": "^3.0",
|
||||
"php-amqplib/php-amqplib": "^3.1",
|
||||
"php-di/phpdoc-reader": "^2.2",
|
||||
"phpspec/prophecy-phpunit": "^2.0",
|
||||
"phpstan/phpstan": "^1.0",
|
||||
@ -464,6 +464,6 @@
|
||||
"license-check": "docheader check src/ test/",
|
||||
"cs-fix": "php-cs-fixer fix $1",
|
||||
"json-fix": "./bin/composer-json-fixer",
|
||||
"analyse": "phpstan analyse --memory-limit 16G -l 5 -c phpstan.neon"
|
||||
"analyse": "phpstan analyse --memory-limit=-1 -l 5 -c phpstan.neon"
|
||||
}
|
||||
}
|
||||
|
@ -52,3 +52,5 @@ parameters:
|
||||
- '#Unsafe access to private property .* through static::#'
|
||||
- '#Unsafe call to private method .* through static::#'
|
||||
- '#Property .* is never read, only written#'
|
||||
- message: '#Match arm is unreachable because previous comparison is always true#'
|
||||
path: src/amqp/src/IO/IOFactory.php
|
||||
|
@ -15,13 +15,13 @@
|
||||
"source": "https://github.com/hyperf/hyperf"
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.2",
|
||||
"php": ">=8.0",
|
||||
"doctrine/instantiator": "^1.2.0",
|
||||
"hyperf/contract": "~2.2.0",
|
||||
"hyperf/utils": "~2.2.0",
|
||||
"hyperf/process": "~2.2.0",
|
||||
"hyperf/pool": "~2.2.0",
|
||||
"php-amqplib/php-amqplib": "^3.0",
|
||||
"hyperf/contract": "~3.0.0",
|
||||
"hyperf/utils": "~3.0.0",
|
||||
"hyperf/process": "~3.0.0",
|
||||
"hyperf/pool": "~3.0.0",
|
||||
"php-amqplib/php-amqplib": "^3.1",
|
||||
"psr/container": "^1.0|^2.0",
|
||||
"psr/event-dispatcher": "^1.0",
|
||||
"psr/log": "^1.0|^2.0|^3.0"
|
||||
@ -45,7 +45,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
},
|
||||
"hyperf": {
|
||||
"config": "Hyperf\\Amqp\\ConfigProvider"
|
||||
|
@ -9,6 +9,8 @@ declare(strict_types=1);
|
||||
* @contact group@hyperf.io
|
||||
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
|
||||
*/
|
||||
use Hyperf\Amqp\IO\IOFactory;
|
||||
|
||||
return [
|
||||
'default' => [
|
||||
'host' => env('AMQP_HOST', 'localhost'),
|
||||
@ -22,6 +24,7 @@ return [
|
||||
'pool' => [
|
||||
'connections' => 2,
|
||||
],
|
||||
'io' => IOFactory::class,
|
||||
'params' => [
|
||||
'insist' => false,
|
||||
'login_method' => 'AMQPLAIN',
|
||||
|
@ -31,50 +31,23 @@ class AMQPConnection extends AbstractConnection
|
||||
|
||||
public const CONFIRM_CHANNEL_POOL_LENGTH = 10000;
|
||||
|
||||
/**
|
||||
* @var Channel
|
||||
*/
|
||||
protected $pool;
|
||||
protected Channel $pool;
|
||||
|
||||
/**
|
||||
* @var Channel
|
||||
*/
|
||||
protected $confirmPool;
|
||||
protected Channel $confirmPool;
|
||||
|
||||
/**
|
||||
* @var null|LoggerInterface
|
||||
*/
|
||||
protected $logger;
|
||||
protected ?LoggerInterface $logger = null;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
protected $lastChannelId = 0;
|
||||
protected int $lastChannelId = 0;
|
||||
|
||||
/**
|
||||
* @var null|Params
|
||||
*/
|
||||
protected $params;
|
||||
protected ?Params $params = null;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
protected $loop = false;
|
||||
protected bool $loop = false;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
protected $enableHeartbeat = false;
|
||||
protected bool $enableHeartbeat = false;
|
||||
|
||||
/**
|
||||
* @var ChannelManager
|
||||
*/
|
||||
protected $channelManager;
|
||||
protected ChannelManager $channelManager;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
protected $exited = false;
|
||||
protected bool $exited = false;
|
||||
|
||||
public function __construct(
|
||||
string $user,
|
||||
@ -105,20 +78,14 @@ class AMQPConnection extends AbstractConnection
|
||||
parent::write($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return static
|
||||
*/
|
||||
public function setLogger(?LoggerInterface $logger)
|
||||
public function setLogger(?LoggerInterface $logger): static
|
||||
{
|
||||
$this->logger = $logger;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return static
|
||||
*/
|
||||
public function setParams(Params $params)
|
||||
public function setParams(Params $params): static
|
||||
{
|
||||
$this->params = $params;
|
||||
return $this;
|
||||
@ -222,12 +189,12 @@ class AMQPConnection extends AbstractConnection
|
||||
Coroutine::create(function () {
|
||||
try {
|
||||
while (true) {
|
||||
[$frame_type, $channel, $payload] = $this->wait_frame(0);
|
||||
[$frame_type, $channel, $payload] = $this->wait_frame();
|
||||
$this->channelManager->get($channel)->push([$frame_type, $payload], 0.001);
|
||||
}
|
||||
} catch (\Throwable $exception) {
|
||||
$level = $this->exited ? 'warning' : 'error';
|
||||
$this->logger && $this->logger->log($level, 'Recv loop broken. The reason is ' . (string) $exception);
|
||||
$this->logger && $this->logger->log($level, 'Recv loop broken. The reason is ' . $exception);
|
||||
} finally {
|
||||
$this->loop = false;
|
||||
if (! $this->exited) {
|
||||
|
@ -14,45 +14,20 @@ namespace Hyperf\Amqp\Annotation;
|
||||
use Attribute;
|
||||
use Hyperf\Di\Annotation\AbstractAnnotation;
|
||||
|
||||
/**
|
||||
* @Annotation
|
||||
* @Target({"CLASS"})
|
||||
*/
|
||||
#[Attribute(Attribute::TARGET_CLASS)]
|
||||
class Consumer extends AbstractAnnotation
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $exchange = '';
|
||||
public string $exchange = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $routingKey = '';
|
||||
public string $routingKey = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $queue = '';
|
||||
public string $queue = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $name = 'Consumer';
|
||||
public string $name = 'Consumer';
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $nums = 1;
|
||||
public int $nums = 1;
|
||||
|
||||
/**
|
||||
* @var null|bool
|
||||
*/
|
||||
public $enable;
|
||||
public ?bool $enable = null;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $maxConsumption = 0;
|
||||
public int $maxConsumption = 0;
|
||||
}
|
||||
|
@ -14,20 +14,10 @@ namespace Hyperf\Amqp\Annotation;
|
||||
use Attribute;
|
||||
use Hyperf\Di\Annotation\AbstractAnnotation;
|
||||
|
||||
/**
|
||||
* @Annotation
|
||||
* @Target({"CLASS"})
|
||||
*/
|
||||
#[Attribute(Attribute::TARGET_CLASS)]
|
||||
class Producer extends AbstractAnnotation
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $exchange = '';
|
||||
public string $exchange = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $routingKey = '';
|
||||
public string $routingKey = '';
|
||||
}
|
||||
|
@ -18,22 +18,8 @@ use Psr\Container\ContainerInterface;
|
||||
|
||||
class Builder
|
||||
{
|
||||
/**
|
||||
* @var ContainerInterface
|
||||
*/
|
||||
protected $container;
|
||||
|
||||
protected $poolFactory;
|
||||
|
||||
/**
|
||||
* @var ConnectionFactory
|
||||
*/
|
||||
protected $factory;
|
||||
|
||||
public function __construct(ContainerInterface $container, ConnectionFactory $factory)
|
||||
public function __construct(protected ContainerInterface $container, protected ConnectionFactory $factory)
|
||||
{
|
||||
$this->container = $container;
|
||||
$this->factory = $factory;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -15,45 +15,24 @@ use PhpAmqpLib\Wire\AMQPTable;
|
||||
|
||||
class Builder
|
||||
{
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
protected $passive = false;
|
||||
protected bool $passive = false;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
protected $durable = true;
|
||||
protected bool $durable = true;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
protected $autoDelete = false;
|
||||
protected bool $autoDelete = false;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
protected $nowait = false;
|
||||
protected bool $nowait = false;
|
||||
|
||||
/**
|
||||
* @var AMQPTable|array
|
||||
*/
|
||||
protected $arguments = [];
|
||||
protected AMQPTable|array $arguments = [];
|
||||
|
||||
/**
|
||||
* @var null|int
|
||||
*/
|
||||
protected $ticket;
|
||||
protected ?int $ticket = null;
|
||||
|
||||
public function isPassive(): bool
|
||||
{
|
||||
return $this->passive;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return static
|
||||
*/
|
||||
public function setPassive(bool $passive): self
|
||||
public function setPassive(bool $passive): static
|
||||
{
|
||||
$this->passive = $passive;
|
||||
return $this;
|
||||
@ -64,10 +43,7 @@ class Builder
|
||||
return $this->durable;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return static
|
||||
*/
|
||||
public function setDurable(bool $durable): self
|
||||
public function setDurable(bool $durable): static
|
||||
{
|
||||
$this->durable = $durable;
|
||||
return $this;
|
||||
@ -78,10 +54,7 @@ class Builder
|
||||
return $this->autoDelete;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return static
|
||||
*/
|
||||
public function setAutoDelete(bool $autoDelete): self
|
||||
public function setAutoDelete(bool $autoDelete): static
|
||||
{
|
||||
$this->autoDelete = $autoDelete;
|
||||
return $this;
|
||||
@ -92,46 +65,29 @@ class Builder
|
||||
return $this->nowait;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return static
|
||||
*/
|
||||
public function setNowait(bool $nowait): self
|
||||
public function setNowait(bool $nowait): static
|
||||
{
|
||||
$this->nowait = $nowait;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return AMQPTable|array
|
||||
*/
|
||||
public function getArguments()
|
||||
public function getArguments(): AMQPTable|array
|
||||
{
|
||||
return $this->arguments;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param AMQPTable|array $arguments
|
||||
* @return static
|
||||
*/
|
||||
public function setArguments($arguments): self
|
||||
public function setArguments(AMQPTable|array $arguments): static
|
||||
{
|
||||
$this->arguments = $arguments;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return null|int
|
||||
*/
|
||||
public function getTicket()
|
||||
public function getTicket(): ?int
|
||||
{
|
||||
return $this->ticket;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param null|int $ticket
|
||||
* @return static
|
||||
*/
|
||||
public function setTicket($ticket): self
|
||||
public function setTicket(?int $ticket): static
|
||||
{
|
||||
$this->ticket = $ticket;
|
||||
return $this;
|
||||
|
@ -13,18 +13,18 @@ namespace Hyperf\Amqp\Builder;
|
||||
|
||||
class ExchangeBuilder extends Builder
|
||||
{
|
||||
protected $exchange;
|
||||
protected ?string $exchange = null;
|
||||
|
||||
protected $type;
|
||||
protected ?string $type = null;
|
||||
|
||||
protected $internal = false;
|
||||
protected bool $internal = false;
|
||||
|
||||
public function getExchange(): string
|
||||
{
|
||||
return $this->exchange;
|
||||
}
|
||||
|
||||
public function setExchange(string $exchange): self
|
||||
public function setExchange(string $exchange): static
|
||||
{
|
||||
$this->exchange = $exchange;
|
||||
return $this;
|
||||
@ -35,7 +35,7 @@ class ExchangeBuilder extends Builder
|
||||
return $this->type;
|
||||
}
|
||||
|
||||
public function setType(string $type): self
|
||||
public function setType(string $type): static
|
||||
{
|
||||
$this->type = $type;
|
||||
return $this;
|
||||
@ -46,7 +46,7 @@ class ExchangeBuilder extends Builder
|
||||
return $this->internal;
|
||||
}
|
||||
|
||||
public function setInternal(bool $internal): self
|
||||
public function setInternal(bool $internal): static
|
||||
{
|
||||
$this->internal = $internal;
|
||||
return $this;
|
||||
|
@ -11,13 +11,15 @@ declare(strict_types=1);
|
||||
*/
|
||||
namespace Hyperf\Amqp\Builder;
|
||||
|
||||
use PhpAmqpLib\Wire\AMQPTable;
|
||||
|
||||
class QueueBuilder extends Builder
|
||||
{
|
||||
protected $queue;
|
||||
protected ?string $queue = null;
|
||||
|
||||
protected $exclusive = false;
|
||||
protected bool $exclusive = false;
|
||||
|
||||
protected $arguments = [
|
||||
protected AMQPTable|array $arguments = [
|
||||
'x-ha-policy' => ['S', 'all'],
|
||||
];
|
||||
|
||||
|
@ -11,34 +11,28 @@ declare(strict_types=1);
|
||||
*/
|
||||
namespace Hyperf\Amqp;
|
||||
|
||||
use Hyperf\Amqp\IO\SwooleIO;
|
||||
use Hyperf\Amqp\Exception\NotSupportedException;
|
||||
use Hyperf\Amqp\IO\IOFactory;
|
||||
use Hyperf\Amqp\IO\IOFactoryInterface;
|
||||
use Hyperf\Contract\ConfigInterface;
|
||||
use Hyperf\Contract\StdoutLoggerInterface;
|
||||
use Hyperf\Utils\Arr;
|
||||
use Hyperf\Utils\Coroutine\Locker;
|
||||
use InvalidArgumentException;
|
||||
use PhpAmqpLib\Wire\IO\AbstractIO;
|
||||
use Psr\Container\ContainerInterface;
|
||||
|
||||
class ConnectionFactory
|
||||
{
|
||||
/**
|
||||
* @var ContainerInterface
|
||||
*/
|
||||
protected $container;
|
||||
|
||||
/**
|
||||
* @var ConfigInterface
|
||||
*/
|
||||
protected $config;
|
||||
protected ConfigInterface $config;
|
||||
|
||||
/**
|
||||
* @var AMQPConnection[][]
|
||||
*/
|
||||
protected $connections = [];
|
||||
|
||||
public function __construct(ContainerInterface $container)
|
||||
public function __construct(protected ContainerInterface $container)
|
||||
{
|
||||
$this->container = $container;
|
||||
$this->config = $this->container->get(ConfigInterface::class);
|
||||
}
|
||||
|
||||
@ -88,18 +82,11 @@ class ConnectionFactory
|
||||
|
||||
public function make(array $config): AMQPConnection
|
||||
{
|
||||
$host = $config['host'] ?? 'localhost';
|
||||
$port = $config['port'] ?? 5672;
|
||||
$user = $config['user'] ?? 'guest';
|
||||
$password = $config['password'] ?? 'guest';
|
||||
$vhost = $config['vhost'] ?? '/';
|
||||
|
||||
$params = new Params(Arr::get($config, 'params', []));
|
||||
$io = new SwooleIO(
|
||||
$host,
|
||||
$port,
|
||||
$params->getConnectionTimeout()
|
||||
);
|
||||
$io = $this->makeIO($config, $params);
|
||||
|
||||
$connection = new AMQPConnection(
|
||||
$user,
|
||||
@ -107,7 +94,7 @@ class ConnectionFactory
|
||||
$vhost,
|
||||
$params->isInsist(),
|
||||
$params->getLoginMethod(),
|
||||
$params->getLoginResponse(),
|
||||
null,
|
||||
$params->getLocale(),
|
||||
$io,
|
||||
$params->getHeartbeat(),
|
||||
@ -128,4 +115,20 @@ class ConnectionFactory
|
||||
|
||||
return $this->config->get($key);
|
||||
}
|
||||
|
||||
private function makeIO(array $config, Params $params): AbstractIO
|
||||
{
|
||||
$callable = $config['io'] ?? IOFactory::class;
|
||||
|
||||
if (is_callable($callable)) {
|
||||
return $callable($config, $params);
|
||||
}
|
||||
|
||||
$ioFactory = $this->container->get((string) $callable);
|
||||
if (! $ioFactory instanceof IOFactoryInterface) {
|
||||
throw new NotSupportedException(sprintf('%s must instanceof %s', $callable, IOFactoryInterface::class));
|
||||
}
|
||||
|
||||
return $ioFactory->create($config, $params);
|
||||
}
|
||||
}
|
||||
|
@ -33,28 +33,14 @@ use Throwable;
|
||||
|
||||
class Consumer extends Builder
|
||||
{
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
protected $status = true;
|
||||
|
||||
/**
|
||||
* @var null|EventDispatcherInterface
|
||||
*/
|
||||
protected $eventDispatcher;
|
||||
|
||||
/**
|
||||
* @var LoggerInterface
|
||||
*/
|
||||
private $logger;
|
||||
protected ?EventDispatcherInterface $eventDispatcher = null;
|
||||
|
||||
public function __construct(
|
||||
ContainerInterface $container,
|
||||
ConnectionFactory $factory,
|
||||
LoggerInterface $logger
|
||||
private LoggerInterface $logger
|
||||
) {
|
||||
parent::__construct($container, $factory);
|
||||
$this->logger = $logger;
|
||||
if ($container->has(EventDispatcherInterface::class)) {
|
||||
$this->eventDispatcher = $container->get(EventDispatcherInterface::class);
|
||||
}
|
||||
@ -174,7 +160,7 @@ class Consumer extends Builder
|
||||
return null;
|
||||
}
|
||||
|
||||
protected function getCallback(ConsumerMessageInterface $consumerMessage, AMQPMessage $message)
|
||||
protected function getCallback(ConsumerMessageInterface $consumerMessage, AMQPMessage $message): callable
|
||||
{
|
||||
return function () use ($consumerMessage, $message) {
|
||||
$data = $consumerMessage->unserialize($message->getBody());
|
||||
@ -200,19 +186,22 @@ class Consumer extends Builder
|
||||
|
||||
if ($result === Result::ACK) {
|
||||
$this->logger->debug($deliveryTag . ' acked.');
|
||||
return $channel->basic_ack($deliveryTag);
|
||||
$channel->basic_ack($deliveryTag);
|
||||
return;
|
||||
}
|
||||
if ($result === Result::NACK) {
|
||||
$this->logger->debug($deliveryTag . ' uacked.');
|
||||
return $channel->basic_nack($deliveryTag, false, $consumerMessage->isRequeue());
|
||||
$channel->basic_nack($deliveryTag, false, $consumerMessage->isRequeue());
|
||||
return;
|
||||
}
|
||||
if ($consumerMessage->isRequeue() && $result === Result::REQUEUE) {
|
||||
$this->logger->debug($deliveryTag . ' requeued.');
|
||||
return $channel->basic_reject($deliveryTag, true);
|
||||
$channel->basic_reject($deliveryTag, true);
|
||||
return;
|
||||
}
|
||||
|
||||
$this->logger->debug($deliveryTag . ' rejected.');
|
||||
return $channel->basic_reject($deliveryTag, false);
|
||||
$channel->basic_reject($deliveryTag, false);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -18,6 +18,10 @@ class ConsumerFactory
|
||||
{
|
||||
public function __invoke(ContainerInterface $container)
|
||||
{
|
||||
return new Consumer($container, $container->get(ConnectionFactory::class), $container->get(StdoutLoggerInterface::class));
|
||||
return new Consumer(
|
||||
$container,
|
||||
$container->get(ConnectionFactory::class),
|
||||
$container->get(StdoutLoggerInterface::class)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -20,14 +20,8 @@ use Psr\Container\ContainerInterface;
|
||||
|
||||
class ConsumerManager
|
||||
{
|
||||
/**
|
||||
* @var ContainerInterface
|
||||
*/
|
||||
private $container;
|
||||
|
||||
public function __construct(ContainerInterface $container)
|
||||
public function __construct(private ContainerInterface $container)
|
||||
{
|
||||
$this->container = $container;
|
||||
}
|
||||
|
||||
public function run()
|
||||
|
@ -15,12 +15,9 @@ use Hyperf\Amqp\Message\ConsumerMessageInterface;
|
||||
|
||||
class AfterConsume extends ConsumeEvent
|
||||
{
|
||||
protected $result;
|
||||
|
||||
public function __construct(ConsumerMessageInterface $message, string $result)
|
||||
public function __construct(ConsumerMessageInterface $message, protected string $result)
|
||||
{
|
||||
parent::__construct($message);
|
||||
$this->result = $result;
|
||||
}
|
||||
|
||||
public function getResult(): string
|
||||
|
@ -15,14 +15,8 @@ use Hyperf\Amqp\Message\ConsumerMessageInterface;
|
||||
|
||||
class ConsumeEvent
|
||||
{
|
||||
/**
|
||||
* @var ConsumerMessageInterface
|
||||
*/
|
||||
protected $message;
|
||||
|
||||
public function __construct(ConsumerMessageInterface $message)
|
||||
public function __construct(protected ConsumerMessageInterface $message)
|
||||
{
|
||||
$this->message = $message;
|
||||
}
|
||||
|
||||
public function getMessage(): ConsumerMessageInterface
|
||||
|
@ -16,15 +16,9 @@ use Throwable;
|
||||
|
||||
class FailToConsume extends ConsumeEvent
|
||||
{
|
||||
/**
|
||||
* @var Throwable
|
||||
*/
|
||||
protected $throwable;
|
||||
|
||||
public function __construct(ConsumerMessageInterface $message, Throwable $throwable)
|
||||
public function __construct(ConsumerMessageInterface $message, protected Throwable $throwable)
|
||||
{
|
||||
parent::__construct($message);
|
||||
$this->throwable = $throwable;
|
||||
}
|
||||
|
||||
public function getThrowable(): Throwable
|
||||
|
35
src/amqp/src/IO/IOFactory.php
Normal file
35
src/amqp/src/IO/IOFactory.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
* This file is part of Hyperf.
|
||||
*
|
||||
* @link https://www.hyperf.io
|
||||
* @document https://hyperf.wiki
|
||||
* @contact group@hyperf.io
|
||||
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
|
||||
*/
|
||||
namespace Hyperf\Amqp\IO;
|
||||
|
||||
use Hyperf\Amqp\Exception\NotSupportedException;
|
||||
use Hyperf\Amqp\Params;
|
||||
use Hyperf\Engine\Constant;
|
||||
use PhpAmqpLib\Wire\IO\AbstractIO;
|
||||
|
||||
class IOFactory implements IOFactoryInterface
|
||||
{
|
||||
public function create(array $config, Params $params): AbstractIO
|
||||
{
|
||||
$host = $config['host'] ?? 'localhost';
|
||||
$port = $config['port'] ?? 5672;
|
||||
|
||||
return match (Constant::ENGINE) {
|
||||
'Swoole' => new SwooleIO(
|
||||
$host,
|
||||
$port,
|
||||
$params->getConnectionTimeout()
|
||||
),
|
||||
default => throw new NotSupportedException()
|
||||
};
|
||||
}
|
||||
}
|
20
src/amqp/src/IO/IOFactoryInterface.php
Normal file
20
src/amqp/src/IO/IOFactoryInterface.php
Normal file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
* This file is part of Hyperf.
|
||||
*
|
||||
* @link https://www.hyperf.io
|
||||
* @document https://hyperf.wiki
|
||||
* @contact group@hyperf.io
|
||||
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
|
||||
*/
|
||||
namespace Hyperf\Amqp\IO;
|
||||
|
||||
use Hyperf\Amqp\Params;
|
||||
use PhpAmqpLib\Wire\IO\AbstractIO;
|
||||
|
||||
interface IOFactoryInterface
|
||||
{
|
||||
public function create(array $config, Params $params): AbstractIO;
|
||||
}
|
@ -22,14 +22,8 @@ use Psr\Container\ContainerInterface;
|
||||
*/
|
||||
class BeforeMainServerStartListener implements ListenerInterface
|
||||
{
|
||||
/**
|
||||
* @var ContainerInterface
|
||||
*/
|
||||
private $container;
|
||||
|
||||
public function __construct(ContainerInterface $container)
|
||||
public function __construct(private ContainerInterface $container)
|
||||
{
|
||||
$this->container = $container;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -21,24 +21,11 @@ use Hyperf\Framework\Event\MainWorkerStart;
|
||||
use Hyperf\Server\Event\MainCoroutineServerStart;
|
||||
use PhpAmqpLib\Exception\AMQPProtocolChannelException;
|
||||
use Psr\Container\ContainerInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
class MainWorkerStartListener implements ListenerInterface
|
||||
{
|
||||
/**
|
||||
* @var ContainerInterface
|
||||
*/
|
||||
private $container;
|
||||
|
||||
/**
|
||||
* @var LoggerInterface
|
||||
*/
|
||||
private $logger;
|
||||
|
||||
public function __construct(ContainerInterface $container, StdoutLoggerInterface $logger)
|
||||
public function __construct(private ContainerInterface $container, private StdoutLoggerInterface $logger)
|
||||
{
|
||||
$this->container = $container;
|
||||
$this->logger = $logger;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -15,7 +15,7 @@ use Hyperf\Amqp\Builder\QueueBuilder;
|
||||
use PhpAmqpLib\Wire\AMQPTable;
|
||||
|
||||
/**
|
||||
* @method ConsumerMessage getQueue()
|
||||
* @method string getQueue()
|
||||
*/
|
||||
trait ConsumerDelayedMessageTrait
|
||||
{
|
||||
@ -24,7 +24,7 @@ trait ConsumerDelayedMessageTrait
|
||||
*/
|
||||
public function getQueueBuilder(): QueueBuilder
|
||||
{
|
||||
return (new QueueBuilder())->setQueue((string) $this->getQueue())
|
||||
return (new QueueBuilder())->setQueue($this->getQueue())
|
||||
->setArguments(new AMQPTable(['x-dead-letter-exchange' => $this->getDeadLetterExchange()]));
|
||||
}
|
||||
|
||||
|
@ -21,30 +21,15 @@ use Psr\Container\ContainerInterface;
|
||||
|
||||
abstract class ConsumerMessage extends Message implements ConsumerMessageInterface
|
||||
{
|
||||
/**
|
||||
* @var ContainerInterface
|
||||
*/
|
||||
public $container;
|
||||
public ?ContainerInterface $container = null;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $queue;
|
||||
protected ?string $queue = null;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
protected $requeue = true;
|
||||
protected bool $requeue = true;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $routingKey = [];
|
||||
protected array|string $routingKey = [];
|
||||
|
||||
/**
|
||||
* @var null|array
|
||||
*/
|
||||
protected $qos = [
|
||||
protected ?array $qos = [
|
||||
'prefetch_size' => 0,
|
||||
'prefetch_count' => 1,
|
||||
'global' => false,
|
||||
|
@ -16,27 +16,15 @@ use Hyperf\Amqp\Exception\MessageException;
|
||||
|
||||
abstract class Message implements MessageInterface
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $poolName = 'default';
|
||||
protected string $poolName = 'default';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $exchange = '';
|
||||
protected string $exchange = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $type = Type::TOPIC;
|
||||
protected string $type = Type::TOPIC;
|
||||
|
||||
/**
|
||||
* @var array|string
|
||||
*/
|
||||
protected $routingKey = '';
|
||||
protected array|string $routingKey = '';
|
||||
|
||||
public function setType(string $type): self
|
||||
public function setType(string $type): static
|
||||
{
|
||||
$this->type = $type;
|
||||
return $this;
|
||||
@ -47,7 +35,7 @@ abstract class Message implements MessageInterface
|
||||
return $this->type;
|
||||
}
|
||||
|
||||
public function setExchange(string $exchange): self
|
||||
public function setExchange(string $exchange): static
|
||||
{
|
||||
$this->exchange = $exchange;
|
||||
return $this;
|
||||
@ -58,13 +46,13 @@ abstract class Message implements MessageInterface
|
||||
return $this->exchange;
|
||||
}
|
||||
|
||||
public function setRoutingKey($routingKey): self
|
||||
public function setRoutingKey($routingKey): static
|
||||
{
|
||||
$this->routingKey = $routingKey;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getRoutingKey()
|
||||
public function getRoutingKey(): array|string
|
||||
{
|
||||
return $this->routingKey;
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ interface MessageInterface
|
||||
|
||||
public function setRoutingKey($routingKey);
|
||||
|
||||
public function getRoutingKey();
|
||||
public function getRoutingKey(): array|string;
|
||||
|
||||
public function getExchangeBuilder(): ExchangeBuilder;
|
||||
|
||||
|
@ -15,9 +15,9 @@ use Hyperf\Amqp\Builder\ExchangeBuilder;
|
||||
use PhpAmqpLib\Wire\AMQPTable;
|
||||
|
||||
/**
|
||||
* @method ProducerMessage getExchange()
|
||||
* @method ProducerMessage getType()
|
||||
* @property ProducerMessage $properties
|
||||
* @method string getExchange()
|
||||
* @method string getType()
|
||||
* @property array $properties
|
||||
*/
|
||||
trait ProducerDelayedMessageTrait
|
||||
{
|
||||
@ -36,7 +36,7 @@ trait ProducerDelayedMessageTrait
|
||||
*/
|
||||
public function getExchangeBuilder(): ExchangeBuilder
|
||||
{
|
||||
return (new ExchangeBuilder())->setExchange((string) $this->getExchange())
|
||||
return (new ExchangeBuilder())->setExchange($this->getExchange())
|
||||
->setType('x-delayed-message')
|
||||
->setArguments(new AMQPTable(['x-delayed-type' => $this->getType()]));
|
||||
}
|
||||
|
@ -17,20 +17,11 @@ use Hyperf\Utils\ApplicationContext;
|
||||
|
||||
abstract class ProducerMessage extends Message implements ProducerMessageInterface
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $payload = '';
|
||||
protected mixed $payload = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $routingKey = '';
|
||||
protected array|string $routingKey = '';
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $properties
|
||||
protected array $properties
|
||||
= [
|
||||
'content_type' => 'text/plain',
|
||||
'delivery_mode' => Constants::DELIVERY_MODE_PERSISTENT,
|
||||
|
@ -17,10 +17,7 @@ use Hyperf\Utils\ApplicationContext;
|
||||
|
||||
abstract class RpcMessage extends Message implements RpcMessageInterface
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $queue = '';
|
||||
protected string $queue = '';
|
||||
|
||||
/**
|
||||
* @var mixed
|
||||
|
@ -13,29 +13,25 @@ namespace Hyperf\Amqp;
|
||||
|
||||
class Params
|
||||
{
|
||||
protected $insist = false;
|
||||
protected bool $insist = false;
|
||||
|
||||
protected $loginMethod = 'AMQPLAIN';
|
||||
protected string $loginMethod = 'AMQPLAIN';
|
||||
|
||||
protected $loginResponse;
|
||||
protected string $locale = 'en_US';
|
||||
|
||||
protected $locale = 'en_US';
|
||||
protected int $connectionTimeout = 3;
|
||||
|
||||
protected $connectionTimeout = 3;
|
||||
protected int $readWriteTimeout = 3;
|
||||
|
||||
protected $readWriteTimeout = 3;
|
||||
protected bool $keepalive = false;
|
||||
|
||||
protected $context;
|
||||
protected int $heartbeat = 0;
|
||||
|
||||
protected $keepalive = false;
|
||||
protected bool $closeOnDestruct = true;
|
||||
|
||||
protected $heartbeat = 0;
|
||||
protected float $channelRpcTimeout = 0.0;
|
||||
|
||||
protected $closeOnDestruct = true;
|
||||
|
||||
protected $channelRpcTimeout = 0.0;
|
||||
|
||||
protected $maxIdleChannels = 10;
|
||||
protected int $maxIdleChannels = 10;
|
||||
|
||||
public function __construct(array $data)
|
||||
{
|
||||
@ -47,10 +43,6 @@ class Params
|
||||
$this->setLoginMethod($data['login_method']);
|
||||
}
|
||||
|
||||
if (isset($data['login_response'])) {
|
||||
$this->setLoginResponse($data['login_response']);
|
||||
}
|
||||
|
||||
if (isset($data['locale'])) {
|
||||
$this->setLocale($data['locale']);
|
||||
}
|
||||
@ -63,10 +55,6 @@ class Params
|
||||
$this->setReadWriteTimeout((int) $data['read_write_timeout']);
|
||||
}
|
||||
|
||||
if (isset($data['context'])) {
|
||||
$this->setContext($data['context']);
|
||||
}
|
||||
|
||||
if (isset($data['keepalive'])) {
|
||||
$this->setKeepalive($data['keepalive']);
|
||||
}
|
||||
@ -98,11 +86,6 @@ class Params
|
||||
return $this->loginMethod;
|
||||
}
|
||||
|
||||
public function getLoginResponse()
|
||||
{
|
||||
return $this->loginResponse;
|
||||
}
|
||||
|
||||
public function getLocale(): string
|
||||
{
|
||||
return $this->locale;
|
||||
@ -118,11 +101,6 @@ class Params
|
||||
return $this->readWriteTimeout;
|
||||
}
|
||||
|
||||
public function getContext()
|
||||
{
|
||||
return $this->context;
|
||||
}
|
||||
|
||||
public function isKeepalive(): bool
|
||||
{
|
||||
return $this->keepalive;
|
||||
@ -154,11 +132,6 @@ class Params
|
||||
$this->loginMethod = $loginMethod;
|
||||
}
|
||||
|
||||
public function setLoginResponse($loginResponse)
|
||||
{
|
||||
$this->loginResponse = $loginResponse;
|
||||
}
|
||||
|
||||
public function setLocale(string $locale)
|
||||
{
|
||||
$this->locale = $locale;
|
||||
@ -174,11 +147,6 @@ class Params
|
||||
$this->readWriteTimeout = $readWriteTimeout;
|
||||
}
|
||||
|
||||
public function setContext($context)
|
||||
{
|
||||
$this->context = $context;
|
||||
}
|
||||
|
||||
public function setKeepalive(bool $keepalive)
|
||||
{
|
||||
$this->keepalive = $keepalive;
|
||||
|
@ -17,40 +17,20 @@ use PhpAmqpLib\Message\AMQPMessage;
|
||||
|
||||
class RpcChannel
|
||||
{
|
||||
/**
|
||||
* @var AMQPChannel
|
||||
*/
|
||||
protected $channel;
|
||||
protected ?Channel $chan = null;
|
||||
|
||||
/**
|
||||
* @var null|Channel
|
||||
*/
|
||||
protected $chan;
|
||||
protected string $correlationId;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $correlationId;
|
||||
protected ?string $queue = null;
|
||||
|
||||
/**
|
||||
* @var null|string
|
||||
*/
|
||||
protected $queue;
|
||||
|
||||
public function __construct(AMQPChannel $channel)
|
||||
public function __construct(protected AMQPChannel $channel)
|
||||
{
|
||||
$this->channel = $channel;
|
||||
$this->correlationId = uniqid();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return static
|
||||
*/
|
||||
public function open()
|
||||
public function open(): static
|
||||
{
|
||||
if ($this->chan) {
|
||||
$this->chan->close();
|
||||
}
|
||||
$this->chan?->close();
|
||||
$this->chan = new Channel(1);
|
||||
return $this;
|
||||
}
|
||||
@ -75,7 +55,7 @@ class RpcChannel
|
||||
return $this->queue;
|
||||
}
|
||||
|
||||
public function setQueue(?string $queue): RpcChannel
|
||||
public function setQueue(?string $queue): static
|
||||
{
|
||||
$this->queue = $queue;
|
||||
return $this;
|
||||
@ -93,10 +73,7 @@ class RpcChannel
|
||||
|
||||
public function close()
|
||||
{
|
||||
if ($this->chan) {
|
||||
$this->chan->close();
|
||||
}
|
||||
|
||||
$this->chan?->close();
|
||||
$this->channel->close();
|
||||
}
|
||||
}
|
||||
|
@ -22,15 +22,8 @@ class RpcClient extends Builder
|
||||
{
|
||||
protected $poolChannels = [];
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
protected $maxChannels;
|
||||
|
||||
public function __construct(ContainerInterface $container, ConnectionFactory $factory, int $maxChannels = 64)
|
||||
public function __construct(ContainerInterface $container, ConnectionFactory $factory, protected int $maxChannels = 64)
|
||||
{
|
||||
$this->maxChannels = $maxChannels;
|
||||
|
||||
parent::__construct($container, $factory);
|
||||
}
|
||||
|
||||
|
@ -38,11 +38,9 @@ class ParamsTest extends TestCase
|
||||
|
||||
$this->assertFalse($params->isInsist());
|
||||
$this->assertSame('AMQPLAIN', $params->getLoginMethod());
|
||||
$this->assertNull($params->getLoginResponse());
|
||||
$this->assertSame('en_US', $params->getLocale());
|
||||
$this->assertSame(3, $params->getConnectionTimeout());
|
||||
$this->assertSame(6, $params->getReadWriteTimeout());
|
||||
$this->assertNull($params->getContext());
|
||||
$this->assertFalse($params->isKeepalive());
|
||||
$this->assertSame(3, $params->getHeartbeat());
|
||||
$this->assertTrue($params->isCloseOnDestruct());
|
||||
|
@ -13,6 +13,7 @@ namespace HyperfTest\Amqp\Stub;
|
||||
|
||||
use Hyperf\Amqp\ConnectionFactory;
|
||||
use Hyperf\Amqp\Consumer;
|
||||
use Hyperf\Amqp\IO\IOFactory;
|
||||
use Hyperf\Amqp\Pool\PoolFactory;
|
||||
use Hyperf\Config\Config;
|
||||
use Hyperf\Contract\ConfigInterface;
|
||||
@ -68,7 +69,7 @@ class ContainerStub
|
||||
return new Consumer($container, $container->get(ConnectionFactory::class), $container->get(StdoutLoggerInterface::class));
|
||||
});
|
||||
$container->shouldReceive('get')->with(FormatterInterface::class)->andReturn(new DefaultFormatter());
|
||||
|
||||
$container->shouldReceive('get')->with(IOFactory::class)->andReturn(new IOFactory());
|
||||
return $container;
|
||||
}
|
||||
|
||||
|
@ -16,14 +16,14 @@ use Hyperf\Amqp\Result;
|
||||
|
||||
class DemoConsumer extends ConsumerMessage
|
||||
{
|
||||
protected $exchange = 'hyperf';
|
||||
protected string $exchange = 'hyperf';
|
||||
|
||||
protected $routingKey = [
|
||||
protected array|string $routingKey = [
|
||||
'hyperf1',
|
||||
'hyperf2',
|
||||
];
|
||||
|
||||
protected $queue = 'hyperf';
|
||||
protected ?string $queue = 'hyperf';
|
||||
|
||||
public function consume($data): string
|
||||
{
|
||||
|
@ -15,9 +15,9 @@ use Hyperf\Amqp\Message\ProducerMessage;
|
||||
|
||||
class DemoProducer extends ProducerMessage
|
||||
{
|
||||
protected $exchange = 'hyperf';
|
||||
protected string $exchange = 'hyperf';
|
||||
|
||||
protected $routingKey = 'hyperf';
|
||||
protected array|string $routingKey = 'hyperf';
|
||||
|
||||
public function __construct($data)
|
||||
{
|
||||
|
@ -16,13 +16,13 @@ use Hyperf\Amqp\Result;
|
||||
|
||||
class QosConsumer extends ConsumerMessage
|
||||
{
|
||||
protected $exchange = 'qos';
|
||||
protected string $exchange = 'qos';
|
||||
|
||||
protected $queue = 'qos.rk.queue';
|
||||
protected ?string $queue = 'qos.rk.queue';
|
||||
|
||||
protected $routingKey = 'qos.rk';
|
||||
protected array|string $routingKey = 'qos.rk';
|
||||
|
||||
protected $qos = [
|
||||
protected ?array $qos = [
|
||||
'prefetch_count' => 10,
|
||||
];
|
||||
|
||||
|
@ -18,9 +18,9 @@
|
||||
"php": ">=7.2",
|
||||
"psr/container": "^1.0|^2.0",
|
||||
"psr/event-dispatcher": "^1.0",
|
||||
"hyperf/contract": "~2.2.8",
|
||||
"hyperf/command": "~2.2.0",
|
||||
"hyperf/utils": "~2.2.0"
|
||||
"hyperf/contract": "~3.0.0",
|
||||
"hyperf/command": "~3.0.0",
|
||||
"hyperf/utils": "~3.0.0"
|
||||
},
|
||||
"suggest": {
|
||||
"hyperf/di": "Required to use annotations.",
|
||||
@ -43,7 +43,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
},
|
||||
"hyperf": {
|
||||
"config": "Hyperf\\AsyncQueue\\ConfigProvider"
|
||||
|
6
src/cache/composer.json
vendored
6
src/cache/composer.json
vendored
@ -18,8 +18,8 @@
|
||||
"php": ">=7.2",
|
||||
"psr/container": "^1.0|^2.0",
|
||||
"psr/simple-cache": "^1.0",
|
||||
"hyperf/contract": "~2.2.0",
|
||||
"hyperf/utils": "~2.2.0"
|
||||
"hyperf/contract": "~3.0.0",
|
||||
"hyperf/utils": "~3.0.0"
|
||||
},
|
||||
"suggest": {
|
||||
"hyperf/di": "Use cache annotations.",
|
||||
@ -40,7 +40,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
},
|
||||
"hyperf": {
|
||||
"config": "Hyperf\\Cache\\ConfigProvider"
|
||||
|
@ -16,7 +16,7 @@
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.2",
|
||||
"hyperf/utils": "~2.2.0",
|
||||
"hyperf/utils": "~3.0.0",
|
||||
"psr/container": "^1.0|^2.0"
|
||||
},
|
||||
"suggest": {
|
||||
@ -38,7 +38,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
},
|
||||
"hyperf": {
|
||||
"config": "Hyperf\\CircuitBreaker\\ConfigProvider"
|
||||
|
@ -20,7 +20,7 @@
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.2",
|
||||
"hyperf/utils": "~2.2.0",
|
||||
"hyperf/utils": "~3.0.0",
|
||||
"psr/event-dispatcher": "^1.0",
|
||||
"symfony/console": "^5.0"
|
||||
},
|
||||
@ -32,7 +32,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -20,9 +20,9 @@
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.2",
|
||||
"hyperf/config-center": "~2.2.0",
|
||||
"hyperf/contract": "~2.2.0",
|
||||
"hyperf/guzzle": "~2.2.0",
|
||||
"hyperf/config-center": "~3.0.0",
|
||||
"hyperf/contract": "~3.0.0",
|
||||
"hyperf/guzzle": "~3.0.0",
|
||||
"psr/container": "^1.0|^2.0"
|
||||
},
|
||||
"autoload": {
|
||||
@ -35,7 +35,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
},
|
||||
"hyperf": {
|
||||
"config": "Hyperf\\ConfigAliyunAcm\\ConfigProvider"
|
||||
|
@ -20,9 +20,9 @@
|
||||
"require": {
|
||||
"php": ">=7.2",
|
||||
"psr/container": "^1.0|^2.0",
|
||||
"hyperf/contract": "~2.2.0",
|
||||
"hyperf/config-center": "~2.2.0",
|
||||
"hyperf/utils": "~2.2.0"
|
||||
"hyperf/contract": "~3.0.0",
|
||||
"hyperf/config-center": "~3.0.0",
|
||||
"hyperf/utils": "~3.0.0"
|
||||
},
|
||||
"suggest": {
|
||||
"hyperf/process": "Use hyperf process to run ConfigFetcherProcess."
|
||||
@ -42,7 +42,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
},
|
||||
"hyperf": {
|
||||
"config": "Hyperf\\ConfigApollo\\ConfigProvider"
|
||||
|
@ -35,7 +35,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
},
|
||||
"hyperf": {
|
||||
"config": "Hyperf\\ConfigCenter\\ConfigProvider"
|
||||
|
@ -21,9 +21,9 @@
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.2",
|
||||
"hyperf/config-center": "~2.2.0",
|
||||
"hyperf/etcd": "~2.2.0",
|
||||
"hyperf/utils": "~2.2.0"
|
||||
"hyperf/config-center": "~3.0.0",
|
||||
"hyperf/etcd": "~3.0.0",
|
||||
"hyperf/utils": "~3.0.0"
|
||||
},
|
||||
"config": {
|
||||
"sort-packages": true
|
||||
@ -34,7 +34,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
},
|
||||
"hyperf": {
|
||||
"config": "Hyperf\\ConfigEtcd\\ConfigProvider"
|
||||
|
@ -27,11 +27,11 @@
|
||||
}
|
||||
},
|
||||
"require": {
|
||||
"hyperf/config-center": "~2.2.0",
|
||||
"hyperf/contract": "~2.2.0",
|
||||
"hyperf/guzzle": "~2.2.0",
|
||||
"hyperf/nacos": "~2.2.0",
|
||||
"hyperf/utils": "~2.2.0"
|
||||
"hyperf/config-center": "~3.0.0",
|
||||
"hyperf/contract": "~3.0.0",
|
||||
"hyperf/guzzle": "~3.0.0",
|
||||
"hyperf/nacos": "~3.0.0",
|
||||
"hyperf/utils": "~3.0.0"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-json": "*",
|
||||
@ -46,7 +46,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
},
|
||||
"hyperf": {
|
||||
"config": "Hyperf\\ConfigNacos\\ConfigProvider"
|
||||
|
@ -20,7 +20,7 @@
|
||||
"require": {
|
||||
"php": ">=7.2",
|
||||
"psr/container": "^1.0|^2.0",
|
||||
"hyperf/contract": "~2.2.0"
|
||||
"hyperf/contract": "~3.0.0"
|
||||
},
|
||||
"suggest": {
|
||||
"hyperf/process": "Use hyperf process to run ConfigFetcherProcess.",
|
||||
@ -41,7 +41,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
},
|
||||
"hyperf": {
|
||||
"config": "Hyperf\\ConfigZookeeper\\ConfigProvider"
|
||||
|
@ -18,8 +18,8 @@
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.2",
|
||||
"hyperf/contract": "~2.2.0",
|
||||
"hyperf/utils": "~2.2.0",
|
||||
"hyperf/contract": "~3.0.0",
|
||||
"hyperf/utils": "~3.0.0",
|
||||
"psr/container": "^1.0|^2.0",
|
||||
"symfony/finder": "^5.0"
|
||||
},
|
||||
@ -47,7 +47,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
},
|
||||
"hyperf": {
|
||||
"config": "Hyperf\\Config\\ConfigProvider"
|
||||
|
@ -16,8 +16,8 @@
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.2",
|
||||
"hyperf/di": "~2.2.0",
|
||||
"hyperf/utils": "~2.2.0"
|
||||
"hyperf/di": "~3.0.0",
|
||||
"hyperf/utils": "~3.0.0"
|
||||
},
|
||||
"suggest": {
|
||||
"hyperf/translation": "Required to use translation."
|
||||
@ -37,7 +37,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
},
|
||||
"hyperf": {
|
||||
"config": "Hyperf\\Constants\\ConfigProvider"
|
||||
|
@ -18,7 +18,7 @@
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.2",
|
||||
"hyperf/guzzle": "~2.2.0"
|
||||
"hyperf/guzzle": "~3.0.0"
|
||||
},
|
||||
"suggest": {
|
||||
},
|
||||
@ -37,7 +37,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
},
|
||||
"hyperf": {
|
||||
"config": "Hyperf\\Consul\\ConfigProvider"
|
||||
|
@ -27,7 +27,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.2",
|
||||
"hyperf/utils": "~2.2.0",
|
||||
"hyperf/utils": "~3.0.0",
|
||||
"nesbot/carbon": "^2.0"
|
||||
},
|
||||
"autoload": {
|
||||
@ -35,7 +35,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
},
|
||||
"hyperf": {
|
||||
"config": "Hyperf\\Crontab\\ConfigProvider"
|
||||
|
@ -16,7 +16,7 @@
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.3",
|
||||
"hyperf/utils": "~2.2.0"
|
||||
"hyperf/utils": "~3.0.0"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
@ -36,7 +36,7 @@
|
||||
"config": "Hyperf\\Dag\\ConfigProvider"
|
||||
},
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -16,8 +16,8 @@
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.2",
|
||||
"hyperf/macroable": "~2.2.0",
|
||||
"hyperf/utils": "~2.2.8",
|
||||
"hyperf/macroable": "~3.0.0",
|
||||
"hyperf/utils": "~3.0.0",
|
||||
"nesbot/carbon": "^2.0",
|
||||
"psr/container": "^1.0|^2.0",
|
||||
"psr/event-dispatcher": "^1.0"
|
||||
@ -42,7 +42,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -17,12 +17,12 @@
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.2",
|
||||
"hyperf/framework": "~2.2.0",
|
||||
"hyperf/database": "~2.2.0",
|
||||
"hyperf/di": "~2.2.0",
|
||||
"hyperf/model-listener": "~2.2.0",
|
||||
"hyperf/pool": "~2.2.0",
|
||||
"hyperf/utils": "~2.2.0"
|
||||
"hyperf/framework": "~3.0.0",
|
||||
"hyperf/database": "~3.0.0",
|
||||
"hyperf/di": "~3.0.0",
|
||||
"hyperf/model-listener": "~3.0.0",
|
||||
"hyperf/pool": "~3.0.0",
|
||||
"hyperf/utils": "~3.0.0"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
@ -39,7 +39,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
},
|
||||
"hyperf": {
|
||||
"config": "Hyperf\\DbConnection\\ConfigProvider"
|
||||
|
@ -19,10 +19,10 @@
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.2",
|
||||
"hyperf/config": "~2.2.0",
|
||||
"hyperf/contract": "~2.2.0",
|
||||
"hyperf/pool": "~2.2.0",
|
||||
"hyperf/utils": "~2.2.0",
|
||||
"hyperf/config": "~3.0.0",
|
||||
"hyperf/contract": "~3.0.0",
|
||||
"hyperf/pool": "~3.0.0",
|
||||
"hyperf/utils": "~3.0.0",
|
||||
"psr/container": "^1.0|^2.0"
|
||||
},
|
||||
"suggest": {
|
||||
@ -33,7 +33,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
},
|
||||
"hyperf": {
|
||||
"config": "Hyperf\\DB\\ConfigProvider"
|
||||
|
@ -17,10 +17,10 @@
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.2",
|
||||
"hyperf/command": "~2.2.0",
|
||||
"hyperf/contract": "~2.2.0",
|
||||
"hyperf/di": "~2.2.0",
|
||||
"hyperf/utils": "~2.2.0"
|
||||
"hyperf/command": "~3.0.0",
|
||||
"hyperf/contract": "~3.0.0",
|
||||
"hyperf/di": "~3.0.0",
|
||||
"hyperf/utils": "~3.0.0"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
@ -37,7 +37,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
},
|
||||
"hyperf": {
|
||||
"config": "Hyperf\\Devtool\\ConfigProvider"
|
||||
|
@ -17,7 +17,7 @@
|
||||
"source": "https://github.com/hyperf/hyperf"
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.3",
|
||||
"php": ">=8.0",
|
||||
"doctrine/annotations": "^1.6",
|
||||
"doctrine/instantiator": "^1.0",
|
||||
"nikic/php-parser": "^4.1",
|
||||
@ -45,7 +45,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
},
|
||||
"hyperf": {
|
||||
"config": "Hyperf\\Di\\ConfigProvider"
|
||||
|
@ -22,7 +22,7 @@
|
||||
"psr/container": "^1.0|^2.0",
|
||||
"psr/http-server-middleware": "^1.0",
|
||||
"psr/http-message": "^1.0",
|
||||
"hyperf/contract": "~2.2.0"
|
||||
"hyperf/contract": "~3.0.0"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
@ -39,7 +39,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
},
|
||||
"hyperf": {
|
||||
"config": "Hyperf\\Dispatcher\\ConfigProvider"
|
||||
|
@ -21,14 +21,14 @@
|
||||
"require": {
|
||||
"php": ">=7.0",
|
||||
"elasticsearch/elasticsearch": "^7.0",
|
||||
"hyperf/guzzle": "~2.2.0"
|
||||
"hyperf/guzzle": "~3.0.0"
|
||||
},
|
||||
"config": {
|
||||
"sort-packages": true
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -10,8 +10,8 @@
|
||||
"description": "Etcd Client for Hyperf.",
|
||||
"require": {
|
||||
"php": ">=7.2",
|
||||
"hyperf/guzzle": "~2.2.0",
|
||||
"hyperf/utils": "~2.2.0"
|
||||
"hyperf/guzzle": "~3.0.0",
|
||||
"hyperf/utils": "~3.0.0"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
@ -28,7 +28,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
},
|
||||
"hyperf": {
|
||||
"config": "Hyperf\\Etcd\\ConfigProvider"
|
||||
|
@ -17,7 +17,7 @@
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.2",
|
||||
"hyperf/contract": "~2.2.0",
|
||||
"hyperf/contract": "~3.0.0",
|
||||
"psr/event-dispatcher": "^1.0"
|
||||
},
|
||||
"suggest": {
|
||||
@ -38,7 +38,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
},
|
||||
"hyperf": {
|
||||
"config": "Hyperf\\Event\\ConfigProvider"
|
||||
|
@ -16,9 +16,9 @@
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.2",
|
||||
"hyperf/contract": "~2.2.0",
|
||||
"hyperf/dispatcher": "~2.2.0",
|
||||
"hyperf/utils": "~2.2.0",
|
||||
"hyperf/contract": "~3.0.0",
|
||||
"hyperf/dispatcher": "~3.0.0",
|
||||
"hyperf/utils": "~3.0.0",
|
||||
"psr/container": "^1.0|^2.0",
|
||||
"psr/http-message": "^1.0"
|
||||
},
|
||||
@ -37,7 +37,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
},
|
||||
"hyperf": {
|
||||
"config": "Hyperf\\ExceptionHandler\\ConfigProvider"
|
||||
|
@ -9,7 +9,7 @@
|
||||
"description": "flysystem integration for hyperf",
|
||||
"require": {
|
||||
"php": ">=7.2",
|
||||
"hyperf/di": "~2.2.0",
|
||||
"hyperf/di": "~3.0.0",
|
||||
"league/flysystem": "^1.0|^2.0"
|
||||
},
|
||||
"suggest": {
|
||||
@ -45,7 +45,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
},
|
||||
"hyperf": {
|
||||
"config": "Hyperf\\Filesystem\\ConfigProvider"
|
||||
|
@ -20,8 +20,8 @@
|
||||
"require": {
|
||||
"php": ">=7.2",
|
||||
"fig/http-message-util": "^1.1.2",
|
||||
"hyperf/contract": "~2.2.0",
|
||||
"hyperf/utils": "~2.2.0",
|
||||
"hyperf/contract": "~3.0.0",
|
||||
"hyperf/utils": "~3.0.0",
|
||||
"psr/container": "^1.0|^2.0",
|
||||
"psr/event-dispatcher": "^1.0",
|
||||
"psr/log": "^1.0|^2.0|^3.0"
|
||||
@ -48,7 +48,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
},
|
||||
"hyperf": {
|
||||
"config": "Hyperf\\Framework\\ConfigProvider"
|
||||
|
@ -11,8 +11,8 @@
|
||||
"require": {
|
||||
"php": ">=7.2",
|
||||
"thecodingmachine/graphqlite": "^3.0",
|
||||
"hyperf/contract": "~2.2.0",
|
||||
"hyperf/di": "~2.2.0"
|
||||
"hyperf/contract": "~3.0.0",
|
||||
"hyperf/di": "~3.0.0"
|
||||
},
|
||||
"suggest": {
|
||||
"hyperf/http-server": "Required to use GraphQLMiddleware.",
|
||||
@ -25,7 +25,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
},
|
||||
"hyperf": {
|
||||
"config": "Hyperf\\GraphQL\\ConfigProvider"
|
||||
|
@ -18,8 +18,8 @@
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.2",
|
||||
"hyperf/grpc": "~2.2.0",
|
||||
"hyperf/utils": "~2.2.0",
|
||||
"hyperf/grpc": "~3.0.0",
|
||||
"hyperf/utils": "~3.0.0",
|
||||
"jean85/pretty-package-versions": "^1.2|^2.0"
|
||||
},
|
||||
"autoload": {
|
||||
@ -40,7 +40,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
},
|
||||
"hyperf": {
|
||||
"config": "Hyperf\\GrpcClient\\ConfigProvider"
|
||||
|
@ -18,11 +18,11 @@
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.2",
|
||||
"hyperf/di": "~2.2.0",
|
||||
"hyperf/utils": "~2.2.0",
|
||||
"hyperf/http-server": "~2.2.0",
|
||||
"hyperf/http-message": "~2.2.0",
|
||||
"hyperf/grpc": "~2.2.0"
|
||||
"hyperf/di": "~3.0.0",
|
||||
"hyperf/utils": "~3.0.0",
|
||||
"hyperf/http-server": "~3.0.0",
|
||||
"hyperf/http-message": "~3.0.0",
|
||||
"hyperf/grpc": "~3.0.0"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
@ -39,7 +39,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
},
|
||||
"hyperf": {
|
||||
"config": "Hyperf\\GrpcServer\\ConfigProvider"
|
||||
|
@ -32,7 +32,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -12,7 +12,7 @@
|
||||
"require": {
|
||||
"php": ">=7.0",
|
||||
"guzzlehttp/guzzle": "^6.3|^7.0",
|
||||
"hyperf/utils": "~2.2.0",
|
||||
"hyperf/utils": "~3.0.0",
|
||||
"psr/container": "^1.0|^2.0",
|
||||
"psr/http-message": "^1.0"
|
||||
},
|
||||
@ -34,7 +34,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
},
|
||||
"hyperf": {
|
||||
"config": "Hyperf\\Guzzle\\ConfigProvider"
|
||||
|
@ -10,7 +10,7 @@
|
||||
"http-message"
|
||||
],
|
||||
"require": {
|
||||
"hyperf/utils": "~2.2.0",
|
||||
"hyperf/utils": "~3.0.0",
|
||||
"laminas/laminas-mime": "^2.7",
|
||||
"psr/http-message": "^1.0"
|
||||
},
|
||||
@ -32,7 +32,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
},
|
||||
"hyperf": {
|
||||
"config": "Hyperf\\HttpMessage\\ConfigProvider"
|
||||
|
@ -18,14 +18,14 @@
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.2",
|
||||
"hyperf/contract": "~2.2.0",
|
||||
"hyperf/dispatcher": "~2.2.0",
|
||||
"hyperf/event": "~2.2.0",
|
||||
"hyperf/exception-handler": "~2.2.0",
|
||||
"hyperf/http-message": "~2.2.0",
|
||||
"hyperf/macroable": "~2.2.0",
|
||||
"hyperf/server": "~2.2.0",
|
||||
"hyperf/utils": "~2.2.0",
|
||||
"hyperf/contract": "~3.0.0",
|
||||
"hyperf/dispatcher": "~3.0.0",
|
||||
"hyperf/event": "~3.0.0",
|
||||
"hyperf/exception-handler": "~3.0.0",
|
||||
"hyperf/http-message": "~3.0.0",
|
||||
"hyperf/macroable": "~3.0.0",
|
||||
"hyperf/server": "~3.0.0",
|
||||
"hyperf/utils": "~3.0.0",
|
||||
"nikic/fast-route": "^1.3",
|
||||
"psr/container": "^1.0|^2.0"
|
||||
},
|
||||
@ -47,7 +47,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
},
|
||||
"hyperf": {
|
||||
"config": "Hyperf\\HttpServer\\ConfigProvider"
|
||||
|
@ -25,7 +25,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -18,11 +18,11 @@
|
||||
"require": {
|
||||
"php": ">=7.2",
|
||||
"psr/container": "^1.0|^2.0",
|
||||
"hyperf/contract": "~2.2.0",
|
||||
"hyperf/load-balancer": "~2.2.0",
|
||||
"hyperf/http-message": "~2.2.0",
|
||||
"hyperf/rpc": "~2.2.0",
|
||||
"hyperf/utils": "~2.2.0"
|
||||
"hyperf/contract": "~3.0.0",
|
||||
"hyperf/load-balancer": "~3.0.0",
|
||||
"hyperf/http-message": "~3.0.0",
|
||||
"hyperf/rpc": "~3.0.0",
|
||||
"hyperf/utils": "~3.0.0"
|
||||
},
|
||||
"suggest": {
|
||||
"hyperf/event": "Register the objects to ProtocolManager automatically.",
|
||||
@ -46,7 +46,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
},
|
||||
"hyperf": {
|
||||
"config": "Hyperf\\JsonRpc\\ConfigProvider"
|
||||
|
@ -16,9 +16,9 @@
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.2",
|
||||
"hyperf/pool": "~2.2.0",
|
||||
"hyperf/process": "~2.2.0",
|
||||
"hyperf/utils": "~2.2.0",
|
||||
"hyperf/pool": "~3.0.0",
|
||||
"hyperf/process": "~3.0.0",
|
||||
"hyperf/utils": "~3.0.0",
|
||||
"longlang/phpkafka": "^1.1.4",
|
||||
"psr/container": "^1.0|^2.0"
|
||||
},
|
||||
@ -37,7 +37,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
},
|
||||
"hyperf": {
|
||||
"config": "Hyperf\\Kafka\\ConfigProvider"
|
||||
|
@ -34,7 +34,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
},
|
||||
"hyperf": {
|
||||
"config": "Hyperf\\LoadBalancer\\ConfigProvider"
|
||||
|
@ -18,8 +18,8 @@
|
||||
"php": ">=7.2",
|
||||
"psr/log": "^1.0|^2.0|^3.0",
|
||||
"psr/container": "^1.0|^2.0",
|
||||
"hyperf/contract": "~2.2.0",
|
||||
"hyperf/utils": "~2.2.0",
|
||||
"hyperf/contract": "~3.0.0",
|
||||
"hyperf/utils": "~3.0.0",
|
||||
"monolog/monolog": "^2.0"
|
||||
},
|
||||
"autoload": {
|
||||
@ -37,7 +37,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
},
|
||||
"hyperf": {
|
||||
"config": "Hyperf\\Logger\\ConfigProvider"
|
||||
|
@ -33,7 +33,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -32,7 +32,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
},
|
||||
"hyperf": {
|
||||
"config": "Hyperf\\Memory\\ConfigProvider"
|
||||
|
@ -12,9 +12,9 @@
|
||||
"description": "hyperf metric component",
|
||||
"require": {
|
||||
"php": ">=7.3",
|
||||
"hyperf/contract": "~2.2.0",
|
||||
"hyperf/guzzle": "~2.2.0",
|
||||
"hyperf/utils": "~2.2.0",
|
||||
"hyperf/contract": "~3.0.0",
|
||||
"hyperf/guzzle": "~3.0.0",
|
||||
"hyperf/utils": "~3.0.0",
|
||||
"promphp/prometheus_client_php": "2.2.*",
|
||||
"psr/container": "^1.0|^2.0",
|
||||
"psr/event-dispatcher": "^1.0",
|
||||
@ -47,7 +47,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
},
|
||||
"hyperf": {
|
||||
"config": "Hyperf\\Metric\\ConfigProvider"
|
||||
|
@ -18,9 +18,9 @@
|
||||
"php": ">=7.2",
|
||||
"psr/simple-cache": "^1.0",
|
||||
"psr/container": "^1.0|^2.0",
|
||||
"hyperf/contract": "~2.2.0",
|
||||
"hyperf/db-connection": "~2.2.0",
|
||||
"hyperf/utils": "~2.2.0"
|
||||
"hyperf/contract": "~3.0.0",
|
||||
"hyperf/db-connection": "~3.0.0",
|
||||
"hyperf/utils": "~3.0.0"
|
||||
},
|
||||
"suggest": {
|
||||
"hyperf/event": "Required to use DeleteCacheListener."
|
||||
@ -40,7 +40,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
},
|
||||
"hyperf": {
|
||||
"config": "Hyperf\\ModelCache\\ConfigProvider"
|
||||
|
@ -17,11 +17,11 @@
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.2",
|
||||
"hyperf/contract": "~2.2.0",
|
||||
"hyperf/database": "~2.2.0",
|
||||
"hyperf/di": "~2.2.0",
|
||||
"hyperf/event": "~2.2.0",
|
||||
"hyperf/utils": "~2.2.0",
|
||||
"hyperf/contract": "~3.0.0",
|
||||
"hyperf/database": "~3.0.0",
|
||||
"hyperf/di": "~3.0.0",
|
||||
"hyperf/event": "~3.0.0",
|
||||
"hyperf/utils": "~3.0.0",
|
||||
"psr/container": "^1.0|^2.0"
|
||||
},
|
||||
"autoload": {
|
||||
@ -39,7 +39,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
},
|
||||
"hyperf": {
|
||||
"config": "Hyperf\\ModelListener\\ConfigProvider"
|
||||
|
@ -21,15 +21,15 @@
|
||||
"require": {
|
||||
"php": ">=7.3",
|
||||
"guzzlehttp/guzzle": "^6.5|^7.0",
|
||||
"hyperf/contract": "~2.2.0",
|
||||
"hyperf/utils": "~2.2.0"
|
||||
"hyperf/contract": "~3.0.0",
|
||||
"hyperf/utils": "~3.0.0"
|
||||
},
|
||||
"config": {
|
||||
"sort-packages": true
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
},
|
||||
"hyperf": {
|
||||
"config": "Hyperf\\Nacos\\ConfigProvider"
|
||||
|
@ -17,9 +17,9 @@
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.2",
|
||||
"hyperf/contract": "~2.2.0",
|
||||
"hyperf/pool": "~2.2.0",
|
||||
"hyperf/utils": "~2.2.0",
|
||||
"hyperf/contract": "~3.0.0",
|
||||
"hyperf/pool": "~3.0.0",
|
||||
"hyperf/utils": "~3.0.0",
|
||||
"ircmaxell/random-lib": "^1.2",
|
||||
"psr/container": "^1.0|^2.0",
|
||||
"psr/event-dispatcher": "^1.0"
|
||||
@ -48,7 +48,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
},
|
||||
"hyperf": {
|
||||
"config": "Hyperf\\Nats\\ConfigProvider"
|
||||
|
@ -18,8 +18,8 @@
|
||||
"require": {
|
||||
"php": ">=7.2",
|
||||
"ext-bcmath": "*",
|
||||
"hyperf/contract": "~2.2.0",
|
||||
"hyperf/utils": "~2.2.0",
|
||||
"hyperf/contract": "~3.0.0",
|
||||
"hyperf/utils": "~3.0.0",
|
||||
"jean85/pretty-package-versions": "^1.2|^2.0"
|
||||
},
|
||||
"suggest": {
|
||||
@ -40,7 +40,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
},
|
||||
"hyperf": {
|
||||
"config": "Hyperf\\Nsq\\ConfigProvider"
|
||||
|
@ -16,8 +16,8 @@
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.2",
|
||||
"hyperf/contract": "~2.2.0",
|
||||
"hyperf/utils": "~2.2.0"
|
||||
"hyperf/contract": "~3.0.0",
|
||||
"hyperf/utils": "~3.0.0"
|
||||
},
|
||||
"suggest": {
|
||||
"hyperf/event": "Reqiured to use PageResolverListener.",
|
||||
@ -39,7 +39,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
},
|
||||
"hyperf": {
|
||||
"config": "Hyperf\\Paginator\\ConfigProvider"
|
||||
|
@ -28,8 +28,8 @@
|
||||
"require": {
|
||||
"php": ">=7.2",
|
||||
"ext-json": "*",
|
||||
"hyperf/command": "~2.2.0",
|
||||
"hyperf/contract": "~2.2.0",
|
||||
"hyperf/command": "~3.0.0",
|
||||
"hyperf/contract": "~3.0.0",
|
||||
"nikic/php-parser": "^4.1",
|
||||
"psr/container": "^1.0|^2.0"
|
||||
},
|
||||
@ -38,7 +38,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
},
|
||||
"hyperf": {
|
||||
"config": "Hyperf\\Phar\\ConfigProvider"
|
||||
|
@ -18,8 +18,8 @@
|
||||
"require": {
|
||||
"php": ">=7.2",
|
||||
"psr/container": "^1.0|^2.0",
|
||||
"hyperf/contract": "~2.2.0",
|
||||
"hyperf/utils": "~2.2.0"
|
||||
"hyperf/contract": "~3.0.0",
|
||||
"hyperf/utils": "~3.0.0"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
@ -36,7 +36,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
},
|
||||
"hyperf": {
|
||||
"config": "Hyperf\\Pool\\ConfigProvider"
|
||||
|
@ -18,8 +18,8 @@
|
||||
"php": ">=7.2",
|
||||
"psr/container": "^1.0|^2.0",
|
||||
"psr/event-dispatcher": "^1.0",
|
||||
"hyperf/contract": "~2.2.0",
|
||||
"hyperf/utils": "~2.2.0"
|
||||
"hyperf/contract": "~3.0.0",
|
||||
"hyperf/utils": "~3.0.0"
|
||||
},
|
||||
"suggest": {
|
||||
"hyperf/di": "Required to use annotations.",
|
||||
@ -41,7 +41,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
},
|
||||
"hyperf": {
|
||||
"config": "Hyperf\\Process\\ConfigProvider"
|
||||
|
@ -17,7 +17,7 @@
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.2",
|
||||
"hyperf/contract": "~2.2.0"
|
||||
"hyperf/contract": "~3.0.0"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
@ -34,7 +34,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
},
|
||||
"hyperf": {
|
||||
"config": "Hyperf\\Protocol\\ConfigProvider"
|
||||
|
@ -19,7 +19,7 @@
|
||||
"php": ">=7.2",
|
||||
"psr/container": "^1.0|^2.0",
|
||||
"psr/simple-cache": "^1.0",
|
||||
"hyperf/utils": "~2.2.0",
|
||||
"hyperf/utils": "~3.0.0",
|
||||
"bandwidth-throttle/token-bucket": "^2.0"
|
||||
},
|
||||
"suggest": {
|
||||
@ -43,7 +43,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
},
|
||||
"hyperf": {
|
||||
"config": "Hyperf\\RateLimit\\ConfigProvider"
|
||||
|
@ -10,8 +10,8 @@
|
||||
"require": {
|
||||
"php": ">=7.2",
|
||||
"ext-swoole": ">=4.5",
|
||||
"hyperf/contract": "~2.2.0",
|
||||
"hyperf/utils": "~2.2.0",
|
||||
"hyperf/contract": "~3.0.0",
|
||||
"hyperf/utils": "~3.0.0",
|
||||
"reactivex/rxphp": "^2.0"
|
||||
},
|
||||
"suggest": {
|
||||
@ -33,7 +33,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
},
|
||||
"hyperf": {
|
||||
"config": "Hyperf\\ReactiveX\\ConfigProvider"
|
||||
|
@ -18,9 +18,9 @@
|
||||
"require": {
|
||||
"php": ">=7.2",
|
||||
"ext-redis": "*",
|
||||
"hyperf/contract": "~2.2.0",
|
||||
"hyperf/pool": "~2.2.0",
|
||||
"hyperf/utils": "~2.2.0",
|
||||
"hyperf/contract": "~3.0.0",
|
||||
"hyperf/pool": "~3.0.0",
|
||||
"hyperf/utils": "~3.0.0",
|
||||
"psr/container": "^1.0|^2.0"
|
||||
},
|
||||
"suggest": {
|
||||
@ -42,7 +42,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
},
|
||||
"hyperf": {
|
||||
"config": "Hyperf\\Redis\\ConfigProvider"
|
||||
|
@ -17,8 +17,8 @@
|
||||
"source": "https://github.com/hyperf/hyperf"
|
||||
},
|
||||
"require": {
|
||||
"hyperf/grpc-server": "~2.2.0",
|
||||
"hyperf/resource": "~2.2.0"
|
||||
"hyperf/grpc-server": "~3.0.0",
|
||||
"hyperf/resource": "~3.0.0"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
@ -35,7 +35,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
},
|
||||
"hyperf": {
|
||||
"config": "Hyperf\\ResourceGrpc\\ConfigProvider"
|
||||
|
@ -18,9 +18,9 @@
|
||||
"require": {
|
||||
"php": ">=7.2",
|
||||
"ext-json": "*",
|
||||
"hyperf/http-message": "~2.2.0",
|
||||
"hyperf/paginator": "~2.2.0",
|
||||
"hyperf/utils": "~2.2.0",
|
||||
"hyperf/http-message": "~3.0.0",
|
||||
"hyperf/paginator": "~3.0.0",
|
||||
"hyperf/utils": "~3.0.0",
|
||||
"psr/container": "^1.0|^2.0"
|
||||
},
|
||||
"autoload": {
|
||||
@ -38,7 +38,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
},
|
||||
"hyperf": {
|
||||
"config": "Hyperf\\Resource\\ConfigProvider"
|
||||
|
@ -17,7 +17,7 @@
|
||||
"require": {
|
||||
"php": ">=7.2",
|
||||
"psr/container": "^1.0|^2.0",
|
||||
"hyperf/utils": "~2.2.0"
|
||||
"hyperf/utils": "~3.0.0"
|
||||
},
|
||||
"suggest": {
|
||||
"hyperf/contract": "Required to use annotations.",
|
||||
@ -38,7 +38,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
},
|
||||
"hyperf": {
|
||||
"config": "Hyperf\\Retry\\ConfigProvider"
|
||||
|
@ -20,9 +20,9 @@
|
||||
"require": {
|
||||
"php": ">=7.2",
|
||||
"psr/container": "^1.0|^2.0",
|
||||
"hyperf/rpc": "~2.2.0",
|
||||
"hyperf/load-balancer": "~2.2.0",
|
||||
"hyperf/utils": "~2.2.0"
|
||||
"hyperf/rpc": "~3.0.0",
|
||||
"hyperf/load-balancer": "~3.0.0",
|
||||
"hyperf/utils": "~3.0.0"
|
||||
},
|
||||
"suggest": {
|
||||
"hyperf/service-governance": "Required to fetch the nodes info from service governance.",
|
||||
@ -44,7 +44,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
},
|
||||
"hyperf": {
|
||||
"config": "Hyperf\\RpcClient\\ConfigProvider"
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user