Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修复一些注解问题 #605

Merged
merged 2 commits into from
Oct 25, 2023
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
2 changes: 1 addition & 1 deletion src/Components/amqp/example/AMQP/Test/TestPublisher.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
/**
* @Bean("TestPublisher")
*
* @Publisher(tag="tag-imi", queue="queue-imi-2", exchange="exchange-imi", routingKey="imi-2")
* @Publisher(queue="queue-imi-2", exchange="exchange-imi", routingKey="imi-2")
*
* @Queue(name="queue-imi-2", routingKey="imi-2")
*
Expand Down
2 changes: 1 addition & 1 deletion src/Components/amqp/src/Queue/AMQPQueueDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
/**
* AMQP 队列驱动.
*
* @Bean(name="AMQPQueueDriver", recursive=false)
* @Bean(name="AMQPQueueDriver", recursion=false)
*/
class AMQPQueueDriver implements IQueueDriver
{
Expand Down
2 changes: 1 addition & 1 deletion src/Components/grpc/src/Listener/WorkerExit.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

/**
* @Listener(eventName="IMI.MAIN_SERVER.WORKER.EXIT", priority=Imi\Util\ImiPriority::IMI_MIN)
* @Listener("IMI.PROCESS.END", priority=-19940311)
* @Listener(eventName="IMI.PROCESS.END", priority=-19940311)
*/
class WorkerExit implements IEventListener
{
Expand Down
20 changes: 10 additions & 10 deletions src/Lock/Annotation/Lockable.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
*
* @Target({"METHOD", "ANNOTATION"})
*
* @property string|null $id 锁ID;支持{id}、{data.name}形式,代入参数;如果为null,则使用类名+方法名+全部参数,序列化后hash
* @property string|null $type 锁类型,如:RedisLock;为null则使用默认锁类型(@currentServer.lock.defaultType)
* @property int|null $waitTimeout 等待锁超时时间,单位:毫秒,0为不限制
* @property int|null $lockExpire 锁超时时间,单位:毫秒
* @property array $options 锁初始化参数
* @property callable|null $afterLock 当获得锁后执行的回调。该回调返回非 null 则不执行加锁后的方法,本回调的返回值将作为返回值;一般用于防止缓存击穿,获得锁后再做一次检测;如果为{"$this", "methodName"}格式,$this将会被替换为当前类,方法必须为 public 或 protected
* @property bool $useConfig 允许注解引用配置文件中相同锁id的配置
* @property bool|null $timeoutException 执行超时抛出异常
* @property bool|null $unlockException 解锁失败抛出异常
* @property string|null $id 锁ID;支持{id}、{data.name}形式,代入参数;如果为null,则使用类名+方法名+全部参数,序列化后hash
* @property string|null $type 锁类型,如:RedisLock;为null则使用默认锁类型(@currentServer.lock.defaultType)
* @property int|null $waitTimeout 等待锁超时时间,单位:毫秒,0为不限制
* @property int|null $lockExpire 锁超时时间,单位:毫秒
* @property array $options 锁初始化参数
* @property callable|array|null $afterLock 当获得锁后执行的回调。该回调返回非 null 则不执行加锁后的方法,本回调的返回值将作为返回值;一般用于防止缓存击穿,获得锁后再做一次检测;如果为{"$this", "methodName"}格式,$this将会被替换为当前类,方法必须为 public 或 protected
* @property bool $useConfig 允许注解引用配置文件中相同锁id的配置
* @property bool|null $timeoutException 执行超时抛出异常
* @property bool|null $unlockException 解锁失败抛出异常
*/
#[\Attribute(\Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)]
class Lockable extends Base
Expand All @@ -34,7 +34,7 @@ public function __construct(
?int $waitTimeout = null,
?int $lockExpire = null,
array $options = [],
?callable $afterLock = null,
callable|array|null $afterLock = null,
bool $useConfig = true,
?bool $timeoutException = null,
?bool $unlockException = null
Expand Down
Loading