support php8 attributes like #[Middlewares(TestMiddleware::class, Tes…#3706
Merged
limingxinleo merged 8 commits intohyperf:2.2from Jun 18, 2021
Merged
support php8 attributes like #[Middlewares(TestMiddleware::class, Tes…#3706limingxinleo merged 8 commits intohyperf:2.2from
limingxinleo merged 8 commits intohyperf:2.2from
Conversation
…t2Middleware::class)]
Member
|
文档这里标一下吧。。 |
Member
|
代码测试过了是吧 |
limingxinleo
approved these changes
Jun 18, 2021
huangzhhui
reviewed
Jun 18, 2021
CHANGELOG-2.2.md
Outdated
|
|
||
| - [#3650](https://github.com/hyperf/hyperf/pull/3650) Fixed bug that `ReflectionParameter::getClass()` will be deprecated in php8. | ||
| - [#3692](https://github.com/hyperf/hyperf/pull/3692) Fixed bug that class proxies couldn't be included when building phar. | ||
| - [#3706](https://github.com/hyperf/hyperf/pull/3706) Fixed bug that `#[Middlewares]` does not work in PHP8. |
huangzhhui
reviewed
Jun 19, 2021
| - [#3694](https://github.com/hyperf/hyperf/pull/3694) Changed `Hyperf\CircuitBreaker\CircuitBreakerInterface` to support php8. | ||
| - Changed `CircuitBreaker::inc*Counter()` to `CircuitBreaker::incr*Counter()`. | ||
| - Changed type hint for method `AbstractHandler::switch()`. | ||
| - [#3706](https://github.com/hyperf/hyperf/pull/3706) Changed the style of writing to `#[Middlewares(FooMiddleware::class)]` from `@Middlewares({@Middleware(FooMiddleware::class)})` in PHP8. |
Member
There was a problem hiding this comment.
这种写法怎么支持 #[Middleware] 里面再加参数呢?
Member
There was a problem hiding this comment.
FooMiddleware,BarMiddleware
Member
There was a problem hiding this comment.
我的意思是,比如说 #[Middleware(priority=1)] 这种情况,就是 Middleware 注解有参数的场景
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#[Middlewares(TestMiddleware::class, Test2Middleware::class)]