diff --git a/CHANGELOG-2.2.md b/CHANGELOG-2.2.md index 826601c20..66a91044e 100644 --- a/CHANGELOG-2.2.md +++ b/CHANGELOG-2.2.md @@ -1,4 +1,16 @@ -# v2.2.33 - TBD +# v2.2.34 - TBD + +# v2.2.33 - 2022-05-30 + +## Fixed + +- [#4776](https://github.com/hyperf/hyperf/pull/4776) Fixed bug that graphql event collect failed. +- [#4790](https://github.com/hyperf/hyperf/pull/4790) Fixed bug that rpn method `toRPNExpression` does not work in some cases. + +## Added + +- [#4763](https://github.com/hyperf/hyperf/pull/4763) Added validation rule `array:key1,key2` which make sure the array has no keys other than `key1` and `key2`. +- [#4781](https://github.com/hyperf/hyperf/pull/4781) Added `close-pull-request.yml` to close pr for `read-only` repositories. # v2.2.32 - 2022-05-16 diff --git a/docs/en/changelog.md b/docs/en/changelog.md index ce7a0cadb..11ad47058 100644 --- a/docs/en/changelog.md +++ b/docs/en/changelog.md @@ -1,5 +1,509 @@ # Changelogs +# v2.2.32 - 2022-05-16 + +## Fixed + +- [#4745](https://github.com/hyperf/hyperf/pull/4745) Fixed null pointer exception when using `Producer::close`. +- [#4754](https://github.com/hyperf/hyperf/pull/4754) Fixed the bug that monolog does not work in `2.6.0` by configuring `conflict` with `monolog>=2.6.0`. + +## Optimized + +- [#4738](https://github.com/hyperf/hyperf/pull/4738) Configuring a default groupId when it is null when using `hyperf/kafka`. + +# v2.2.31.1 - 2022-04-18 + +## Fixed + +- [#4692](https://github.com/hyperf/hyperf/pull/4692) Fixed type hint error for node `$weight` cased by nacos driver. + +# v2.2.31 - 2022-04-18 + +## Fixed + +- [#4677](https://github.com/hyperf/hyperf/pull/4677) Fixed bug that process exit failed when using kafka producer. +- [#4686](https://github.com/hyperf/hyperf/pull/4687) Fixed bug that server shutdown when parse request failed for websocket server. + +## Added + +- [#4576](https://github.com/hyperf/hyperf/pull/4576) Support `path_prefix` for `node` when using `rpc-client`. +- [#4683](https://github.com/hyperf/hyperf/pull/4683) Added `Container::unbind()` to unbind an arbitrary resolved entry. + +# v2.2.30 - 2022-04-04 + +## Fixed + +- [#4648](https://github.com/hyperf/hyperf/pull/4648) Fixed bug that circuit breaker couldn't call fallback on `open` state when using `hyperf/retry`. +- [#4657](https://github.com/hyperf/hyperf/pull/4657) Fixed bug that last modified time was not updated after write session again when using `hyperf/session`. + +## Added + +- [#4646](https://github.com/hyperf/hyperf/pull/4646) Support setting `auth` for `RedisSentinel`. + +# v2.2.29 - 2022-03-28 + +## Fixed + +- [#4620](https://github.com/hyperf/hyperf/pull/4620) Fixed bug that the file name should be an empty string by default for `Hyperf\Memory\LockManager`. + +# v2.2.28 - 2022-03-14 + +## Fixed + +- [#4588](https://github.com/hyperf/hyperf/pull/4588) Fixed bug that `database` does not support `bit`. +- [#4589](https://github.com/hyperf/hyperf/pull/4589) Fixed bug that ephemeral instance register failed when using nacos. + +## Added + +- [#4580](https://github.com/hyperf/hyperf/pull/4580) Added method `Hyperf\Utils\Coroutine\Concurrent::getChannel()`. + +## Optimized + +- [#4603](https://github.com/hyperf/hyperf/pull/4603) Make public for method `Hyperf\ModelCache\Manager::formatModels()`. + +# v2.2.27 - 2022-03-07 + +## Optimized + +- [#4572](https://github.com/hyperf/hyperf/pull/4572) Use Hyperf\LoadBalancer\Exception\RuntimeException instead of \RuntimeException for `hyperf/load-balancer`. + +# v2.2.26 - 2022-02-21 + +## Fixed + +- [#4536](https://github.com/hyperf/hyperf/pull/4536) Fixed bug that response header `content-type` will be set more than once sometimes when using json-rpc. + +## Added + +- [#4527](https://github.com/hyperf/hyperf/pull/4527) Added some useful methods for `Hyperf\Database\Schema\Blueprint`. + +## Optimized + +- [#4514](https://github.com/hyperf/hyperf/pull/4514) Improved some performance by using lowercase headers. +- [#4521](https://github.com/hyperf/hyperf/pull/4521) Try to connect to another one when connected redis sentinel failed. +- [#4529](https://github.com/hyperf/hyperf/pull/4529) Split `hyperf/context` from `hyperf/utils`. + +# v2.2.25 - 2022-01-30 + +## Fixed + +- [#4484](https://github.com/hyperf/hyperf/pull/4484) Fixed bug that `NacosDriver::isRegistered` does not work when using nacos `2.0.4`. + +## Added + +- [#4477](https://github.com/hyperf/hyperf/pull/4477) Support `Macroable` for `Hyperf\HttpServer\Request`. + +## Optimized + +- [#4254](https://github.com/hyperf/hyperf/pull/4254) Added check of `grpc.enable_fork_support` option and `pcntl` extension. + +# v2.2.24 - 2022-01-24 + +## Fixed + +- [#4474](https://github.com/hyperf/hyperf/pull/4474) Fixed bug that multiplex connection don't close after running test cases. + +## Optimized + +- [#4451](https://github.com/hyperf/hyperf/pull/4451) Optimized code for `Hyperf\Watcher\Driver\FindNewerDriver`. + +# v2.2.23 - 2022-01-17 + +## Fixed + +- [#4426](https://github.com/hyperf/hyperf/pull/4426) Fixed bug that view cache generated failed caused by concurrent request. + +## Added + +- [#4449](https://github.com/hyperf/hyperf/pull/4449) Allow sorting on multiple criteria for `Hyperf\Utils\Collection`. +- [#4455](https://github.com/hyperf/hyperf/pull/4455) Added command `gen:view-engine-cache` which used to generate cache files in advance. +- [#4453](https://github.com/hyperf/hyperf/pull/4453) Added `Hyperf\Tracer\Aspect\ElasticserachAspect` which used to record traces for elasticsearch. +- [#4458](https://github.com/hyperf/hyperf/pull/4458) Added `Hyperf\Di\ScanHandler\ProcScanHandler` which used to run application when using swow and windows. + +# v2.2.22 - 2022-01-04 + +## Fixed + +- [#4399](https://github.com/hyperf/hyperf/pull/4399) Fixed bug that `Redis::scan` does not work when using redis cluster. + +## Added + +- [#4409](https://github.com/hyperf/hyperf/pull/4409) Added database handler for `session`. +- [#4411](https://github.com/hyperf/hyperf/pull/4411) Added `Hyperf\Tracer\Aspect\DbAspect` to log db records when using `hyperf/db`. +- [#4420](https://github.com/hyperf/hyperf/pull/4420) Support `SSL` for `Hyperf\Amqp\IO\SwooleIO`. + +## Optimized + +- [#4406](https://github.com/hyperf/hyperf/pull/4406) Adapt swoole 5.0 by removing swoole classes with `PSR-0`. +- [#4429](https://github.com/hyperf/hyperf/pull/4429) Added type hint for `Debug::getRefCount()` which only support `object`. + +# v2.2.21 - 2021-12-20 + +## Fixed + +- [#4347](https://github.com/hyperf/hyperf/pull/4347) Fixed bug that amqp io has been bound to more than one coroutine when out of buffer. +- [#4373](https://github.com/hyperf/hyperf/pull/4373) Fixed the metadata generation error caused by switching coroutine for snowflake. + +## Added + +- [#4344](https://github.com/hyperf/hyperf/pull/4344) Added `Hyperf\Crontab\Event\FailToExecute` event which will be dispatched when executing crontab failed. +- [#4348](https://github.com/hyperf/hyperf/pull/4348) Support to open the generated file with your IDE automatically. + +## Optimized + +- [#4350](https://github.com/hyperf/hyperf/pull/4350) Optimized the error message for `swoole.use_shortname`. +- [#4360](https://github.com/hyperf/hyperf/pull/4360) No longer uses `Swoole\Coroutine\Client`, but uses `Swoole\Coroutine\Socket`, which is more stable and has better performance in `Hyperf\Amqp\IO\SwooleIO`. + +# v2.2.20 - 2021-12-13 + +## Fixed + +- [#4338](https://github.com/hyperf/hyperf/pull/4338) Fixed bug that the path with query params won't match route when using testing client. +- [#4346](https://github.com/hyperf/hyperf/pull/4346) Fixed fatal error for declaration when using amqplib `3.1.1`. + +## Added + +- [#4330](https://github.com/hyperf/hyperf/pull/4330) Support pack vendor/bin files for `hyperf/phar`. +- [#4331](https://github.com/hyperf/hyperf/pull/4331) Added method `Hyperf\Testing\Debug::getRefCount($object)`. + +# v2.2.19 - 2021-12-06 + +## Fixed + +- [#4308](https://github.com/hyperf/hyperf/pull/4308) Fixed bug that `collector-reload` file not found when running `server:watch` with absolute path. + +## Optimized + +- [#4317](https://github.com/hyperf/hyperf/pull/4317) Improves `Hyperf\Utils\Collection` and `Hyperf\Database\Model\Collection` type definitions. + +# v2.2.18 - 2021-11-29 + +## Fixed + +- [#4283](https://github.com/hyperf/hyperf/pull/4283) Fixed type hint error for `Hyperf\Grpc\Parser::deserializeMessage()` when `$response->data` is null. + +## Added + +- [#4284](https://github.com/hyperf/hyperf/pull/4284) Added method `Hyperf\Utils\Network::ip()`. +- [#4290](https://github.com/hyperf/hyperf/pull/4290) Added HTTP chunk support for `hyperf/http-message`. +- [#4291](https://github.com/hyperf/hyperf/pull/4291) Support dynamic `$arguments` for function `value()`. +- [#4293](https://github.com/hyperf/hyperf/pull/4293) Support run with absolute paths for `server:watch`. +- [#4295](https://github.com/hyperf/hyperf/pull/4295) Added alias `id()` for `Hyperf\Database\Schema\Blueprint::bigIncrements()`. + +# v2.2.17 - 2021-11-22 + +## Fixed + +- [#4243](https://github.com/hyperf/hyperf/pull/4243) Fixed the bug that key sort of the result is inconsistent with `$callables` for `parallel`. + +## Added + +- [#4109](https://github.com/hyperf/hyperf/pull/4109) Added PHP8 support for `hyperf/tracer`. +- [#4260](https://github.com/hyperf/hyperf/pull/4260) Added force index for `hyperf/database`. + +# v2.2.16 - 2021-11-15 + +## Added + +- [#4252](https://github.com/hyperf/hyperf/pull/4252) Added method `getServiceName` for rpc client. + +## Optimized + +- [#4253](https://github.com/hyperf/hyperf/pull/4253) Skip class which is not found by class loader at scan time. + +# v2.2.15 - 2021-11-08 + +## Fixed + +- [#4200](https://github.com/hyperf/hyperf/pull/4200) Fixed bug that filesystem cache driver does not work when `runtime/caches` is not a directory. + +## Added + +- [#4157](https://github.com/hyperf/hyperf/pull/4157) Added `Macroable` for `Hyperf\Utils\Arr`. + +# v2.2.14 - 2021-11-01 + +## Added + +- [#4181](https://github.com/hyperf/hyperf/pull/4181) [#4192](https://github.com/hyperf/hyperf/pull/4192) Added versions (v1.0, v2.0, v3.0) support for `psr/log`. + +## Fixed + +- [#4171](https://github.com/hyperf/hyperf/pull/4171) Fixed health check failed when using consul with token. +- [#4188](https://github.com/hyperf/hyperf/pull/4188) Fixed bug that build phar failed when using composer `1.x`. + +# v2.2.13 - 2021-10-25 + +## Added + +- [#4159](https://github.com/hyperf/hyperf/pull/4159) Allow `Macroable::mixin` to only add macros that do not exist yet. + +## Fixed + +- [#4158](https://github.com/hyperf/hyperf/pull/4158) Fixed bug that generate proxy class failed when using union type. + +## Optimized + +- [#4159](https://github.com/hyperf/hyperf/pull/4159) [#4166](https://github.com/hyperf/hyperf/pull/4166) Split `hyperf/macroable` from `hyperf/utils`. + +# v2.2.12 - 2021-10-18 + +## Added + +- [#4129](https://github.com/hyperf/hyperf/pull/4129) Added methods `Str::stripTags()` and `Stringable::stripTags()`. + +## Fixed + +- [#4130](https://github.com/hyperf/hyperf/pull/4130) Fixed bug that generate model failed when using option `--with-ide` and `scope` methods. +- [#4141](https://github.com/hyperf/hyperf/pull/4141) Fixed bug that validator factory does not support other validators. + +# v2.2.11 - 2021-10-11 + +## Fixed + +- [#4101](https://github.com/hyperf/hyperf/pull/4101) Fixed bug that auth failed when password has special charsets for nacos. + +# Optimized + +- [#4114](https://github.com/hyperf/hyperf/pull/4114) Optimized get error code after Websocket upgrade failed. +- [#4119](https://github.com/hyperf/hyperf/pull/4119) Optimized testing client which create the directory again when the directory does not exist. + +# v2.2.10 - 2021-09-26 + +## Fixed + +- [#4088](https://github.com/hyperf/hyperf/pull/4088) Fixed bug that crontab rule convert `empty string` into `0` accidentally. +- [#4096](https://github.com/hyperf/hyperf/pull/4096) Fixed bug that generate proxy class failed caused by variadic parameters with type. + +# v2.2.9 - 2021-09-22 + +## Fixed + +- [#4061](https://github.com/hyperf/hyperf/pull/4061) Fixed the conflict between the latest version of prometheus_client_php and `hyperf/metric`. +- [#4068](https://github.com/hyperf/hyperf/pull/4068) Fixed bug that exit code of `Command` is incorrect when throwing an exception. +- [#4076](https://github.com/hyperf/hyperf/pull/4076) Fixed server broken caused by sending response failed. + +## Added + +- [#4014](https://github.com/hyperf/hyperf/pull/4014) [#4080](https://github.com/hyperf/hyperf/pull/4080) Support `sasl` and `ssl` for kafka. +- [#4045](https://github.com/hyperf/hyperf/pull/4045) [#4082](https://github.com/hyperf/hyperf/pull/4082) Support to control whether to report by `tracer` through config `opentracing.enable.exception`. +- [#4086](https://github.com/hyperf/hyperf/pull/4086) Support annotation for interface. + +# Optimized + +- [#4084](https://github.com/hyperf/hyperf/pull/4084) Optimized the exception message when the attribute not found. + +# v2.2.8 - 2021-09-14 + +## Fixed + +- [#4028](https://github.com/hyperf/hyperf/pull/4028) Fixed the success rate calculation in grafana dashboard. +- [#4030](https://github.com/hyperf/hyperf/pull/4030) Fixed bug that async-queue broken caused by uncompressing model failed. +- [#4042](https://github.com/hyperf/hyperf/pull/4042) Fixed coroutines deadlock caused by cleaning up expired fds in socketio-server when stop server. + +## Added + +- [#4013](https://github.com/hyperf/hyperf/pull/4013) Support `sameSite=None` when return response with cookies. +- [#4017](https://github.com/hyperf/hyperf/pull/4017) Added `Macroable` into `Hyperf\Utils\Collection`. +- [#4021](https://github.com/hyperf/hyperf/pull/4021) Added argument `$attempts` into `$callback` when using function `retry()`. +- [#4040](https://github.com/hyperf/hyperf/pull/4040) Added method `ConsumerDelayedMessageTrait::getDeadLetterExchange()` which used to rewrite `x-dead-letter-exchange` by yourself. + +## Removed + +- [#4017](https://github.com/hyperf/hyperf/pull/4017) Removed `Macroable` from `Hyperf\Database\Model\Collection` because it already exists in `Hyperf\Utils\Collection`. + +# v2.2.7 - 2021-09-06 + +# Fixed + +- [#3997](https://github.com/hyperf/hyperf/pull/3997) Fixed unexpected termination of nats consumer after timeout. +- [#3998](https://github.com/hyperf/hyperf/pull/3998) Fixed bug that `apollo` does not support `https`. + +## Optimized + +- [#4009](https://github.com/hyperf/hyperf/pull/4009) Optimized method `MethodDefinitionCollector::getOrParse()` to avoid deprecated in PHP8. + +## Added + +- [#4002](https://github.com/hyperf/hyperf/pull/4002) [#4012](https://github.com/hyperf/hyperf/pull/4012) Support method `FormRequest::scene()` which used to rewrite different rules according to different scenes. +- [#4011](https://github.com/hyperf/hyperf/pull/4011) Added some methods for `Hyperf\Utils\Str`. + +# v2.2.6 - 2021-08-30 + +## Fixed + +- [#3969](https://github.com/hyperf/hyperf/pull/3969) Fixed type error when using `Hyperf\Validation\Rules\Unique::__toString()` in PHP8. +- [#3979](https://github.com/hyperf/hyperf/pull/3979) Fixed bug that timeout property does not work in circuit breaker. +- [#3986](https://github.com/hyperf/hyperf/pull/3986) Fixed OSS hook failed when using `SWOOLE_HOOK_NATIVE_CURL`. + +## Added + +- [#3987](https://github.com/hyperf/hyperf/pull/3987) Support delayed message exchange for AMQP. +- [#3989](https://github.com/hyperf/hyperf/pull/3989) [#3992](https://github.com/hyperf/hyperf/pull/3992) Added option `command` which used to define your own start command. + +# v2.2.5 - 2021-08-23 + +## Fixed + +- [#3959](https://github.com/hyperf/hyperf/pull/3959) Fixed validate rule `date` does not work as expected when the value isn't string. +- [#3960](https://github.com/hyperf/hyperf/pull/3960) Fixed bug that crontab cannot be closed safely in coroutine style server. + +## Added + +- [code-generator](https://github.com/hyperf/code-generator) Added `code-generator` which used to regenerate classes with `Attributes` instead of `Doctrine Annotations`. + +## Optimized + +- [#3957](https://github.com/hyperf/hyperf/pull/3957) Support generate the type of getAttribute with `@return` for command `gen:model`. + +# v2.2.4 - 2021-08-16 + +## Fixed + +- [#3925](https://github.com/hyperf/hyperf/pull/3925) Fixed bug that heartbeat failed caused by nacos light beat enabled. +- [#3926](https://github.com/hyperf/hyperf/pull/3926) Fixed bug that the config of `config_center.drivers.nacos.client` does not work. + +## Added + +- [#3924](https://github.com/hyperf/hyperf/pull/3924) Added health check parameters for consul service register. +- [#3932](https://github.com/hyperf/hyperf/pull/3932) Support requeue the message when return `NACK` for `AMQP` consumer. +- [#3941](https://github.com/hyperf/hyperf/pull/3941) Support service register for `rpc-multiplex`. +- [#3947](https://github.com/hyperf/hyperf/pull/3947) Added method `Str::mask` which used to replace chars from a string by a given char. + +## Optimized + +- [#3944](https://github.com/hyperf/hyperf/pull/3944) Encapsulated the code for reading aspect meta properties. + +# v2.2.3 - 2021-08-09 + +## Fixed + +- [#3897](https://github.com/hyperf/hyperf/pull/3897) Fixed bug that nacos instance will be registered more than once, because heartbeat failed caused by light beat enabled. +- [#3905](https://github.com/hyperf/hyperf/pull/3905) Fixed null pointer exception when closing AMQPConnection. +- [#3906](https://github.com/hyperf/hyperf/pull/3906) Fixed bug that close connection failed caused by wait channels flushed. +- [#3908](https://github.com/hyperf/hyperf/pull/3908) Fixed bug that the process couldn't be restarted caused by loop which using `CoordinatorManager`. + +# v2.2.2 - 2021-08-03 + +## Fixed + +- [#3872](https://github.com/hyperf/hyperf/pull/3872) [#3873](https://github.com/hyperf/hyperf/pull/3873) Fixed bug that heartbeat failed when using nacos without default group. +- [#3877](https://github.com/hyperf/hyperf/pull/3877) Fixed bug that heartbeat will be registered more than once. +- [#3879](https://github.com/hyperf/hyperf/pull/3879) Fixed bug that `watcher` does not work caused by proxies replaced. + +## Optimized + +- [#3877](https://github.com/hyperf/hyperf/pull/3877) Support `lightBeatEnabled` for Nacos heartbeat. + +# v2.2.1 - 2021-07-27 + +## Fixed + +- [#3750](https://github.com/hyperf/hyperf/pull/3750) Fixed fatal error which caused by dispatching a non exist namespace when using `socket-io`. +- [#3828](https://github.com/hyperf/hyperf/pull/3828) Fixed bug that lazy inject does not work for `Hyperf\Redis\Redis` in `PHP8.0`. +- [#3845](https://github.com/hyperf/hyperf/pull/3845) Fixed bug that `watcher` does not work for `v2.2`. +- [#3848](https://github.com/hyperf/hyperf/pull/3848) Fixed bug that the usage of registering itself like `nacos v2.1` does not work. +- [#3866](https://github.com/hyperf/hyperf/pull/3866) Fixed bug that the metadata of nacos instance can't be registered successfully. + +## Optimized + +- [#3763](https://github.com/hyperf/hyperf/pull/3763) Support chained calls for `JsonResource::wrap()` and `JsonResource::withoutWrapping()`. +- [#3843](https://github.com/hyperf/hyperf/pull/3843) Check the status code and body of the response to ensure whether the instance already be registered. +- [#3854](https://github.com/hyperf/hyperf/pull/3854) Support RFC 5987 for `Hyperf\HttpServer\Contract\ResponseInterface::download()` which allows utf-8 encoding, percentage encoded (url-encoded). + +# v2.2.0 - 2021-07-19 + +## Dependencies Upgrade + +- Upgraded `friendsofphp/php-cs-fixer` to `^3.0`; +- Upgraded `psr/container` to `^1.0|^2.0`; +- Upgraded `egulias/email-validator` to `^3.0`; +- Upgraded `markrogoyski/math-php` to `^2.0`; +- [3783](https://github.com/hyperf/hyperf/pull/3783) Upgraded `league/flysystem` to `^1.0|^2.0`; + +## Dependencies Changed + +- [#3577](https://github.com/hyperf/hyperf/pull/3577) `domnikl/statsd` is abandoned and no longer maintained. The author suggests using the `slickdeals/statsd` package instead. + +## Changed + +- [#3334](https://github.com/hyperf/hyperf/pull/3334) Changed the return value of `LengthAwarePaginator::toArray()` to be consistent with that of `Paginator::toArray()`. +- [#3550](https://github.com/hyperf/hyperf/pull/3550) Removed `broker` and `bootstrap_server` from `kafka`, please use `brokers` and `bootstrap_servers` instead. +- [#3580](https://github.com/hyperf/hyperf/pull/3580) Changed the default priority of aspect to 0. +- [#3582](https://github.com/hyperf/hyperf/pull/3582) Changed the consumer tag of amqp to empty string. +- [#3634](https://github.com/hyperf/hyperf/pull/3634) Use Fork Process strategy to replace BetterReflection strategy. + - [#3649](https://github.com/hyperf/hyperf/pull/3649) Removed `roave/better-reflection` from `hyperf/database` when using `gen:model`. + - [#3651](https://github.com/hyperf/hyperf/pull/3651) Removed `roave/better-reflection` from LazyLoader. + - [#3654](https://github.com/hyperf/hyperf/pull/3654) Removed `roave/better-reflection` from other components. +- [#3676](https://github.com/hyperf/hyperf/pull/3676) Use `promphp/prometheus_client_php` instead of `endclothing/prometheus_client_php`. +- [#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. +- [#3715](https://github.com/hyperf/hyperf/pull/3715) Restructure nacos component, be sure to reread the documents. +- [#3722](https://github.com/hyperf/hyperf/pull/3722) Removed config `config_apollo.php`, please use `config_center.php` instead. +- [#3725](https://github.com/hyperf/hyperf/pull/3725) Removed config `config_etcd.php`, please use `config_center.php` instead. +- [#3730](https://github.com/hyperf/hyperf/pull/3730) Removed config `brokers` and `update_brokers` from kafka. +- [#3733](https://github.com/hyperf/hyperf/pull/3733) Removed config `zookeeper.php`, please use `config_center.php` instead. +- [#3734](https://github.com/hyperf/hyperf/pull/3734) Split `nacos` into `config-nacos` and `service-governance-nacos`. + - [#3772](https://github.com/hyperf/hyperf/pull/3772) Fixed bug that nacos driver do not work. +- [#3734](https://github.com/hyperf/hyperf/pull/3734) Renamed `nacos-sdk` as `nacos`. +- [#3737](https://github.com/hyperf/hyperf/pull/3737) Refactor config-center and config driver + - Added `AbstractDriver` and merge the duplicate code into the abstraction class + - Added `PipeMessageInterface` to uniform the message struct of config fetcher process +- [#3817](https://github.com/hyperf/hyperf/pull/3817) [#3818](https://github.com/hyperf/hyperf/pull/3818) Split `service-governance-consul` from `service-governance`. +- [#3819](https://github.com/hyperf/hyperf/pull/3819) Use their own configuration below `config_center.php` for config center component which using ETCD and Nacos. + +## Deprecated + +- [#3636](https://github.com/hyperf/hyperf/pull/3636) `Hyperf\Utils\Resource` will be deprecated in v2.3, please use `Hyperf\Utils\ResourceGenerator` instead. + +## Added + +- [#3589](https://github.com/hyperf/hyperf/pull/3589) Added DAG component. +- [#3606](https://github.com/hyperf/hyperf/pull/3606) Added RPN component. +- [#3629](https://github.com/hyperf/hyperf/pull/3629) Added `Hyperf\Utils\Channel\ChannelManager` which used to manage channels. +- [#3631](https://github.com/hyperf/hyperf/pull/3631) Support multiplexing for AMQP component. + - [#3639](https://github.com/hyperf/hyperf/pull/3639) Close push channel and socket when worker exited. + - [#3640](https://github.com/hyperf/hyperf/pull/3640) Optimized log level for SwooleIO. + - [#3657](https://github.com/hyperf/hyperf/pull/3657) Fixed memory exhausted for rabbitmq caused by confirm channel. + - [#3659](https://github.com/hyperf/hyperf/pull/3659) Optimized code which be used to close connection friendly. + - [#3681](https://github.com/hyperf/hyperf/pull/3681) Fixed bug that rpc client does not work for amqp. +- [#3635](https://github.com/hyperf/hyperf/pull/3635) Added `Hyperf\Utils\CodeGen\PhpParser` which used to generate AST for reflection. +- [#3648](https://github.com/hyperf/hyperf/pull/3648) Added `Hyperf\Utils\CodeGen\PhpDocReaderManager` to manage `PhpDocReader`. +- [#3679](https://github.com/hyperf/hyperf/pull/3679) Added Nacos SDK component. + - [#3712](https://github.com/hyperf/hyperf/pull/3712) The input parameters of `InstanceProvider::update()` are modified to make it more friendly. +- [#3698](https://github.com/hyperf/hyperf/pull/3698) Support PHP8 Attribute which can replace doctrine annotations. +- [#3714](https://github.com/hyperf/hyperf/pull/3714) Added ide-helper component. +- [#3722](https://github.com/hyperf/hyperf/pull/3722) Added config-center component. +- [#3728](https://github.com/hyperf/hyperf/pull/3728) Added support for `secret` of Apollo. +- [#3743](https://github.com/hyperf/hyperf/pull/3743) Support custom register for service governance. +- [#3753](https://github.com/hyperf/hyperf/pull/3753) Support long pulling mode for Apollo Client. +- [#3759](https://github.com/hyperf/hyperf/pull/3759) Added `rpc-multiplex` component. +- [#3791](https://github.com/hyperf/hyperf/pull/3791) Support setting multiple annotations by inheriting `AbstractMultipleAnnotation`, such as `@Middleware`. +- [#3806](https://github.com/hyperf/hyperf/pull/3806) Added heartbeat for nacos service governance. + +## Optimized + +- [#3670](https://github.com/hyperf/hyperf/pull/3670) Adapt database component to support php8. +- [#3673](https://github.com/hyperf/hyperf/pull/3673) Adapt all components to support php8. +- [#3730](https://github.com/hyperf/hyperf/pull/3730) Optimized code for kafka component. + - Support `timeout` for `Producer` to avoid requests not responding. + - Removed useless code with pool. + - Throw exceptions when connect kafka failed. +- [#3758](https://github.com/hyperf/hyperf/pull/3758) Optimized code for pool which get connection again when first failed. + +## Fixed + +- [#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. +- [#3769](https://github.com/hyperf/hyperf/pull/3769) Fixed bug that `config-center` conflicts with `metrics`. +- [#3770](https://github.com/hyperf/hyperf/pull/3770) Fixed type error when using `Str::slug()`. +- [#3788](https://github.com/hyperf/hyperf/pull/3788) Fixed type error when using `BladeCompiler::getRawPlaceholder()`. +- [#3794](https://github.com/hyperf/hyperf/pull/3794) Fixed bug that `retry_interval` does not work for `rpc-multiplex`. +- [#3798](https://github.com/hyperf/hyperf/pull/3798) Fixed bug that amqp consumer couldn't restart when rabbitmq server stopped. +- [#3814](https://github.com/hyperf/hyperf/pull/3814) Fixed bug that `libxml_disable_entity_loader()` has been deprecated as of PHP 8.0.0. + # v2.1.23 - 2021-07-12 ## Optimized diff --git a/docs/en/communication.md b/docs/en/communication.md index 1e025d62e..0826f8b5e 100644 --- a/docs/en/communication.md +++ b/docs/en/communication.md @@ -4,7 +4,9 @@ We provide two communication channels: `QQ Group` and `WeChat Group`. Other comm ## QQ Group -Group Number: `862099724` +Group 1 Number: `862099724` +Group 2 Number: `811414891` +Group 3 Number: `589051831` ## WeChat Group diff --git a/docs/en/quick-start/install.md b/docs/en/quick-start/install.md index fa30fa456..30a963e47 100644 --- a/docs/en/quick-start/install.md +++ b/docs/en/quick-start/install.md @@ -8,10 +8,13 @@ Various Dockerfiles have been prepared for in the [hyperf/hyperf-docker](https:/ If you don't use Docker as the basis for your system environment, you need to make sure that your native environment meets the following requirements: - - PHP >= 7.3 - - Swoole PHP extension >= 4.5,with `swoole.use_shortname` set to `Off` in your `php.ini` - - OpenSSL PHP extension + - PHP >= 7.3 and <= 8.0 + - Any of the following network engines + - Swoole PHP extension >= 4.5,with `swoole.use_shortname` set to `Off` in your `php.ini` + - Swow PHP extension (Beta) - JSON PHP extension + - Pcntl PHP extension + - OpenSSL PHP extension (If you need to use the HTTPS) - PDO PHP extension (If you need to use the MySQL Client) - Redis PHP extension (If you need to use the Redis Client) - Protobuf PHP extension (If you need to use the gRPC Server or Client) @@ -26,10 +29,16 @@ Hyperf uses [Composer](https://getcomposer.org) to manage project dependencies. The project [hyperf/hyperf-skeleton](https://github.com/hyperf/hyperf-skeleton) is a skeleton project that we have prepared for you, with built-in files for common components and related configuration. It is a foundational web project that can be quickly used to get started with professional Hyperf development. At the time of installation, you can choose component dependencies according to your own needs. Execute the following command to create a hyperf-skeleton project at the current location +Based on Swoole engine: ``` composer create-project hyperf/hyperf-skeleton ``` +Based on Swow engine: +``` +composer create-project hyperf/swow-skeleton +``` + ### Develop in Docker If your native environment does not meet the Hyperf system requirements, or if you are unfamiliar with system configuration, you can run and develop the Hyperf project as follows using Docker. diff --git a/docs/zh-cn/changelog.md b/docs/zh-cn/changelog.md index 8e7ff96cc..22b98bdcc 100644 --- a/docs/zh-cn/changelog.md +++ b/docs/zh-cn/changelog.md @@ -1,5 +1,17 @@ # 版本更新记录 +# v2.2.33 - 2022-05-30 + +## 修复 + +- [#4776](https://github.com/hyperf/hyperf/pull/4776) 修复 `GraphQL` 事件收集失败的问题。 +- [#4790](https://github.com/hyperf/hyperf/pull/4790) 修复 `RPN` 组件中方法 `toRPNExpression` 在某些场景无法正常工作的问题。 + +## Added + +- [#4763](https://github.com/hyperf/hyperf/pull/4763) 新增验证规则 `array:key1,key2`,确保数组中除 `key1` `key2` 以外无其他 `key` 键。 +- [#4781](https://github.com/hyperf/hyperf/pull/4781) 新增配置 `close-pull-request.yml`,用来自动关闭只读的仓库。 + # v2.2.32 - 2022-05-16 ## 修复 diff --git a/docs/zh-cn/communication.md b/docs/zh-cn/communication.md index 64c41dd8f..aa012075c 100644 --- a/docs/zh-cn/communication.md +++ b/docs/zh-cn/communication.md @@ -7,7 +7,7 @@ > 2000 人群,按需加入 Hyperf 交流群: `862099724` -Hyperf 交流 2 群: `811414891` +Hyperf 交流 2 群: `811414891` Hyperf 交流 3 群: `589051831` ## 微信交流群 diff --git a/docs/zh-cn/quick-start/important.md b/docs/zh-cn/quick-start/important.md index 7919bd272..1ee748865 100644 --- a/docs/zh-cn/quick-start/important.md +++ b/docs/zh-cn/quick-start/important.md @@ -26,3 +26,59 @@ composer dump-autoload -o # 生成代理类和注解缓存 php bin/hyperf.php ``` + + +## 避免在魔术方法中切换协程 + +> __call __callStatic 除外 + +尽量避免在 `__get` `__set` 和 `__isset` 中切换协程,因为可能会出现不符合预期的情况 + +```php + SWOOLE_HOOK_ALL]); + +class Foo +{ + public function __get(string $name) + { + sleep(1); + return $name; + } + + public function __set(string $name, mixed $value) + { + sleep(1); + var_dump($name, $value); + } + + public function __isset(string $name): bool + { + sleep(1); + var_dump($name); + return true; + } +} + +$foo = new Foo(); +go(static function () use ($foo) { + var_dump(isset($foo->xxx)); +}); + +go(static function () use ($foo) { + var_dump(isset($foo->xxx)); +}); + +\Swoole\Event::wait(); + +``` + +当我们执行上述代码时,会返回以下结果 + +```shell +bool(false) +string(3) "xxx" +bool(true +``` diff --git a/docs/zh-cn/quick-start/install.md b/docs/zh-cn/quick-start/install.md index d9dfc5d92..c108b99a7 100644 --- a/docs/zh-cn/quick-start/install.md +++ b/docs/zh-cn/quick-start/install.md @@ -8,7 +8,7 @@ Hyperf 对系统环境有一些要求,当您使用 Swoole 网络引擎驱动 当您不想采用 Docker 来作为运行的环境基础时,您需要确保您的运行环境达到了以下的要求: - - PHP >= 7.4 + - PHP >= 7.4 and <= 8.0 - 以下任一网络引擎 - Swoole PHP 扩展 >= 4.5,并关闭了 `Short Name` - Swow PHP 扩展 (Beta) diff --git a/docs/zh-cn/summary.md b/docs/zh-cn/summary.md index 0888c96fa..74f182c36 100644 --- a/docs/zh-cn/summary.md +++ b/docs/zh-cn/summary.md @@ -18,7 +18,7 @@ * [快速开始](zh-cn/quick-start/overview.md) * [常见问题](zh-cn/quick-start/questions.md) * [编程须知](zh-cn/quick-start/important.md) - * [视频教程](https://course.swoole-cloud.com/videos/5/new?from=hyperf.io) + * [视频教程](https://space.bilibili.com/1176880220/channel/seriesdetail?sid=2121560) * 核心架构 diff --git a/docs/zh-cn/tutorial/docker-swarm.md b/docs/zh-cn/tutorial/docker-swarm.md index 6ef1abdde..ee9f0c20d 100644 --- a/docs/zh-cn/tutorial/docker-swarm.md +++ b/docs/zh-cn/tutorial/docker-swarm.md @@ -214,6 +214,28 @@ docker service create \ portainer/portainer ``` +### 备份 Portainer 的数据 + +> portainer_container 为对应的容器名,按实际情况填写 + +``` +docker run -it --volumes-from portainer_container -v $(pwd):/backup --name backup --rm nginx tar -cf /backup/data.tar /data/ +``` + +### 恢复 Portainer 的数据 + +首先使用创建命令,重新创建 portainer 服务 + +然后使用以下方法,将备份重载到容器中 + +``` +docker run -it --volumes-from portainer_container -v $(pwd):/backup --name importer --rm nginx bash +cd /backup +tar xf data.tar -C / +``` + +最后只需要重启容器即可 + ## 创建一个 Demo 项目 登录 Gitlab 创建一个 Demo 项目。并导入我们的项目 [hyperf-skeleton](https://github.com/hyperf/hyperf-skeleton) diff --git a/docs/zh-hk/awesome-components.md b/docs/zh-hk/awesome-components.md index 9fad68471..4f8656bda 100644 --- a/docs/zh-hk/awesome-components.md +++ b/docs/zh-hk/awesome-components.md @@ -79,6 +79,9 @@ ## RPC - [hyperf/json-rpc](https://github.com/hyperf/json-rpc) Hyperf 官方提供的 JSON-RPC 協議組件 +- [hyperf/rpc-multiplex](https://github.com/hyperf/rpc-multiplex) Hyperf 官方提供的多路複用 RPC 組件 +- [hyperf/roc](https://github.com/hyperf/roc) Hyperf 官方提供的 Golang 版本的多路複用 RPC Server 組件 +- [limingxinleo/roc-skeleton](https://github.com/limingxinleo/roc-skeleton) Golang 版本多路複用 RPC Server 骨架包 ## 服務治理 @@ -152,3 +155,4 @@ - [Yurunsoft/PHPMailer-Swoole](https://github.com/Yurunsoft/PHPMailer-Swoole) Swoole 協程環境下的可用的 PHPMailer - [yansongda/hyperf-pay](https://github.com/yansongda/hyperf-pay) 支持 `支付寶/微信` 的支付組件,基於 [yansongda/pay](https://github.com/yansongda/pay) 實現,適配於 `Hyperf` 框架。 - [alapi/hyperf-meilisearch](https://github.com/anhao/hyperf-meilisearch) 為 Hyperf Scout 提供的 meilisearch 客户端 +- [vinchan/message-notice](https://github.com/VinchanGit/message-notice) Hyperf 異常監控報警通知組件(釘釘羣機器人、飛書羣機器人、郵件、QQ 頻道機器人、企業微信羣機器人) diff --git a/docs/zh-hk/changelog.md b/docs/zh-hk/changelog.md index 78b64fdbd..493a28e2a 100644 --- a/docs/zh-hk/changelog.md +++ b/docs/zh-hk/changelog.md @@ -1,5 +1,28 @@ # 版本更新記錄 +# v2.2.33 - 2022-05-30 + +## 修復 + +- [#4776](https://github.com/hyperf/hyperf/pull/4776) 修復 `GraphQL` 事件收集失敗的問題。 +- [#4790](https://github.com/hyperf/hyperf/pull/4790) 修復 `RPN` 組件中方法 `toRPNExpression` 在某些場景無法正常工作的問題。 + +## Added + +- [#4763](https://github.com/hyperf/hyperf/pull/4763) 新增驗證規則 `array:key1,key2`,確保數組中除 `key1` `key2` 以外無其他 `key` 鍵。 +- [#4781](https://github.com/hyperf/hyperf/pull/4781) 新增配置 `close-pull-request.yml`,用來自動關閉只讀的倉庫。 + +# v2.2.32 - 2022-05-16 + +## 修復 + +- [#4745](https://github.com/hyperf/hyperf/pull/4745) 當使用 `kafka` 組件的 `Producer::close` 方法時,修復可能拋出空指針異常的問題。 +- [#4754](https://github.com/hyperf/hyperf/pull/4754) 通過配置 `monolog>=2.6.0` 解決新版本的 `monolog` 無法正常工作的問題。 + +## 優化 + +- [#4738](https://github.com/hyperf/hyperf/pull/4738) 當使用 `kafka` 組件時,如果沒有設置 `GroupID` 則自動配置一個。 + # v2.2.31 - 2022-04-18 ## 修復 diff --git a/docs/zh-hk/communication.md b/docs/zh-hk/communication.md index e726f5c16..f5edeb168 100644 --- a/docs/zh-hk/communication.md +++ b/docs/zh-hk/communication.md @@ -7,7 +7,7 @@ > 2000 人羣,按需加入 Hyperf 交流羣: `862099724` -Hyperf 交流 2 羣: `811414891` +Hyperf 交流 2 羣: `811414891` Hyperf 交流 3 羣: `589051831` ## 微信交流羣 diff --git a/docs/zh-hk/quick-start/important.md b/docs/zh-hk/quick-start/important.md index 05ed648c7..b81aa902d 100644 --- a/docs/zh-hk/quick-start/important.md +++ b/docs/zh-hk/quick-start/important.md @@ -26,3 +26,59 @@ composer dump-autoload -o # 生成代理類和註解緩存 php bin/hyperf.php ``` + + +## 避免在魔術方法中切換協程 + +> __call __callStatic 除外 + +儘量避免在 `__get` `__set` 和 `__isset` 中切換協程,因為可能會出現不符合預期的情況 + +```php + SWOOLE_HOOK_ALL]); + +class Foo +{ + public function __get(string $name) + { + sleep(1); + return $name; + } + + public function __set(string $name, mixed $value) + { + sleep(1); + var_dump($name, $value); + } + + public function __isset(string $name): bool + { + sleep(1); + var_dump($name); + return true; + } +} + +$foo = new Foo(); +go(static function () use ($foo) { + var_dump(isset($foo->xxx)); +}); + +go(static function () use ($foo) { + var_dump(isset($foo->xxx)); +}); + +\Swoole\Event::wait(); + +``` + +當我們執行上述代碼時,會返回以下結果 + +```shell +bool(false) +string(3) "xxx" +bool(true +``` diff --git a/docs/zh-hk/quick-start/install.md b/docs/zh-hk/quick-start/install.md index 3debd105b..49ff63c1e 100644 --- a/docs/zh-hk/quick-start/install.md +++ b/docs/zh-hk/quick-start/install.md @@ -8,7 +8,7 @@ Hyperf 對系統環境有一些要求,當您使用 Swoole 網絡引擎驅動 當您不想採用 Docker 來作為運行的環境基礎時,您需要確保您的運行環境達到了以下的要求: - - PHP >= 7.4 + - PHP >= 7.4 and <= 8.0 - 以下任一網絡引擎 - Swoole PHP 擴展 >= 4.5,並關閉了 `Short Name` - Swow PHP 擴展 (Beta) diff --git a/docs/zh-hk/summary.md b/docs/zh-hk/summary.md index d9fb98e8b..3958e2dee 100644 --- a/docs/zh-hk/summary.md +++ b/docs/zh-hk/summary.md @@ -18,7 +18,7 @@ * [快速開始](zh-hk/quick-start/overview.md) * [常見問題](zh-hk/quick-start/questions.md) * [編程須知](zh-hk/quick-start/important.md) - * [視頻教程](https://course.swoole-cloud.com/videos/5/new?from=hyperf.io) + * [視頻教程](https://space.bilibili.com/1176880220/channel/seriesdetail?sid=2121560) * 核心架構 diff --git a/docs/zh-hk/tutorial/docker-swarm.md b/docs/zh-hk/tutorial/docker-swarm.md index abc498d02..1f7af1d94 100644 --- a/docs/zh-hk/tutorial/docker-swarm.md +++ b/docs/zh-hk/tutorial/docker-swarm.md @@ -15,6 +15,12 @@ curl -sSL https://get.daocloud.io/docker | sh ExecStart=/usr/bin/dockerd -H unix:// -H tcp://0.0.0.0:2375 ``` +如果不是使用的 `root` 賬户,可以通過以下命令,讓每次執行 `docker` 時,不需要增加 `sudo` + +``` +usermod -aG docker $USER +``` + ### 配置倉庫鏡像地址 基於跨國線路訪問速度過慢等問題,我們可以為 Docker 配置倉庫鏡像地址,來改善這些網絡問題,如 [阿里雲(Aliyun) Docker 鏡像加速器](https://help.aliyun.com/document_detail/60750.html),我們可以申請一個 `Docker` 加速器,然後配置到服務器上的 `/etc/docker/daemon.json` 文件,添加以下內容,然後重啟 `Docker`,下面的地址請填寫您自己獲得的加速器地址。 @@ -44,13 +50,15 @@ $ systemctl restart sshd.service 重新登錄機器 ``` -ssh -p 2222 root@host +ssh -p 2222 root@host ``` #### 安裝 Gitlab 我們來通過 Docker 啟動一個 Gitlab 服務,如下: +> hostname 一定要加,如果沒有域名可以直接填外網地址 + ``` sudo docker run -d --hostname gitlab.xxx.cn \ --publish 443:443 --publish 80:80 --publish 22:22 \ @@ -60,7 +68,11 @@ sudo docker run -d --hostname gitlab.xxx.cn \ gitlab/gitlab-ce:latest ``` -首次登錄 `Gitlab` 需要重置密碼,默認用户名為 `root`。 +默認用户名為 `root`,初始密碼通過以下方式獲得 + +```shell +docker exec gitlab cat /etc/gitlab/initial_root_password +``` ### 安裝 gitlab-runner @@ -87,7 +99,7 @@ $ yum install gitlab-runner 通過 `gitlab-runner register --clone-url http://your-ip/` 命令來將 gitlab-runner 註冊到 Gitlab 上,注意要替換 `your-ip` 為您的 Gitlab 的內網 IP,如下: ``` -$ gitlab-runner register --clone-url http://your-ip/ +$ sudo gitlab-runner register --clone-url http://your-ip/ Please enter the gitlab-ci coordinator URL (e.g. https://gitlab.com/): http://gitlab.xxx.cc/ @@ -108,6 +120,23 @@ $ vim /etc/gitlab-runner/config.toml concurrent = 5 ``` +### 為 gitlab-runner 增加權限 + +- 免 sudo 執行 docker 的權限 + +```shell +sudo usermod -aG docker gitlab-runner +``` + +- 鏡像倉庫的權限 + +```shell +su gitlab-runner +docker login -u username your-docker-repository +``` + +### + ### 修改郵箱 如果需要 `Gitlab` 發送郵件(比如用户創建的郵件等),可以嘗試修改 `/srv/gitlab/config/gitlab.rb` @@ -162,7 +191,7 @@ $ docker swarm join --token ip:2377 > 其他與 builder 一致,但是 tag 卻不能一樣。線上環境可以設置為 tags,測試環境設置為 test -## 安裝其他應用 +## 安裝其他應用 以下以 `Mysql` 為例,直接使用上述 `network`,支持容器內使用 name 互調。 @@ -185,6 +214,28 @@ docker service create \ portainer/portainer ``` +### 備份 Portainer 的數據 + +> portainer_container 為對應的容器名,按實際情況填寫 + +``` +docker run -it --volumes-from portainer_container -v $(pwd):/backup --name backup --rm nginx tar -cf /backup/data.tar /data/ +``` + +### 恢復 Portainer 的數據 + +首先使用創建命令,重新創建 portainer 服務 + +然後使用以下方法,將備份重載到容器中 + +``` +docker run -it --volumes-from portainer_container -v $(pwd):/backup --name importer --rm nginx bash +cd /backup +tar xf data.tar -C / +``` + +最後只需要重啟容器即可 + ## 創建一個 Demo 項目 登錄 Gitlab 創建一個 Demo 項目。並導入我們的項目 [hyperf-skeleton](https://github.com/hyperf/hyperf-skeleton) @@ -294,7 +345,7 @@ docker run -d --name kong-database \ postgres:9.6 ``` -### 安裝網關 +### 安裝網關 初始化數據庫 @@ -367,7 +418,7 @@ docker run --rm -i -v $basepath/.env:/opt/www/.env \ - 指定 TLinux 源 ``` -tee /etc/yum.repos.d/CentOS-TLinux.repo <<-'EOF' +tee /etc/yum.repos.d/CentOS-TLinux.repo <<-'EOF' [Tlinux] name=Tlinux for redhat/centos $releasever - $basearch failovermethod=priority @@ -462,5 +513,5 @@ docker service update --network-rm old-network service_name 這是因為 Portainer 修改後,不能作用於已經創建的服務,所以手動更新即可 ``` -docker service update --with-registry-auth service_name +docker service update --with-registry-auth service_name ``` diff --git a/docs/zh-tw/awesome-components.md b/docs/zh-tw/awesome-components.md index c0f5850dd..50cc484a3 100644 --- a/docs/zh-tw/awesome-components.md +++ b/docs/zh-tw/awesome-components.md @@ -79,6 +79,9 @@ ## RPC - [hyperf/json-rpc](https://github.com/hyperf/json-rpc) Hyperf 官方提供的 JSON-RPC 協議元件 +- [hyperf/rpc-multiplex](https://github.com/hyperf/rpc-multiplex) Hyperf 官方提供的多路複用 RPC 元件 +- [hyperf/roc](https://github.com/hyperf/roc) Hyperf 官方提供的 Golang 版本的多路複用 RPC Server 元件 +- [limingxinleo/roc-skeleton](https://github.com/limingxinleo/roc-skeleton) Golang 版本多路複用 RPC Server 骨架包 ## 服務治理 @@ -152,3 +155,4 @@ - [Yurunsoft/PHPMailer-Swoole](https://github.com/Yurunsoft/PHPMailer-Swoole) Swoole 協程環境下的可用的 PHPMailer - [yansongda/hyperf-pay](https://github.com/yansongda/hyperf-pay) 支援 `支付寶/微信` 的支付元件,基於 [yansongda/pay](https://github.com/yansongda/pay) 實現,適配於 `Hyperf` 框架。 - [alapi/hyperf-meilisearch](https://github.com/anhao/hyperf-meilisearch) 為 Hyperf Scout 提供的 meilisearch 客戶端 +- [vinchan/message-notice](https://github.com/VinchanGit/message-notice) Hyperf 異常監控報警通知元件(釘釘群機器人、飛書群機器人、郵件、QQ 頻道機器人、企業微信群機器人) diff --git a/docs/zh-tw/changelog.md b/docs/zh-tw/changelog.md index 8bdc972c0..d41cfc02d 100644 --- a/docs/zh-tw/changelog.md +++ b/docs/zh-tw/changelog.md @@ -1,5 +1,28 @@ # 版本更新記錄 +# v2.2.33 - 2022-05-30 + +## 修復 + +- [#4776](https://github.com/hyperf/hyperf/pull/4776) 修復 `GraphQL` 事件收集失敗的問題。 +- [#4790](https://github.com/hyperf/hyperf/pull/4790) 修復 `RPN` 元件中方法 `toRPNExpression` 在某些場景無法正常工作的問題。 + +## Added + +- [#4763](https://github.com/hyperf/hyperf/pull/4763) 新增驗證規則 `array:key1,key2`,確保陣列中除 `key1` `key2` 以外無其他 `key` 鍵。 +- [#4781](https://github.com/hyperf/hyperf/pull/4781) 新增配置 `close-pull-request.yml`,用來自動關閉只讀的倉庫。 + +# v2.2.32 - 2022-05-16 + +## 修復 + +- [#4745](https://github.com/hyperf/hyperf/pull/4745) 當使用 `kafka` 元件的 `Producer::close` 方法時,修復可能丟擲空指標異常的問題。 +- [#4754](https://github.com/hyperf/hyperf/pull/4754) 通過配置 `monolog>=2.6.0` 解決新版本的 `monolog` 無法正常工作的問題。 + +## 優化 + +- [#4738](https://github.com/hyperf/hyperf/pull/4738) 當使用 `kafka` 元件時,如果沒有設定 `GroupID` 則自動配置一個。 + # v2.2.31 - 2022-04-18 ## 修復 diff --git a/docs/zh-tw/communication.md b/docs/zh-tw/communication.md index 35f1bfac5..956d4a948 100644 --- a/docs/zh-tw/communication.md +++ b/docs/zh-tw/communication.md @@ -7,7 +7,7 @@ > 2000 人群,按需加入 Hyperf 交流群: `862099724` -Hyperf 交流 2 群: `811414891` +Hyperf 交流 2 群: `811414891` Hyperf 交流 3 群: `589051831` ## 微信交流群 diff --git a/docs/zh-tw/quick-start/important.md b/docs/zh-tw/quick-start/important.md index 997a4deaa..26380e0ff 100644 --- a/docs/zh-tw/quick-start/important.md +++ b/docs/zh-tw/quick-start/important.md @@ -26,3 +26,59 @@ composer dump-autoload -o # 生成代理類和註解快取 php bin/hyperf.php ``` + + +## 避免在魔術方法中切換協程 + +> __call __callStatic 除外 + +儘量避免在 `__get` `__set` 和 `__isset` 中切換協程,因為可能會出現不符合預期的情況 + +```php + SWOOLE_HOOK_ALL]); + +class Foo +{ + public function __get(string $name) + { + sleep(1); + return $name; + } + + public function __set(string $name, mixed $value) + { + sleep(1); + var_dump($name, $value); + } + + public function __isset(string $name): bool + { + sleep(1); + var_dump($name); + return true; + } +} + +$foo = new Foo(); +go(static function () use ($foo) { + var_dump(isset($foo->xxx)); +}); + +go(static function () use ($foo) { + var_dump(isset($foo->xxx)); +}); + +\Swoole\Event::wait(); + +``` + +當我們執行上述程式碼時,會返回以下結果 + +```shell +bool(false) +string(3) "xxx" +bool(true +``` diff --git a/docs/zh-tw/quick-start/install.md b/docs/zh-tw/quick-start/install.md index 8d7575a0c..64d4a2cbb 100644 --- a/docs/zh-tw/quick-start/install.md +++ b/docs/zh-tw/quick-start/install.md @@ -8,7 +8,7 @@ Hyperf 對系統環境有一些要求,當您使用 Swoole 網路引擎驅動 當您不想採用 Docker 來作為執行的環境基礎時,您需要確保您的執行環境達到了以下的要求: - - PHP >= 7.4 + - PHP >= 7.4 and <= 8.0 - 以下任一網路引擎 - Swoole PHP 擴充套件 >= 4.5,並關閉了 `Short Name` - Swow PHP 擴充套件 (Beta) diff --git a/docs/zh-tw/summary.md b/docs/zh-tw/summary.md index e43f3f087..c4a4656d2 100644 --- a/docs/zh-tw/summary.md +++ b/docs/zh-tw/summary.md @@ -18,7 +18,7 @@ * [快速開始](zh-tw/quick-start/overview.md) * [常見問題](zh-tw/quick-start/questions.md) * [程式設計須知](zh-tw/quick-start/important.md) - * [視訊教程](https://course.swoole-cloud.com/videos/5/new?from=hyperf.io) + * [視訊教程](https://space.bilibili.com/1176880220/channel/seriesdetail?sid=2121560) * 核心架構 diff --git a/docs/zh-tw/tutorial/docker-swarm.md b/docs/zh-tw/tutorial/docker-swarm.md index 5fb0e6c0c..e0b654fbe 100644 --- a/docs/zh-tw/tutorial/docker-swarm.md +++ b/docs/zh-tw/tutorial/docker-swarm.md @@ -15,6 +15,12 @@ curl -sSL https://get.daocloud.io/docker | sh ExecStart=/usr/bin/dockerd -H unix:// -H tcp://0.0.0.0:2375 ``` +如果不是使用的 `root` 賬戶,可以通過以下命令,讓每次執行 `docker` 時,不需要增加 `sudo` + +``` +usermod -aG docker $USER +``` + ### 配置倉庫映象地址 基於跨國線路訪問速度過慢等問題,我們可以為 Docker 配置倉庫映象地址,來改善這些網路問題,如 [阿里雲(Aliyun) Docker 映象加速器](https://help.aliyun.com/document_detail/60750.html),我們可以申請一個 `Docker` 加速器,然後配置到伺服器上的 `/etc/docker/daemon.json` 檔案,新增以下內容,然後重啟 `Docker`,下面的地址請填寫您自己獲得的加速器地址。 @@ -44,13 +50,15 @@ $ systemctl restart sshd.service 重新登入機器 ``` -ssh -p 2222 root@host +ssh -p 2222 root@host ``` #### 安裝 Gitlab 我們來通過 Docker 啟動一個 Gitlab 服務,如下: +> hostname 一定要加,如果沒有域名可以直接填外網地址 + ``` sudo docker run -d --hostname gitlab.xxx.cn \ --publish 443:443 --publish 80:80 --publish 22:22 \ @@ -60,7 +68,11 @@ sudo docker run -d --hostname gitlab.xxx.cn \ gitlab/gitlab-ce:latest ``` -首次登入 `Gitlab` 需要重置密碼,預設使用者名稱為 `root`。 +預設使用者名稱為 `root`,初始密碼通過以下方式獲得 + +```shell +docker exec gitlab cat /etc/gitlab/initial_root_password +``` ### 安裝 gitlab-runner @@ -87,7 +99,7 @@ $ yum install gitlab-runner 通過 `gitlab-runner register --clone-url http://your-ip/` 命令來將 gitlab-runner 註冊到 Gitlab 上,注意要替換 `your-ip` 為您的 Gitlab 的內網 IP,如下: ``` -$ gitlab-runner register --clone-url http://your-ip/ +$ sudo gitlab-runner register --clone-url http://your-ip/ Please enter the gitlab-ci coordinator URL (e.g. https://gitlab.com/): http://gitlab.xxx.cc/ @@ -108,6 +120,23 @@ $ vim /etc/gitlab-runner/config.toml concurrent = 5 ``` +### 為 gitlab-runner 增加許可權 + +- 免 sudo 執行 docker 的許可權 + +```shell +sudo usermod -aG docker gitlab-runner +``` + +- 映象倉庫的許可權 + +```shell +su gitlab-runner +docker login -u username your-docker-repository +``` + +### + ### 修改郵箱 如果需要 `Gitlab` 傳送郵件(比如使用者建立的郵件等),可以嘗試修改 `/srv/gitlab/config/gitlab.rb` @@ -162,7 +191,7 @@ $ docker swarm join --token ip:2377 > 其他與 builder 一致,但是 tag 卻不能一樣。線上環境可以設定為 tags,測試環境設定為 test -## 安裝其他應用 +## 安裝其他應用 以下以 `Mysql` 為例,直接使用上述 `network`,支援容器內使用 name 互調。 @@ -185,6 +214,28 @@ docker service create \ portainer/portainer ``` +### 備份 Portainer 的資料 + +> portainer_container 為對應的容器名,按實際情況填寫 + +``` +docker run -it --volumes-from portainer_container -v $(pwd):/backup --name backup --rm nginx tar -cf /backup/data.tar /data/ +``` + +### 恢復 Portainer 的資料 + +首先使用建立命令,重新建立 portainer 服務 + +然後使用以下方法,將備份過載到容器中 + +``` +docker run -it --volumes-from portainer_container -v $(pwd):/backup --name importer --rm nginx bash +cd /backup +tar xf data.tar -C / +``` + +最後只需要重啟容器即可 + ## 建立一個 Demo 專案 登入 Gitlab 建立一個 Demo 專案。並匯入我們的專案 [hyperf-skeleton](https://github.com/hyperf/hyperf-skeleton) @@ -294,7 +345,7 @@ docker run -d --name kong-database \ postgres:9.6 ``` -### 安裝閘道器 +### 安裝閘道器 初始化資料庫 @@ -367,7 +418,7 @@ docker run --rm -i -v $basepath/.env:/opt/www/.env \ - 指定 TLinux 源 ``` -tee /etc/yum.repos.d/CentOS-TLinux.repo <<-'EOF' +tee /etc/yum.repos.d/CentOS-TLinux.repo <<-'EOF' [Tlinux] name=Tlinux for redhat/centos $releasever - $basearch failovermethod=priority @@ -462,5 +513,5 @@ docker service update --network-rm old-network service_name 這是因為 Portainer 修改後,不能作用於已經建立的服務,所以手動更新即可 ``` -docker service update --with-registry-auth service_name +docker service update --with-registry-auth service_name ``` diff --git a/src/amqp/.github/workflows/close-pull-request.yml b/src/amqp/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/amqp/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/async-queue/.github/workflows/close-pull-request.yml b/src/async-queue/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/async-queue/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/cache/.github/workflows/close-pull-request.yml b/src/cache/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/cache/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/circuit-breaker/.github/workflows/close-pull-request.yml b/src/circuit-breaker/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/circuit-breaker/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/command/.github/workflows/close-pull-request.yml b/src/command/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/command/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/config-aliyun-acm/.github/workflows/close-pull-request.yml b/src/config-aliyun-acm/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/config-aliyun-acm/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/config-apollo/.github/workflows/close-pull-request.yml b/src/config-apollo/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/config-apollo/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/config-center/.github/workflows/close-pull-request.yml b/src/config-center/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/config-center/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/config-etcd/.github/workflows/close-pull-request.yml b/src/config-etcd/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/config-etcd/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/config-nacos/.github/workflows/close-pull-request.yml b/src/config-nacos/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/config-nacos/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/config-zookeeper/.github/workflows/close-pull-request.yml b/src/config-zookeeper/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/config-zookeeper/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/config/.github/workflows/close-pull-request.yml b/src/config/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/config/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/constants/.github/workflows/close-pull-request.yml b/src/constants/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/constants/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/consul/.github/workflows/close-pull-request.yml b/src/consul/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/consul/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/context/.github/workflows/close-pull-request.yml b/src/context/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/context/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/contract/.github/workflows/close-pull-request.yml b/src/contract/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/contract/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/crontab/.github/workflows/close-pull-request.yml b/src/crontab/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/crontab/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/dag/.github/workflows/close-pull-request.yml b/src/dag/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/dag/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/database/.github/workflows/close-pull-request.yml b/src/database/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/database/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/db-connection/.github/workflows/close-pull-request.yml b/src/db-connection/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/db-connection/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/db/.github/workflows/close-pull-request.yml b/src/db/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/db/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/devtool/.github/workflows/close-pull-request.yml b/src/devtool/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/devtool/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/di/.github/workflows/close-pull-request.yml b/src/di/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/di/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/dispatcher/.github/workflows/close-pull-request.yml b/src/dispatcher/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/dispatcher/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/elasticsearch/.github/workflows/close-pull-request.yml b/src/elasticsearch/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/elasticsearch/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/etcd/.github/workflows/close-pull-request.yml b/src/etcd/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/etcd/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/event/.github/workflows/close-pull-request.yml b/src/event/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/event/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/exception-handler/.github/workflows/close-pull-request.yml b/src/exception-handler/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/exception-handler/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/filesystem/.github/workflows/close-pull-request.yml b/src/filesystem/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/filesystem/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/framework/.github/workflows/close-pull-request.yml b/src/framework/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/framework/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/graphql/.github/workflows/close-pull-request.yml b/src/graphql/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/graphql/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/graphql/src/ClassCollector.php b/src/graphql/src/ClassCollector.php index 78356150a..62d367375 100644 --- a/src/graphql/src/ClassCollector.php +++ b/src/graphql/src/ClassCollector.php @@ -11,19 +11,24 @@ declare(strict_types=1); */ namespace Hyperf\GraphQL; -class ClassCollector +use Hyperf\Di\MetadataCollector; + +class ClassCollector extends MetadataCollector { - private static $classes = []; + /** + * @var array + */ + protected static $container = []; public static function collect(string $class) { - if (! in_array($class, self::$classes)) { - self::$classes[] = $class; + if (! in_array($class, self::$container)) { + self::$container[] = $class; } } public static function getClasses() { - return self::$classes; + return self::$container; } } diff --git a/src/graphql/src/ConfigProvider.php b/src/graphql/src/ConfigProvider.php index da0ad325d..3fb6803b3 100644 --- a/src/graphql/src/ConfigProvider.php +++ b/src/graphql/src/ConfigProvider.php @@ -43,6 +43,9 @@ class ConfigProvider 'paths' => [ __DIR__, ], + 'collectors' => [ + ClassCollector::class, + ], ], ], ]; diff --git a/src/grpc-client/.github/workflows/close-pull-request.yml b/src/grpc-client/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/grpc-client/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/grpc-server/.github/workflows/close-pull-request.yml b/src/grpc-server/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/grpc-server/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/grpc/.github/workflows/close-pull-request.yml b/src/grpc/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/grpc/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/guzzle/.github/workflows/close-pull-request.yml b/src/guzzle/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/guzzle/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/http-message/.github/workflows/close-pull-request.yml b/src/http-message/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/http-message/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/http-server/.github/workflows/close-pull-request.yml b/src/http-server/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/http-server/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/ide-helper/.github/workflows/close-pull-request.yml b/src/ide-helper/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/ide-helper/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/json-rpc/.github/workflows/close-pull-request.yml b/src/json-rpc/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/json-rpc/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/kafka/.github/workflows/close-pull-request.yml b/src/kafka/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/kafka/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/load-balancer/.github/workflows/close-pull-request.yml b/src/load-balancer/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/load-balancer/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/logger/.github/workflows/close-pull-request.yml b/src/logger/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/logger/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/macroable/.github/workflows/close-pull-request.yml b/src/macroable/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/macroable/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/memory/.github/workflows/close-pull-request.yml b/src/memory/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/memory/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/metric/.github/workflows/close-pull-request.yml b/src/metric/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/metric/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/model-cache/.github/workflows/close-pull-request.yml b/src/model-cache/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/model-cache/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/model-listener/.github/workflows/close-pull-request.yml b/src/model-listener/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/model-listener/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/nacos/.github/workflows/close-pull-request.yml b/src/nacos/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/nacos/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/nats/.github/workflows/close-pull-request.yml b/src/nats/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/nats/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/nsq/.github/workflows/close-pull-request.yml b/src/nsq/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/nsq/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/paginator/.github/workflows/close-pull-request.yml b/src/paginator/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/paginator/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/phar/.github/workflows/close-pull-request.yml b/src/phar/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/phar/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/pool/.github/workflows/close-pull-request.yml b/src/pool/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/pool/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/process/.github/workflows/close-pull-request.yml b/src/process/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/process/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/protocol/.github/workflows/close-pull-request.yml b/src/protocol/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/protocol/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/rate-limit/.github/workflows/close-pull-request.yml b/src/rate-limit/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/rate-limit/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/reactive-x/.github/workflows/close-pull-request.yml b/src/reactive-x/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/reactive-x/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/redis/.github/workflows/close-pull-request.yml b/src/redis/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/redis/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/resource-grpc/.github/workflows/close-pull-request.yml b/src/resource-grpc/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/resource-grpc/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/resource/.github/workflows/close-pull-request.yml b/src/resource/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/resource/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/retry/.github/workflows/close-pull-request.yml b/src/retry/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/retry/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/rpc-client/.github/workflows/close-pull-request.yml b/src/rpc-client/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/rpc-client/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/rpc-multiplex/.github/workflows/close-pull-request.yml b/src/rpc-multiplex/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/rpc-multiplex/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/rpc-server/.github/workflows/close-pull-request.yml b/src/rpc-server/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/rpc-server/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/rpc/.github/workflows/close-pull-request.yml b/src/rpc/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/rpc/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/rpn/.github/workflows/close-pull-request.yml b/src/rpn/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/rpn/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/rpn/src/Calculator.php b/src/rpn/src/Calculator.php index 8f97bdbe4..d3a3949ec 100644 --- a/src/rpn/src/Calculator.php +++ b/src/rpn/src/Calculator.php @@ -109,7 +109,7 @@ class Calculator } continue; } - if ($match === '-' && ($key === 0 || in_array($matches[0][$key - 1], ['+', '-', '*', '/', '(']))) { + if ($match === '-' && ($key === 0 || (isset($matches[0][$key - 1]) && in_array($matches[0][$key - 1], ['+', '-', '*', '/', '('])))) { $numStack->push($match . ($matches[0][$key + 1])); unset($matches[0][$key + 1]); continue; diff --git a/src/rpn/tests/CalculatorTest.php b/src/rpn/tests/CalculatorTest.php index 72dd07c04..ef6f72c9f 100644 --- a/src/rpn/tests/CalculatorTest.php +++ b/src/rpn/tests/CalculatorTest.php @@ -89,5 +89,8 @@ class CalculatorTest extends AbstractTestCase $got = $calculator->toRPNExpression('12 -- 10 * 4.4 + 1'); $this->assertSame('12 -10 4.4 * - 1 +', $got); + + $got = $calculator->toRPNExpression('1 + 2 + 3 * 4 * -5 - 6'); + $this->assertSame('1 2 + 3 4 -5 * * + 6 -', $got); } } diff --git a/src/scout/.github/workflows/close-pull-request.yml b/src/scout/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/scout/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/server/.github/workflows/close-pull-request.yml b/src/server/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/server/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/service-governance-consul/.github/workflows/close-pull-request.yml b/src/service-governance-consul/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/service-governance-consul/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/service-governance-nacos/.github/workflows/close-pull-request.yml b/src/service-governance-nacos/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/service-governance-nacos/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/service-governance/.github/workflows/close-pull-request.yml b/src/service-governance/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/service-governance/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/session/.github/workflows/close-pull-request.yml b/src/session/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/session/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/signal/.github/workflows/close-pull-request.yml b/src/signal/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/signal/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/snowflake/.github/workflows/close-pull-request.yml b/src/snowflake/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/snowflake/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/socket/.github/workflows/close-pull-request.yml b/src/socket/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/socket/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/socketio-server/.github/workflows/close-pull-request.yml b/src/socketio-server/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/socketio-server/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/super-globals/.github/workflows/close-pull-request.yml b/src/super-globals/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/super-globals/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/swagger/.github/workflows/close-pull-request.yml b/src/swagger/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/swagger/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/swoole-tracker/.github/workflows/close-pull-request.yml b/src/swoole-tracker/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/swoole-tracker/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/task/.github/workflows/close-pull-request.yml b/src/task/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/task/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/testing/.github/workflows/close-pull-request.yml b/src/testing/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/testing/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/tracer/.github/workflows/close-pull-request.yml b/src/tracer/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/tracer/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/translation/.github/workflows/close-pull-request.yml b/src/translation/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/translation/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/utils/.github/workflows/close-pull-request.yml b/src/utils/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/utils/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/validation/.github/workflows/close-pull-request.yml b/src/validation/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/validation/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/validation/src/Concerns/ValidatesAttributes.php b/src/validation/src/Concerns/ValidatesAttributes.php index e22cdac97..c14d65297 100755 --- a/src/validation/src/Concerns/ValidatesAttributes.php +++ b/src/validation/src/Concerns/ValidatesAttributes.php @@ -167,9 +167,17 @@ trait ValidatesAttributes * * @param mixed $value */ - public function validateArray(string $attribute, $value): bool + public function validateArray(string $attribute, $value, array $parameters = []): bool { - return is_array($value); + if (! is_array($value)) { + return false; + } + + if (empty($parameters)) { + return true; + } + + return empty(array_diff_key($value, array_fill_keys($parameters, ''))); } /** diff --git a/src/validation/tests/Cases/ValidationFactoryTest.php b/src/validation/tests/Cases/ValidationFactoryTest.php index 8171b7204..687e55a3a 100755 --- a/src/validation/tests/Cases/ValidationFactoryTest.php +++ b/src/validation/tests/Cases/ValidationFactoryTest.php @@ -110,7 +110,7 @@ class ValidationFactoryTest extends TestCase $translator = m::mock(TranslatorInterface::class); $factory = new ValidatorFactory($translator); $factory->extend('foo', function ($attribute, $value, $parameters, $validator) { - return $validator->validateArray($attribute, $value); + return $validator->validateArray($attribute, $value, $parameters); }); $validator = $factory->make(['bar' => ['baz']], ['bar' => 'foo']); diff --git a/src/validation/tests/Cases/ValidationValidatorTest.php b/src/validation/tests/Cases/ValidationValidatorTest.php index 08a740427..4033e6526 100755 --- a/src/validation/tests/Cases/ValidationValidatorTest.php +++ b/src/validation/tests/Cases/ValidationValidatorTest.php @@ -650,6 +650,15 @@ class ValidationValidatorTest extends TestCase $v = new Validator($trans, ['foo' => new SplFileInfo('/tmp/foo')], ['foo' => 'Array']); $this->assertFalse($v->passes()); + + $v = new Validator($trans, ['foo' => ['name' => 'foo', 'gender' => 1, 'vote' => 1]], ['foo' => 'Array:name,gender']); + $this->assertFalse($v->passes()); + + $v = new Validator($trans, ['foo' => ['name' => 'foo', 'gender' => 1]], ['foo' => 'Array:name,gender']); + $this->assertTrue($v->passes()); + + $v = new Validator($trans, ['foo' => ['name' => 'foo', 'gender' => 1]], ['foo' => 'Array:name,gender,vote']); + $this->assertTrue($v->passes()); } public function testValidateFilled() @@ -3468,6 +3477,22 @@ class ValidationValidatorTest extends TestCase ['foo' => 'Array', 'foo.*.name' => ['Required', 'String'], 'foo.*.votes.*' => ['Required', 'Integer']] ); $this->assertFalse($v->passes()); + + // multiple items fields passes + $v = new Validator( + $trans, + ['foo' => [['name' => 'first'], ['name' => 'second']]], + ['foo' => 'Array', 'foo.*' => 'Array:name', 'foo.*.name' => ['Required']] + ); + $this->assertTrue($v->passes()); + + // multiple items fields fails + $v = new Validator( + $trans, + ['foo' => [['name' => 'first', 'votes' => 1], ['name' => 'second', 'votes' => 2]]], + ['foo' => 'Array', 'foo.*' => 'Array:name', 'foo.*.name' => ['Required']] + ); + $this->assertFalse($v->passes()); } public function testSometimesOnArraysInImplicitRules() diff --git a/src/view-engine/.github/workflows/close-pull-request.yml b/src/view-engine/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/view-engine/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/view/.github/workflows/close-pull-request.yml b/src/view/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/view/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/watcher/.github/workflows/close-pull-request.yml b/src/watcher/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/watcher/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/websocket-client/.github/workflows/close-pull-request.yml b/src/websocket-client/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/websocket-client/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/src/websocket-server/.github/workflows/close-pull-request.yml b/src/websocket-server/.github/workflows/close-pull-request.yml new file mode 100644 index 000000000..591822c0f --- /dev/null +++ b/src/websocket-server/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! "