Fixed bug that the type of $timeout in #[Task] don't match TaskAspect. (#5679)

Co-authored-by: 李铭昕 <715557344@qq.com>
This commit is contained in:
yansongda 2023-04-27 09:19:09 +08:00 committed by GitHub
parent d614069114
commit 457d94b6d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -1,5 +1,9 @@
# v3.0.19 - TBD
## Fixed
- [#5679](https://github.com/hyperf/hyperf/pull/5679) Fixed bug that the type of `$timeout` in `#[Task]` don't match `TaskAspect`.
# v3.0.18 - 2023-04-26
## Added

View File

@ -17,7 +17,7 @@ use Hyperf\Di\Annotation\AbstractAnnotation;
#[Attribute(Attribute::TARGET_CLASS | Attribute::TARGET_METHOD)]
class Task extends AbstractAnnotation
{
public function __construct(public int $workerId = -1, public int $timeout = 10)
public function __construct(public int $workerId = -1, public float $timeout = 10)
{
}
}