🚀Hyperf is an extremely performant and flexible PHP CLI framework

Overview

English | 中文

Hyperf Logo

Stable Version Php Version Swoole Version Hyperf License

PHPUnit for Hyperf Total Downloads Monthly Downloads

Introduction

Hyperf is an extremely performant and flexible PHP CLI framework, powered by a state-of-the-art coroutine server and a large number of battle-tested components. Aside from decisively beating PHP-FPM frameworks in benchmarks, Hyperf is unique in its focus on flexibility and composition. Hyperf ships with an AOP-enabling (aspect-oriented programming) dependency injector to ensure components and classes are pluggable and meta-programmable. All of Hyperf's core components strictly follow PSR standards and can be used in other frameworks.

Hyperf's architecture is built using a combination of Coroutines, Dependency injection, Events, Annotations, and AOP. In addition to providing MySQL, Redis and other common coroutine clients, Hyperf also provides coroutine compatible versions of WebSocket server / client, JSON RPC server / client, gRPC server / client, Zipkin/Jaeger (OpenTracing) client, Guzzle HTTP client, Elasticsearch client, Consul client, ETCD client, AMQP component, Apollo configuration center, Aliyun ACM, ETCD configuration center, Token bucket algorithm-based limiter, Universal connection pool, Circuit breaker, Swagger, Swoole Tracker, Snowflake, Simply Redis MQ, RabbitMQ, NSQ, Nats, Seconds level crontab, Custom Processes, etc. Therefore, developers can entirely avoid implementing coroutine compatible versions of these libraries.

Rest assured, Hyperf is still a PHP framework. Hyperf provides all the packages you expect: Middleware, Event Manager, Coroutine-optimized Eloquent ORM (and Model Cache!), Translation, Validation, View engine (Blade/Smarty/Twig/Plates/ThinkTemplate) and more.

Origin

Although there are many new PHP frameworks, we still haven't found a framework that matches an elegant design with ultra-high performance, nor have we found a framework that paves the way for PHP microservices. With this vision in mind, we will continue to invest in the future of this framework, and you are welcome to join us in contributing to the open-source development of Hyperf.

Design Goals

Hyperspeed + Flexibility = Hyperf. The equation hidden in our name exhibits Hyperf's founding ambition.

Hyperspeed: Leveraging Swoole and Swow coroutines, Hyperf is capable of handling massive amounts of traffic. The Hyperf team made many optimizations to the framework to eliminate every bottleneck between the end-user and our blazing engine.

Flexibility: We believe our Dependency Injection component is best in class. With the help of Hyperf DI, components and classes are all pluggable and meta-programmable. Inversely, all Hyperf components are meant to be shared with the world. Our commitment to PSR standards means that you can use Hyperf components in any compatible framework.

Via these traits, Hyperf has discovered the untapped potential in many fields: implementing Web servers, gateway servers, distributed middleware software, microservices architecture, game servers, and Internet-of-Things (IoT).

Production ready

Alongside our well-maintained, multilingual documentation, a large number of unit tests for each component ensure logical correctness. Before Hyperf was released to the public (2019-06-20), it was used privately for multiple services in series-C and series-B Internet companies, which have been running without incident for years in harsh production environments.

Documentation

https://hyperf.wiki

Security Vulnerabilities

If you discover a security vulnerability within Hyperf, please send an e-mail to the Hyperf Team via [email protected]. All security vulnerabilities will be promptly addressed.

Code Contributors

This project exists thanks to all the people who contribute. [Contribute].

Code Contributor over time

Code Contributor over time

Financial Contributors

Become a financial contributor and help us sustain our community. [Contribute]

Support this project with your organization or company. Your logo will show up here with a link to your website. [Contribute]

Performance

Aliyun 8 cores 16G ram

command: wrk -c 1024 -t 8 http://127.0.0.1:9501/

Running 10s test @ http://127.0.0.1:9501/
  8 threads and 1024 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdevs
    Latency    10.08ms    6.82ms  56.66ms   70.19%
    Req/Sec    13.17k     5.94k   33.06k    84.12%
  1049478 requests in 10.10s, 190.16MB read
Requests/sec: 103921.49
Transfer/sec:     18.83MB

The Hyperf Ecosystem

  • 🧬 Nano is a zero-config, no skeleton, minimal Hyperf distribution that allows you to quickly build a Hyperf application with just a single PHP file.
  • ⚡️ GoTask is a library to spawns a go process as a Swoole sidecar and establishes a bi-directional IPC to offload heavy-duties to Go. Think of it as a Swoole Taskworker in Go.
  • 🚀 Jet is a unification model RPC Client, built-in JSONRPC protocol, available to running in ALL PHP environments, including PHP-FPM and Swoole/Hyperf environments.

Stargazers over time

Stargazers over time

License

The Hyperf framework is open-source software licensed under the MIT license.

Comments
  • [BUG] 升级hyerf 版本号 socketio 不能单聊,群聊了

    [BUG] 升级hyerf 版本号 socketio 不能单聊,群聊了

    socketio测试.zip 测试包 3个客户端, 里面的控制器是实现代码, 客户端连接时我把当前socket的sid存入redis, 然后to($sid)->emit 的形式实现单聊, 没升级版本前是可以的当时版本2.0+, 后来 composer update 又升级几次,代码没动过就不能实现 私聊和群聊了

    bug need script to reproduce 
    opened by mrliu1021 44
  • 服务熔断不生效

    服务熔断不生效

    按照文档按照组件,配置好了

    调用如下

    /**
     * @CircuitBreaker(timeout=0.05, failCounter=1, successCounter=1, fallback="App\Model\UserTokenModel::searchFallback")
     */
    public  static function  GetPublicToken()
    {
        $Authorization = ApplicationContext::getContainer()->get(AuthorizationInterface::class);
        $publicToken=$Authorization->GetPublicToken();//微服务上的一个方法 sleep(30)了
        return $publicToken;
    }
    
    public static function searchFallback()
    {
        return "超时啦";
    }
    
      异常有抛出    
      "Request timed out, errCode=110[217] in /www/wwwroot/8181.com/hyperf-skeleton/vendor/hyperf/guzzle/src/CoroutineHandler.php
    

    不知道是否还需要配置什么

    opened by shaodekun 43
  • [BUG] Consumer进程cpu 100%

    [BUG] Consumer进程cpu 100%

    • Hyperf Version: 1.1.3
    • PHP Version: (php -v) 7.3.10
    • Swoole Version: (php --ri swoole) 4.4.8

    Description:

    有一个Consumer进程cpu 100%,server日志中出现过一次AMQP异常,应该是它引起的;从strace信息中看它在无间隙的执行epoll_***,输出信息刷屏非常快。

    其它机器都是正常的,只有这一台机器的一个进程挂了。

    以下是各种信息截图: image

    image

    image

    image

    bug 
    opened by minxinqing 42
  • 版本更新导致的一些问题[QUESTION]

    版本更新导致的一些问题[QUESTION]

    现在使用的hyperf 1.1.22版本在执行composer update后会出现所有业务都不能正常运行的问题。。 没有错误日志,接口都处于pending状态.. 没有什么debug的头绪,能提示一下吗

    "name": "hyperf/framework", "version": "v1.1.22", 当前版本 "version": "v1.1.27", 更新后的版本

    question 
    opened by boxshadow 33
  • [QUESTION] 求优化请求方案?求大佬

    [QUESTION] 求优化请求方案?求大佬

    代码如下:

    \Swoole\Runtime::enableCoroutine(); $parallel = new Parallel(257);

        foreach($rows as $rowsdata) {
           $parallel->add(function ()use($rowsdata) {
            $write=array(
                "tables"=>array(
                    array(
                        "table_name"=>self::Thetrends_Accept,
                        "rows"=>$rowsdata
                    )
                ),
            );
           // $this->otsClient->batchWriteRow($write);//批量写入200
             return;
            });
        }
        $results = $parallel->wait();
    

    说明 $row count为257key 请求的是啊里云的表格存储

    使用协程,再不请求第三方接口的前提下,运行大概0.2秒完成

    使用协程,请求第三方接口的前提下(即代码注释的那段) ,运行去到了十几秒

    如果单次请求第三方接口的话,时间是0.几秒的,加上协程就很慢了

    如何可以优化快速完成所有请求呢?

    question 
    opened by shaodekun 30
  • [BUG] hyperf3.0 + php81 + swoole4.8.11 下 parallel 在连接池耗尽情况下可能存在内存泄漏

    [BUG] hyperf3.0 + php81 + swoole4.8.11 下 parallel 在连接池耗尽情况下可能存在内存泄漏

    Execute the command and paste the result below.

    Command: uname -a && php -v && composer info | grep hyperf && php --ri swoole

    /www # php -v
    PHP 8.1.8 (cli) (built: Jul  7 2022 22:52:25) (NTS)
    Copyright (c) The PHP Group
    Zend Engine v4.1.8, Copyright (c) Zend Technologies
        with Zend OPcache v8.1.8, Copyright (c), by Zend Technologies
    /www # php --ri swoole
    
    swoole
    
    Swoole => enabled
    Author => Swoole Team <[email protected]>
    Version => 4.8.11
    Built => Jul 11 2022 10:02:38
    coroutine => enabled with boost asm context
    epoll => enabled
    eventfd => enabled
    signalfd => enabled
    spinlock => enabled
    rwlock => enabled
    openssl => OpenSSL 1.1.1q  5 Jul 2022
    dtls => enabled
    http2 => enabled
    json => enabled
    curl-native => enabled
    pcre => enabled
    zlib => 1.2.12
    brotli => E16777225/D16777225
    mutex_timedlock => enabled
    pthread_barrier => enabled
    async_redis => enabled
    
    Directive => Local Value => Master Value
    swoole.enable_coroutine => On => On
    swoole.enable_library => On => On
    swoole.enable_preemptive_scheduler => Off => Off
    swoole.display_errors => On => On
    swoole.use_shortname => On => On
    swoole.unixsock_buffer_size => 8388608 => 8388608
    

    Description:

    上周二,把公司某些访问量极大的核心项目由 hyperf2.2 + php74 升级到了 hyperf3.0 + php81,升级过程一切顺利。

    但是,上线后,却发现容器每天都会报警,报内存不足,心想,线上容器的 limit 全部设置了 2G,而且我个人对自己写的代码还是有信心的,想着不大可能内存泄漏啊,也没当回事儿,前一两次报警就直接重启无脑解决了

    然而,在接下来的几天内,每天几乎至少一次的报警,想着可能不能再无视下去了,开始重视了起来。最近没有过大迭代,唯一一次变更就是把 hyperf 及 php 升级到了最新版,想着不大可能是这些原因造成的吧?所以,我首先开始检查审视业务逻辑代码,经过2天多的检查,依然没有发现有明显的内存泄漏情况

    所以,我把目标转到了 hyperf + swoole + php81 上,索性,一鼓作气,从 php81 降级到 php74,hyperf 也降级到 2.2,在本地压测后惊奇的发现,内存稳定了??

    然后就有了下面的测试重现

    Steps To Reproduce:

    第零步:前提说明

    php80 环境: php8.0.11 + swoole4.8.11 + hyperf3.0.0-beta10 + hyperf-skeleton 环境 php81 环境: php8.1.8 + swoole4.8.11 + hyperf3.0.0-beta10 + hyperf-skeleton 环境

    修改点:

    • config.php 中 SCAN_CACHEABLE 默认为 true
    • server.php 中 mode 改为 SWOOLE_BASE
    • server.php 中 Constant::OPTION_WORKER_NUM 改为 1 (方便查看内存情况)
    • server.php 中 注释掉 Constant::OPTION_MAX_REQUEST => 100000 这一行(方便查看内存情况)

    其它全部为 hyperf-skeleton 默认代码,无修改

    第一步:思考可能的情况

    最开始也毫无头绪,不知道从哪里查,在分析线上报警的容器之后,我想,会不会是数据库问题?于是,首先拿了线上其中一个比较简单的接口尝试了一下,复现了。

    第二步:根据思考进行压测验证

    代码

    public function index()
        {
            \var_dump(\memory_get_usage(true));
    
            $user = $this->request->input('user', 'Hyperf');
            $method = $this->request->getMethod();
    
            $calls[] = function () use ($user) {
                return User::query()->where('username', $user)->first();           
            };
            $calls[] = function () use ($user) {
                return User::query()->where('username', $user)->first();           
            };
            $calls[] = function () use ($user) {
                return User::query()->where('username', $user)->first();           
            };
            $calls[] = function () use ($user) {
                return User::query()->where('username', $user)->first();           
            };
    
            $results = \do_parallel($calls);
    
            return [
                'method' => $method,
                'message' => "Hello.",
                'data' => $results
            ];
        }
    
    use Hyperf\Utils\Exception\ParallelExecutionException;
    
    if (!function_exists('do_parallel')) {
        function do_parallel(array $calls, int $concurrent = 30): array
        {
            try {
                $results = parallel($calls, $concurrent);
            } catch (ParallelExecutionException $e) {
                $throwable = $e->getThrowables();
                $results = $e->getResults();
    
                foreach ($throwable as $key => $throw) {
                    echo '出现并发执行错误: '.$throw->getMessage();
                }
            }
    
            return $results ?? [];
        }
    }
    

    压测命令

    同时两个 terminal 执行

    ab -k -c 20 -n 10000 "http://127.0.0.1:8080/index/index" (如果想让现象来的快些,可以加大并发,加大并发会使内存比下面测试数据增大,但最终结论与现象一致)

    压测现象

    • php81 环境下: 内存不稳定,持续增大 (压测结束在 60M,并持续增大中,docker stats 同现象)
    • php80 环境下: 内存稳定(压测结束在 33M,并在压测50%左右时已经保持稳定,docker stats 同现象)

    压测过程中会出现连接池耗尽的现象,先暂时不管,后面再讨论

    思考

    这里其实已经能复现出内存溢出的现象了

    但是这里应发了我两个思考:

    • php80 环境下是否会有同样的现象

      经过实际验证,php80 环境下不会出现内存溢出现象

    • 是数据库还是其他方面造成的内存泄漏?

      这里只能确定可能是数据库查询引起的,但是并不能确定,因为是通过 parallel 执行的,如果不通过它执行,会出现什么现象呢? 于是,应发第三步

    第三步:顺序执行数据库查询

    代码

    public function index2()
        {
            \var_dump(\memory_get_usage(true));
    
            $user = $this->request->input('user', 'Hyperf');
            $method = $this->request->getMethod();
    
            $results[] = User::query()->where('username', $user)->first();           
            $results[] = User::query()->where('username', $user)->first();           
            $results[] = User::query()->where('username', $user)->first();           
            $results[] = User::query()->where('username', $user)->first();           
    
            return [
                'method' => $method,
                'message' => "Hello2",
                'data' => $results
            ];
        }
    

    压测命令

    同时两个 terminal 执行

    ab -k -c 20 -n 10000 "http://127.0.0.1:8080/index/index2"(如果想让现象来的快些,可以加大并发,加大并发会使内存比下面测试数据增大,但最终结论与现象一致)

    压测现象

    • php81 环境下: 内存稳定(压测结束在 18M,并在压测50%左右时已经保持稳定,docker stats 同现象)
    • php80 环境下: 内存稳定(压测结束在 18M,并在压测50%左右时已经保持稳定,docker stats 同现象)

    压测过程中会出现连接池耗尽的现象,先暂时不管,后面再讨论

    思考

    这里我又发现,这样的写法,内存又稳定了??那这下能锁定原因了:并不是数据库查询引发的问题,可能是 parallel 或及其实现造成的问题,这样,又引发一个问题,到底是 swoole 底层的原因,还是 hyperf 应用代码层面的原因呢?如果我不用 parallel 这个函数,而是用 swoole 自带的呢?于是第四步就来了

    第四步:swoole 原生 WaitGroup 代码实现数据库并发

    代码

    public function index3()
        {
            \var_dump(\memory_get_usage(true));
            $user = $this->request->input('user', 'Hyperf');
            $method = $this->request->getMethod();
    
            $calls[] = function () use ($user) {
                return User::query()->where('username', $user)->first();           
            };
            $calls[] = function () use ($user) {
                return User::query()->where('username', $user)->first();           
            };
            $calls[] = function () use ($user) {
                return User::query()->where('username', $user)->first();           
            };
            $calls[] = function () use ($user) {
                return User::query()->where('username', $user)->first();           
            };
    
            $results = \do_parallel3($calls);
    
            return [
                'method' => $method,
                'message' => "Hello3",
                'data' => $results
            ];
        }
    
    use Swoole\Coroutine;
    use Swoole\Coroutine\WaitGroup;
    
    if (!function_exists('do_parallel3')) {
        function do_parallel3(array $calls, int $concurrent = 30): array
        {
            $wg = new WaitGroup();
            $results = [];
    
            $wg->add(count($calls));
            
            foreach ($calls as $call) {
                Coroutine::create(function () use ($wg, $call, &$results) {
                    try {
                        $results[] = call($call); 
                    } catch (\Throwable $e) {
                        echo '出现并发执行错误: '.$e->getMessage();
                    } finally {
                        $wg->done();
                    }
                });
            }
    
            $wg->wait();
    
            return $results ?? [];
        }
    }
    

    压测命令

    同时两个 terminal 执行

    ab -k -c 20 -n 10000 "http://127.0.0.1:8080/index/index3"(如果想让现象来的快些,可以加大并发,加大并发会使内存比下面测试数据增大,但最终结论与现象一致)

    压测现象

    • php81 环境下: 内存稳定(压测结束在 20M,并在压测50%左右时已经保持稳定,docker stats 同现象)
    • php80 环境下: 内存稳定(压测结束在 20M,并在压测50%左右时已经保持稳定,docker stats 同现象)

    思考

    这里基本上能确定是 hyperf 的 parallel 或及其实现造成的问题。

    但,parallel 只是一个 function 而已,没啥逻辑,其实现也是用 swoole 的 channel 实现的,理论上来说不应该啊,继续思考

    第五步:会不会和数据库连接池耗尽有关?

    刚刚我们提到在压测过程中会出现连接池耗尽的情况,这个现象本来是正常的,毕竟默认 max-connection 设置的是 10 比较低

    但是,在压测的过程中,我们发现在 php81 的环境下,在大量出现 Connection pool exhausted. Cannot establish new connection before wait_timeout 的提示之后的十几秒内,内存就会增大一部分,因此又有一个猜想,我把 max-connection 设置为100 看看

    这下,有意思的现象来了

    压测命令

    同时两个 terminal 执行

    ab -k -c 50 -n 10000 "http://127.0.0.1:8080/index/index"

    压测现象

    • php81 环境下: 内存稳定(压测结束在 35M,并在压测50%左右时已经保持稳定,docker stats 同现象)
    • php80 环境下:未测试

    思考

    我感觉最终的可能会和数据库的连接池耗尽有关,继续验证,把 并发调大进行验证

    第六步:php81 下加大并发,连接池保持不变验证

    压测命令

    同时两个 terminal 执行

    ab -k -c 100 -n 10000 "http://127.0.0.1:8080/index/index"

    压测现象

    • php81 环境下: 内存稳定(压测结束在 73M,并且内存不稳定,持续增大中,docker stats 同现象)
    • php80 环境下:未测试

    思考

    不会吧,最后的结论还是和数据库有关?只不过这次的结论是 数据库连接池 的问题,第七步继续验证是否是 swoole 的问题

    第七步:php81 下加大并发,连接池保持不变,使用 swoole 原生 WaitGroup 验证

    压测命令

    同时两个 terminal 执行

    ab -k -c 100 -n 10000 "http://127.0.0.1:8080/index/index3"

    压测现象

    • php81 环境下: 内存稳定(压测结束在 48M,内存在压测不到 50% 时就已稳定,docker stats 同现象)
    • php80 环境下:未测试

    思考

    到这里,总算有一个明确的结论了,paralle 的过程中,可能对 数据库连接池耗尽的情况 在 php81 的环境下没有处理好造成的内存泄漏

    但是,截止的这里,仍然没有办法解释通为什么线上容器会有内存泄漏的情况,因为线上的连接池是没有 耗尽 的情况的

    总结

    • paralle 的过程中,可能对数据库连接池耗尽的情况 在 php81 的环境下没有处理好造成的内存泄漏

    遗留疑问

    线上的连接池是没有 耗尽 的情况的,也出现了内存泄漏的情况

    时间关系,没有再继续往下思考验证了,等晚些时候闲下来了,再思考更新吧,目前已经有结论了

    bug 
    opened by yansongda 29
  • 想请教AMQP的一些问题[QUESTION]

    想请教AMQP的一些问题[QUESTION]

    Before you submit this issue, you has been search all existed issues and search the documentation

    • [] I've been search all existed issues
    • [] I've been read all documentation

    Describe your question

    我们使用hyperf的版本是2.0.x,composer update最新的版本。 我们现在线上使用了阿里的rabbitmq,但是发现每天都会有如下的报错,运行久了偶尔会导致内存猛涨,然后就mq就不消费了,不知道你们有遇到过这个问题吗?:

    2020-09-05T06:20:15.599607404Z [INFO] Process[Consumer-callback.29] start.
    2020-09-05T06:20:15.640280319Z [ERROR] PhpAmqpLib\Exception\AMQPProtocolChannelException:QueueConsumerNumExceeded[ConsumerNum=66, ConsumerNumLimit=64], ReqId:5F532DF6383136146F8E8EBA(530) in /app/www/GloBalWechatCallback/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Channel/AMQPChannel.php:215
    2020-09-05T06:20:15.640326303Z Stack trace:
    2020-09-05T06:20:15.640334986Z #0 [internal function]: PhpAmqpLib\Channel\AMQPChannel->channel_close(Object(PhpAmqpLib\Wire\AMQPReader))
    2020-09-05T06:20:15.640340731Z #1 /app/www/GloBalWechatCallback/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Channel/AbstractChannel.php(216): call_user_func(Array, Object(PhpAmqpLib\Wire\AMQPReader))
    2020-09-05T06:20:15.640346236Z #2 /app/www/GloBalWechatCallback/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Channel/AbstractChannel.php(373): PhpAmqpLib\Channel\AbstractChannel->dispatch('20,40', '\x02\x12]QueueConsume...', NULL)
    2020-09-05T06:20:15.640352170Z #3 /app/www/GloBalWechatCallback/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Channel/AMQPChannel.php(995): PhpAmqpLib\Channel\AbstractChannel->wait(Array, false, 0)
    2020-09-05T06:20:15.640357587Z #4 /app/www/GloBalWechatCallback/vendor/hyperf/amqp/src/Consumer.php(91): PhpAmqpLib\Channel\AMQPChannel->basic_consume('callback', 'callback', false, false, false, false, Object(Closure))
    2020-09-05T06:20:15.640398642Z #5 /app/www/GloBalWechatCallback/vendor/hyperf/amqp/src/ConsumerManager.php(82): Hyperf\Amqp\Consumer->consume(Object(App\Consumers\CallbackConsumer))
    2020-09-05T06:20:15.640405812Z #6 /app/www/GloBalWechatCallback/vendor/hyperf/process/src/AbstractProcess.php(113): [email protected]>handle()
    2020-09-05T06:20:15.640411087Z #7 {main}
    2020-09-05T06:20:16.003637625Z [INFO] Process[Consumer-callback.26] start.
    2020-09-05T06:20:16.068247748Z [ERROR] PhpAmqpLib\Exception\AMQPProtocolChannelException:QueueConsumerNumExceeded[ConsumerNum=66, ConsumerNumLimit=64], ReqId:5F532E20343445DA05910594(530) in /app/www/GloBalWechatCallback/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Channel/AMQPChannel.php:215
    2020-09-05T06:20:16.068296455Z Stack trace:
    2020-09-05T06:20:16.068302603Z #0 [internal function]: PhpAmqpLib\Channel\AMQPChannel->channel_close(Object(PhpAmqpLib\Wire\AMQPReader))
    2020-09-05T06:20:16.068307824Z #1 /app/www/GloBalWechatCallback/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Channel/AbstractChannel.php(216): call_user_func(Array, Object(PhpAmqpLib\Wire\AMQPReader))
    2020-09-05T06:20:16.068312863Z #2 /app/www/GloBalWechatCallback/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Channel/AbstractChannel.php(373): PhpAmqpLib\Channel\AbstractChannel->dispatch('20,40', '\x02\x12]QueueConsume...', NULL)
    2020-09-05T06:20:16.068318040Z #3 /app/www/GloBalWechatCallback/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Channel/AMQPChannel.php(995): PhpAmqpLib\Channel\AbstractChannel->wait(Array, false, 0)
    2020-09-05T06:20:16.068323217Z #4 /app/www/GloBalWechatCallback/vendor/hyperf/amqp/src/Consumer.php(91): PhpAmqpLib\Channel\AMQPChannel->basic_consume('callback', 'callback', false, false, false, false, Object(Closure))
    2020-09-05T06:20:16.068328218Z #5 /app/www/GloBalWechatCallback/vendor/hyperf/amqp/src/ConsumerManager.php(82): Hyperf\Amqp\Consumer->consume(Object(App\Consumers\CallbackConsumer))
    2020-09-05T06:20:16.068333180Z #6 /app/www/GloBalWechatCallback/vendor/hyperf/process/src/AbstractProcess.php(113): [email protected]>handle()
    2020-09-05T06:20:16.068337895Z #7 {main}
    
    question 
    opened by phper666 29
  • 模型中支持自定义类型转换

    模型中支持自定义类型转换

    https://laravel.com/docs/7.x/eloquent-mutators#custom-casts https://learnku.com/docs/laravel/7.x/eloquent-mutators/7502

    • [x] Added Castable, CastsAttributes and CastsInboundAttributes
    • [x] Added Model\Builder::withCasts
    • [x] Added Model::loadMorph, Model::loadMorphCount and Model::syncAttributes,
    reviewing 
    opened by nfangxu 29
  • [QUESTION] 请问咱们 GRPC 客户端在 swoole 4.5 下可用吗? node 的客户端测试正常,但咱们客户端报 No Response

    [QUESTION] 请问咱们 GRPC 客户端在 swoole 4.5 下可用吗? node 的客户端测试正常,但咱们客户端报 No Response

    Before you submit this issue, you has been search all existed issues and search the documentation

    • [x] I've been search all existed issues
    • [x] I've been read all documentation

    Describe your question

    不知道是否和 #1421 有关?

    proto 文件

    syntax = "proto3";
    
    package cti;
    
    message AgentCmdRequest {
        string jsonRequest = 1;
    }
    
    message AgentCmdReply {
        string jsonReply = 1;
    }
    
    service Cti {
        rpc AgentCmd ( AgentCmdRequest) returns ( AgentCmdReply) {}
    }
    

    mac 下使用 protoc 生成代码后

    /**
         * @RequestMapping(path="fuck", methods={"POST"})
         */
        public function call(): array
        {
            (new CtiGrpc('172.25.1.124:5027', ['credentials' => null]))->fuck('{"action":15,"fuck":"6690170531783684096"}');
    
            return $this->success();
        }
    

    client 客户端

    <?php
    
    declare(strict_types=1);
    
    namespace App\Util\Grpc;
    
    use App\Util\Logger;
    use Cti\AgentCmdReply;
    use Cti\AgentCmdRequest;
    
    class CtiGrpc extends AbstractClient
    {
        public function fuck(string $data)
        {
            $arg = (new AgentCmdRequest())->setJsonRequest($data);
    
            $response = $this->_simpleRequest('/cti.Cti/AgentCmd', $arg, [AgentCmdReply::class, 'decode']);
    
            Logger::info('response', $response);
    
            return $response;
        }
    }
    

    最后,请求 fuck,没有一次成功的,每次都是报

    [2020-07-25 20:35:53 *17013.1]	NOTICE	http2 stream#1 belongs to an unknown type or it never registered
    [2020-07-25T20:35:56.557711+08:00] app.INFO: response {"0":"No response","1":-1,"2":false}
    

    目前,看了相关源码,暂未找到问题,没有头绪,所以请教下

    感谢

    ps:服务端是 c 写的,附 nodejs 客户端源码

    var grpc = require('@grpc/grpc-js');
    var protoLoader = require('@grpc/proto-loader');
    var PROTO_PATH = 'cti.proto';
    
    var arguments = process.argv.splice(2);
    
    var srv_addr="127.0.0.1:5027";
    var message;
    if(arguments.length < 1){
        console.log("parms too low!");
        help();
        process.exit(0);
    }else if(arguments.length == 1){
        message = arguments[0];
    }else{
        srv_addr = arguments[0];
        message = arguments[1];
    }
    var packageDefinition = protoLoader.loadSync(
        PROTO_PATH, {
            keepCase: true,
            longs: String,
            enums: String,
            defaults: true,
            oneofs: true
        });
    
    var cti_proto = grpc.loadPackageDefinition(packageDefinition).cti;
    
    
    // 指定地址和端口号
    var client = new cti_proto.Cti(srv_addr, grpc.credentials.createInsecure());
    
    console.log("grpc host["+srv_addr+"] message["+message+"] start...");
    
    client.AgentCmd({
        jsonRequest: message
    }, function(err, response) {
        if (err !== null) {
            console.log("grpc error:"+err);
            process.exit(0);
        }
        console.log('Greeting:', response);
        process.exit(0);
    });
    

    执行 node g-client.js '{"action":15,"fuck":"6690170531783684096"}' 后,是可以正常返回的

    question 
    opened by yansongda 28
  • [QUESTION] 有个网络请求的问题困扰挺久了,请教一下。

    [QUESTION] 有个网络请求的问题困扰挺久了,请教一下。

    项目使用了“Guzzle HTTP 协程客户端”,上线以来一直会有"Connection failed, errCode=110"错误,之前没怎么在意,进入3月份以来,由于请求量大了,这个错误明显增多,请接口方及阿里云协助排查问题后,给出了以下结论:

    1,通过招行给的抓包文件可以看出,招行发出了fin ack后,应用并没有及时返回fin ack(只回了对finack的ack)
    2,阿里云nat网关收到招行的finack后,会进入一个类似timewait的状态,这个状态只能维持5秒,如果超过5秒的话,nat网关会把对应的session关闭(这个时候源端口就释放出来了)
    3,应用一直没有回复finack,等到应用确认数据处理完毕后,发送finack,但是由于nat网关已经将老的session关闭了,因此发布出来(ecs有大量fin重传)
    4,这个时候有新的请求发出,nat网关分配端口的时候有可能会分配第二条回收的源端口
    5,招行收到这个源端口,发现自己这个会话还在等client的fin ack,于是对syn不响应
    6,过了很长时间(招行自己的超时时间),招行没有等待应用的finack,于是对老的会话RST掉
    

    这个结论不一定正确。

    我查看Hyperf\Guzzle\CoroutineHandler中的代码,发现execute后,并没有调用$client->close()方法。我对网络并不怎么了解,这个$client如果不主动关闭的话,会不会导致nat网关主动回收这个连接所占用的端口给下一个连接使用,进而导致api提供方无法正确响应这个端口的请求。

    bug 
    opened by minxinqing 26
  • rabbitmq使用报错

    rabbitmq使用报错

    image image

    错误信息

    [ERROR] PhpAmqpLib\Exception\AMQPRuntimeException: Error sending data in /www/hy/code/vendor/hyperf/amqp/src/Connection/SwooleIO.php:198
    Stack trace:
    #0 /www/hy/code/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Connection/AbstractConnection.php(388): Hyperf\Amqp\Connection\SwooleIO->write()
    hyperf/hyperf-skeleton#1 /www/hy/code/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Connection/AbstractConnection.php(516): PhpAmqpLib\Connection\AbstractConnection->write()
    hyperf/hyperf-skeleton#2 /www/hy/code/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Channel/AbstractChannel.php(247): PhpAmqpLib\Connection\AbstractConnection->send_channel_method_frame()
    hyperf/hyperf-skeleton#3 /www/hy/code/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Connection/AbstractConnection.php(724): PhpAmqpLib\Channel\AbstractChannel->send_method_frame()
    hyperf/hyperf-skeleton#4 /www/hy/code/vendor/hyperf/amqp/src/Connection.php(144): PhpAmqpLib\Connection\AbstractConnection->close()
    hyperf/hyperf-skeleton#5 /www/hy/code/vendor/hyperf/pool/src/Pool.php(87): Hyperf\Amqp\Connection->close()
    hyperf/hyperf-skeleton#6 /www/hy/code/vendor/hyperf/pool/src/Pool.php(68): Hyperf\Pool\Pool->flush()
    hyperf/hyperf-skeleton#7 /www/hy/code/vendor/hyperf/amqp/src/Producer.php(36): Hyperf\Pool\Pool->get()
    hyperf/hyperf-skeleton#8 /www/hy/code/vendor/hyperf/amqp/src/Producer.php(23): Hyperf\Amqp\Producer->produceMessage()
    hyperf/hyperf-skeleton#9 /www/hy/code/vendor/hyperf/utils/src/Functions.php(79): Hyperf\Amqp\Producer->Hyperf\Amqp\{closure}()
    hyperf/hyperf-skeleton#10 /www/hy/code/vendor/hyperf/amqp/src/Producer.php(24): retry()
    hyperf/hyperf-skeleton#11 /www/hy/code/app/Crontab/AdminSync.php(50): Hyperf\Amqp\Producer->produce()
    hyperf/hyperf-skeleton#12 /www/hy/code/vendor/hyperf/utils/src/Functions.php(270): App\Crontab\AdminSync->App\Crontab\{closure}()
    hyperf/hyperf-skeleton#13 /www/hy/code/vendor/hyperf/utils/src/Coroutine.php(71): call()
    hyperf/hyperf-skeleton#14 {main}
    

    代码

    定时器注解 @Crontab(name="AdminSync", rule="*/5 * * * * *", callback="execute", memo="拉取sdk管理员数据,同步数据")

    定时器执行的内容

    public function execute()
    {
        $data         = [
            'method' => time(),
            'time'   => date('Y-m-d H:i:s')
        ];
        $amqpProducer = $this->container->get(Producer::class);
        for ($i = 1; $i <= 10; $i++) {
            $data['key'] = $i;
            go(function () use ($data, $amqpProducer) {
                $message = new AdminProducer($data);
    
                $amqpProducer->produce($message);
            });
        }
    }
    
    opened by shuqingzai 24
  • [BUG] 路由与http请求方法重名,导致worker退出

    [BUG] 路由与http请求方法重名,导致worker退出

    对接物联网设备,设备接口提供的操作方法为向服务器发起POST请求,而请求地址固定为【模块名/get】,这样设备发起请求就导致worker退出

    代码如下:

    #[PostMapping("get")]
    public function get(GetRequest $request): string
    {
        return "123";
    }
    

    用postman发起请求,返回 WARNING Server::check_worker_exit_status(): worker(pid=941, id=1) abnormal exit, status=0, signal=11 A bug occurred in Swoole-v4.8.8, please report it. The Swoole developers probably don't know about it, and unless you report it, chances are it won't be fixed. You can read How to report a bug doc before submitting any bug reports:

    https://github.com/swoole/swoole-src/blob/master/.github/ISSUE.md Please do not send bug reports in the mailing list or personal letters. The issue page is also suitable to submit feature requests.

    OS: Linux 5.10.124-linuxkit #1 SMP Thu Jun 30 08:19:10 UTC 2022 x86_64 GCC_VERSION: 10.3.1 20211027 OPENSSL_VERSION: OpenSSL 1.1.1n 15 Mar 2022 PHP_VERSION : 8.0.16

    改为 #[PostMapping("getRec")] public function get(GetRequest $request): string { return "123"; }

    正常返回,问题在于,物联网设备是硬件,无法更修改访问方式及接口地址……

    bug 
    opened by chinayesgo0067 0
  • [QUESTION] hyperf3.0正式版+php8.1限流组件报Implicit conversion from float to int loses precision

    [QUESTION] hyperf3.0正式版+php8.1限流组件报Implicit conversion from float to int loses precision

    [ERROR] Implicit conversion from float 337.5 to int loses precision[97] in /www/im/vendor/malkusch/lock/classes/util/Loop.php [ERROR] #0 [internal function]: Hyperf\ExceptionHandler\Listener\ErrorExceptionHandler::Hyperf\ExceptionHandler\Listener{closure}() #1 /www/im/vendor/malkusch/lock/classes/util/Loop.php(97): random_int() #8 /www/im/vendor/hyperf/di/src/Aop/ProxyTrait.php(87): Hyperf\Utils\Pipeline->then() #9 /www/im/vendor/hyperf/di/src/Aop/ProxyTrait.php(30): App\Controller\IndexController::handleAround() #10 /www/im/runtime/container/proxy/App_Controller_IndexController.proxy.php(36): App\Controller\IndexController::__proxyCall() #11 /www/im/vendor/hyperf/http-server/src/CoreMiddleware.php(142): App\Controller\IndexController->test() #12 /www/im/vendor/hyperf/http-server/src/CoreMiddleware.php(92): Hyperf\HttpServer\CoreMiddleware->handleFound() #13 /www/im/vendor/hyperf/dispatcher/src/AbstractRequestHandler.php(44): Hyperf\HttpServer\CoreMiddleware->process() #14 /www/im/vendor/hyperf/dispatcher/src/HttpRequestHandler.php(26): Hyperf\Dispatcher\AbstractRequestHandler->handleRequest() #15 /www/im/vendor/hyperf/dispatcher/src/HttpDispatcher.php(34): Hyperf\Dispatcher\HttpRequestHandler->handle() #16 /www/im/vendor/hyperf/http-server/src/Server.php(83): Hyperf\Dispatcher\HttpDispatcher->dispatch() #17 [internal function]: Hyperf\HttpServer\Server->onRequest() #18 {main}

    question 
    opened by jiyang666 5
  • [FEATURE] Collection::lazy() is not implemented and ported yet.

    [FEATURE] Collection::lazy() is not implemented and ported yet.

    First, huge thanks for this awesome project.

    Collection::lazy() can be a lifesaver for performance when processing extreme large arrays which may consume too much ram. :)

    enhancement 
    opened by swatchion 0
  • [QUESTION] 开启服务监控(metric),出现大量慢速,关闭监控恢复正常

    [QUESTION] 开启服务监控(metric),出现大量慢速,关闭监控恢复正常

    Execute the command and paste the result below.

    Command: uname -a && php -v && composer info | grep hyperf && php --ri swoole

    Darwin devin-2.local 21.1.0 Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:23 PDT 2021; root:xnu-8019.41.5~1/RELEASE_X86_64 x86_64
    PHP 8.1.1 (cli) (built: Dec 21 2021 17:08:32) (NTS)
    Copyright (c) The PHP Group
    Zend Engine v4.1.1, Copyright (c) Zend Technologies
    Composer is operating slower than normal because you have Xdebug enabled. See https://getcomposer.org/xdebug
    friendsofhyperf/cache               v3.0.0-rc.16       The cache componen...
    friendsofhyperf/closure-command     v3.0.0-rc.9        The command compon...
    friendsofhyperf/compoships          v1.0.0-beta.2      Hyperf relationshi...
    friendsofhyperf/confd               v3.0.0-rc.9        The confd componen...
    friendsofhyperf/exception-event     v3.0.0-rc.9        The exception comp...
    friendsofhyperf/helpers             v3.0.0-rc.17       The commonly used ...
    friendsofhyperf/http-client         v3.0.0-rc.16       The http client co...
    friendsofhyperf/lock                v3.0.0-rc.16       The lock component...
    friendsofhyperf/macros              v3.0.0-rc.17       The commonly used ...
    friendsofhyperf/model-morph-addon   v1.0.0-beta.3      The Model morph ad...
    friendsofhyperf/mysql-grammar-addon v1.0.1             The MySqlGrammar a...
    friendsofhyperf/tinker              v3.0.0-rc.16       The Powerful REPL ...
    hyperf/async-queue                  v3.0.0-rc.3        A async queue comp...
    hyperf/cache                        v3.0.0-rc.5        A cache component ...
    hyperf/circuit-breaker              v3.0.0-rc.3        A circuit breaker ...
    hyperf/command                      v3.0.0-rc.7        Command for hyperf
    hyperf/config                       v3.0.0-rc.8        An independent com...
    hyperf/config-center                v3.0.0-beta.1      The abstraction co...
    hyperf/config-etcd                  v3.0.0-rc.1        An etcd adapter fo...
    hyperf/constants                    v3.0.0-rc.1        A constants compon...
    hyperf/context                      v3.0.0-rc.1        A coroutine contex...
    hyperf/contract                     v3.0.0-rc.10       The contracts of H...
    hyperf/coordinator                  v3.0.0-beta.1      Hyperf Coordinator
    hyperf/crontab                      v3.0.0-rc.8        A crontab componen...
    hyperf/database                     v3.0.0-rc.10       A flexible databas...
    hyperf/db-connection                v3.0.0-rc.4        A hyperf db connec...
    hyperf/devtool                      v3.0.0-rc.8        A Devtool for Hyperf.
    hyperf/di                           v3.0.0-rc.8        A DI for Hyperf.
    hyperf/dispatcher                   v3.0.0-rc.3        A HTTP Server for ...
    hyperf/engine                       v1.3.4            
    hyperf/etcd                         v3.0.0-rc.8        Etcd Client for Hy...
    hyperf/event                        v3.0.0-rc.5        an event manager t...
    hyperf/exception-handler            v3.0.0-rc.9        Exception handler ...
    hyperf/framework                    v3.0.0-rc.8        A coroutine framew...
    hyperf/grpc                         v3.0.0-rc.5        A GRPC basic libra...
    hyperf/grpc-client                  v3.0.0-rc.8        A GRPC Client for ...
    hyperf/grpc-server                  v3.0.0-rc.5        A GRPC Server for ...
    hyperf/guzzle                       v3.0.0-rc.3        Swoole coroutine h...
    hyperf/http-message                 v3.0.0-rc.8        microservice frame...
    hyperf/http-server                  v3.0.0-rc.10       A HTTP Server for ...
    hyperf/load-balancer                v3.0.0-rc.4        A load balancer li...
    hyperf/logger                       v3.0.0-rc.3        A logger component...
    hyperf/macroable                    v3.0.0-rc.1        Hyperf Macroable p...
    hyperf/metric                       v3.0.0-rc.8        hyperf metric comp...
    hyperf/model-cache                  v3.0.0-rc.1        A model cache comp...
    hyperf/model-listener               v3.0.0-rc.1        A model listener f...
    hyperf/paginator                    v3.0.0-rc.10       A paginator compon...
    hyperf/pool                         v3.0.0-rc.3        An independent uni...
    hyperf/process                      v3.0.0-rc.3        A process componen...
    hyperf/rate-limit                   v3.0.0-rc.3        A rate limiter imp...
    hyperf/redis                        v3.0.0-rc.4        A redis component ...
    hyperf/rpc                          v3.0.0-beta.1      A rpc basic librar...
    hyperf/rpc-client                   v3.0.0-rc.8        An abstract rpc se...
    hyperf/rpc-multiplex                v3.0.0-rc.4        Rpc for multiplexi...
    hyperf/rpc-server                   v3.0.0-rc.4        An abstract rpc se...
    hyperf/server                       v3.0.0-rc.1        A base server libr...
    hyperf/testing                      v3.0.0-rc.1        Testing for hyperf
    hyperf/tracer                       v3.0.0-rc.8        A open tracing sys...
    hyperf/translation                  v3.0.0-rc.3        An independent tra...
    hyperf/utils                        v3.0.0-rc.10       A tools package th...
    hyperf/validation                   v3.0.0-rc.10       hyperf validation
    hyperf/watcher                      v3.0.0-rc.3        Hot reload watcher...
    
    swoole
    
    Swoole => enabled
    Author => Swoole Team <[email protected]>
    Version => 4.8.11
    Built => Dec 15 2022 16:43:47
    coroutine => enabled with boost asm context
    kqueue => enabled
    rwlock => enabled
    sockets => enabled
    openssl => OpenSSL 1.1.1n  15 Mar 2022
    dtls => enabled
    http2 => enabled
    json => enabled
    curl-native => enabled
    pcre => enabled
    c-ares => 1.18.1
    zlib => 1.2.11
    brotli => E16777225/D16777225
    mysqlnd => enabled
    async_redis => enabled
    
    Directive => Local Value => Master Value
    swoole.enable_coroutine => On => On
    swoole.enable_library => On => On
    swoole.enable_preemptive_scheduler => Off => Off
    swoole.display_errors => On => On
    swoole.use_shortname => Off => Off
    swoole.unixsock_buffer_size => 262144 => 262144
    

    Description:

    #####开启服务监控(metric),涉及到io产生协程切换的,就会出现大量慢速,关闭监控后恢复正常 image image image image

    Steps To Reproduce:

    bug 
    opened by devin110 0
  • hyperf除了支持mysql数据库,3.0支持oracle以及别的数据库了吗

    hyperf除了支持mysql数据库,3.0支持oracle以及别的数据库了吗

    Before you submit this issue, you has been search all existed issues and search the documentation

    • [] I've been search all existed issues
    • [] I've been read all documentation

    Describe your question

    question 
    opened by sunyulele 0
Releases(v3.0.0)
  • v3.0.0(Jan 3, 2023)

    • #4238 Upgraded the minimum php version to ^8.0 for all components;
    • #5087 Support PHP 8.2;

    BC breaks

    • The framework removes @Annotation support, and uses PHP8 native annotation Attribute. Before updating, be sure to check whether the project has been replaced by Attribute.

    The following script can be executed to convert Doctrine Annotations to PHP8 Attributes.

    Note: This script can only be executed under version 2.2

    composer require hyperf/code-generator
    php bin/hyperf.php code:generate -D app
    
    • Database Model upgrade script

    Because the model base class has added type support for member variables, you need to use the following script to upgrade it to a new version.

    composer require hyperf/code-generator
    php vendor/bin/regenerate-models.php $PWD/app/Model
    
    • The framework adds more type restrictions to the class library, so when updating from 2.2 to 3.0, you need to run a static check to make sure it is works.
    composer analysis
    
    • The framework modifies the Http status returned by gRPC Server according to the gRPC specification. It is fixed at 200, and gRPC Server returns the corresponding status code. Service upgrade to version 3.x

    Dependencies Upgrade

    • Upgraded php-amqplib/php-amqplib to ^3.1;
    • Upgraded phpstan/phpstan to ^1.0;
    • Upgraded mix/redis-subscribe to mix/redis-subscriber:^3.0
    • Upgraded psr/simple-cache to ^1.0|^2.0|^3.0
    • Upgraded monolog/monolog to ^2.7|^3.1
    • Upgraded league/flysystem to ^1.0|^2.0|^3.0

    Added

    • #4196 Added Hyperf\Amqp\IO\IOFactory which used to create amqp io by yourself.
    • #4304 Support $suffix for trait Hyperf\Utils\Traits\StaticInstance.
    • #4400 Added $description which used to set command description easily for Hyperf\Command\Command.
    • #4277 Added Hyperf\Utils\IPReader to get local IP.
    • #4497 Added Hyperf\Coordinator\Timer which can be stopped safely.
    • #4523 Support callback conditions for Conditionable::when() and Conditionable::unless().
    • #4663 Make Hyperf\Utils\Stringable implements Stringable.
    • #4700 Support coroutine style server for socketio-server.
    • #4852 Added NullDisableEventDispatcher to disable event dispatcher by default.
    • #4866 #4869 Added Annotation Scene which use scene in FormRequest easily.
    • #4908 Added Db::beforeExecuting() to register a hook which to be run just before a database query is executed.
    • #4909 Added ConsumerMessageInterface::getNums() to change the number of amqp consumer by dynamically.
    • #4918 Added LoadBalancerInterface::afterRefreshed() to register a hook which to be run after refresh nodes.
    • #4992 Added config amqp.enable which used to control amqp consumer whether to start automatically and producer whether to declare automatically.
    • #4994 #5016 Added component hyperf/database-pgsql which you can be used to connect pgsql server.
    • #5007 Support for SSL encrypted connection to Redis.
    • #5046 Added Hyperf\Database\Model\Concerns\HasAttributes::getRawOriginal().
    • #5052 Support parsing IPv6 host.
    • #5061 Added config symfony.event.enable to control whether to use SymfonyEventDispatcher.
    • #5163 Added Pipeline::thenReturn() method to run pipes and return the result
    • #5160 Added $dictionary for Str::slug, your can rewrite some tags easily.
    • #5186 Added option config for command server:watch.
    • #5206 Support the transformation of object type to AST nodes.
    • #5211 Added Annotation CacheAhead which used to cache data ahead.
    • #5227 Added Hyperf\WebSocketServer\Sender::getResponses().
    • #5250 Added defer_release config in hyperf/db
    • #5261 Added requirement ext-posix for watcher.

    Optimized

    • #4147 Optimized code for nacos which you can use http://xxx.com/yyy/ instead of http://xxx.com:8848/ to connect nacos.
    • #4367 Optimized DataFormatterInterface which uses object instead of array as inputs.
    • #4547 Optimized code of Str::contains Str::startsWith and Str::endsWith based on PHP8.
    • #4596 Optimized Hyperf\Context\Context which support coroutineId for set() override() and getOrSet().
    • #4658 The method name is used as the routing path, when the path is null in route annotations.
    • #4668 Optimized class Hyperf\Utils\Str whose methods padBoth padLeft and padRight support multibyte.
    • #4678 Close all another servers when one of them closed.
    • #4688 Added SafeCaller to avoid server shutdown which caused by exceptions.
    • #4715 Adjust the order of injections for controllers to avoid inject null preferentially.
    • #4865 No need to check Redis::isConnected(), because it could be connected defer or reconnected after disconnected.
    • #4874 Use wait instead of parallel for coroutine style tcp server.
    • #4875 Use the original style when regenerating models.
    • #4880 Support ignoreAnnotations for Annotation Reader.
    • #4888 Removed useless Hyperf\Di\ClassLoader::$proxies, because merge it into Composer\Autoload\ClassLoader::$classMap.
    • #4905 Removed the redundant parameters of method Hyperf\Database\Model\Concerns\HasEvents::fireModelEvent().
    • #4949 Removed useless call() from Coroutine::create().
    • #4961 Removed proxy mode from Hyperf\Di\ClassLoader and Optimized Composer::getLoader().
    • #4981 Confirm before proceeding with the action when using ConfirmableTrait, such as migrate command.
    • #5017 Check validity of file descriptor before sending message to it when using socketio-server.
    • #5029 Removed useless method call() from callable function.
    • #5078 Optimized code about creating exception from another exception.
    • #5079 Catch exception for function defer by default.

    Changed

    • #4199 Changed the public property $message to protected for Hyperf\AsyncQueue\Event\Event.
    • #4214 Renamed $circularDependences to $checkCircularDependencies for Dag.
    • #4225 Split hyperf/coordinator from hyperf/utils.
    • #4269 Changed the default priority of listener to 0 from 1.
    • #4345 Renamed Hyperf\Kafka\Exception\ConnectionCLosedException to Hyperf\Kafka\Exception\ConnectionClosedException.
    • #4434 The method Hyperf\Database\Model\Builder::insertOrIgnore will be return affected count.
    • #4495 Changed the default value to null for Hyperf\DbConnection\Db::__connection().
    • #4460 Use ?? instead of ?: for $callback when using Stringable::when().
    • #4502 Use Hyperf\Engine\Channel instead of Hyperf\Coroutine\Channel in hyperf/reactive-x.
    • #4611 Changed return type to void for Hyperf\Event\Contract\ListenerInterface::process().
    • #4669 Changed all annotations which only support PHP >= 8.0.
    • #4678 Support event dispatcher for command by default.
    • #4680 Stop processes which controlled by ProcessManager when server shutdown.
    • #4848 Changed $value.timeout to $options.timeout for CircuitBreaker.
    • #4930 Renamed method AnnotationManager::getFormatedKey() to AnnotationManager::getFormattedKey().
    • #4934 Throw NoNodesAvailableException when cannot select any node from load balancer.
    • #4952 Don't write pid when the settings.pid_file is null when using swow server.
    • #4979 Don't support database commands by default, please require hyperf/devtool or set them in autoload/commands.
    • #5008 Removed array type of Trace Annotation, because don't support array.
    • #5036 Changed grpc server StatsCode and serializeMessage.
    • #5601 Don't use Hyperf\Framework\SymfonyEventDispatcher by default, if you listen symfony events, you must open symfony.event.enable.
    • #5079 Use (string) $throwable instead of sprintf for Hyperf\ExceptionHandler\Formatter\FormatterInterface::format().
    • #5091 Move Jsonable and Xmlable to contract from utils.
    • #5092 Move MessageBag and MessageProvider to contract from utils.
    • #5204 Transform the type of param $server in Hyperf\WebSocketServer\Server::deferOnOpen() to mixed.
    • #5239 Throw exception when using chunkById but the column is not existed.

    Swow Supported

    • #4756 Support hyperf/amqp.
    • #4757 Support Hyperf\Utils\Coroutine\Locker.
    • #4804 Support Hyperf\Utils\WaitGroup.
    • #4808 Replaced Swoole\Coroutine\Channel by Hyperf\Engine\Channel for all components.
    • #4873 Support hyperf/websocket-server.
    • #4917 Support hyperf/load-balancer.
    • #4924 Support TcpServer for hyperf/server.
    • #4984 Support hyperf/retry.
    • #4988 Support hyperf/pool.
    • #4989 Support hyperf/crontab.
    • #4990 Support hyperf/nsq.
    • #5070 Support hyperf/signal.

    Removed

    • #4199 Removed deprecated handler Hyperf\AsyncQueue\Signal\DriverStopHandler.
    • #4482 Removed deprecated Hyperf\Utils\Resource.
    • #4487 Removed log warning from cache component when the key is greater than 64 characters.
    • #4596 Removed Hyperf\Utils\Context, please use Hyperf\Context\Context instead.
    • #4623 Removed AliyunOssHook for hyperf/filesystem.
    • #4667 Removed doctrine/annotations, please use PHP8 Attributes.
    • #5226 Removed WARNING log message when amqp connection restart.

    Deprecated

    • Hyperf\Utils\Contracts\Arrayable will be deprecated, please use Hyperf\Contract\Arrayable instead.
    • Hyperf\AsyncQueue\Message will be deprecated, please use Hyperf\AsyncQueue\JobMessage instead.
    • Hyperf\Di\Container::getDefinitionSource() will be deprecated.

    Fixed

    • #4549 Fixed bug that PhpParser::getExprFromValue() does not support assoc array.
    • #4835 Fixed the lost description when using property $description and $signature for hyperf/command.
    • #4851 Fixed bug that prometheus server will not be closed automatically when using command which enable event dispatcher.
    • #4854 Fixed bug that the socket-io client always reconnect when using coroutine style server.
    • #4885 Fixed bug that ProxyTrait::__getParamsMap can not work when using trait alias.
    • #4892 #4895 Fixed bug that RedisAdapter::mixSubscribe cannot work cased by redis prefix when using socketio-server.
    • #4910 Fixed bug that method ComponentTagCompiler::escapeSingleQuotesOutsideOfPhpBlocks() cannot work.
    • #4912 Fixed bug that websocket connection will be closed after 10s when using Swow.
    • #4919 #4921 Fixed bug that rpc connections can't refresh themselves after nodes changed when using rpc-multiplex.
    • #4920 Fixed bug that the routing path is wrong (like //foo) when the routing prefix is end of '/'.
    • #4940 Fixed memory leak caused by an exception which occurred in Parallel.
    • #5100 Fixed bug that the tag continue cannot work when using view-engine.
    • #5121 Fixed bug that the SQL is not valid but the correct error message cannot be obtained when using pgsql.
    • #5132 Fixed bug that the exit code of command does not work when the exception code isn't int.
    • #5142 Fixed bug that the method Request::parseHost does not work when host is invalid.
    • #5199 Fixed bug that RedisSentinel can't support empty password.
    • #5221 Fixed bug that PGSqlSwooleConnection::affectingStatement() can't work when the sql is wrong.
    • #5223 Fixed bug that KeepaliveConnection::isTimeout() can't work when using swow.
    • #5229 Fixed bug that proxy class will be generated failed when using parameters who allow null in constructor.
    • #5252 Fixed bug that generate rpc-client failed when the interface has parent interfaces.
    • #5268 Fixed bug that abstract methods will be written by di.

    New Contributors

    • @mmfei made their first contribution in https://github.com/hyperf/hyperf/pull/4434
    • @zhuangyuanhui made their first contribution in https://github.com/hyperf/hyperf/pull/4527
    • @flc1125 made their first contribution in https://github.com/hyperf/hyperf/pull/4580
    • @Stitch-June made their first contribution in https://github.com/hyperf/hyperf/pull/4620
    • @yanghaixi made their first contribution in https://github.com/hyperf/hyperf/pull/4655
    • @her-cat made their first contribution in https://github.com/hyperf/hyperf/pull/4657
    • @gilbertomarcomini made their first contribution in https://github.com/hyperf/hyperf/pull/4683
    • @xskjs888 made their first contribution in https://github.com/hyperf/hyperf/pull/4689
    • @wilbur-yu made their first contribution in https://github.com/hyperf/hyperf/pull/4763
    • @simon-tu-ke made their first contribution in https://github.com/hyperf/hyperf/pull/4790
    • @barbluz made their first contribution in https://github.com/hyperf/hyperf/pull/4729
    • @greezen made their first contribution in https://github.com/hyperf/hyperf/pull/4849
    • @DGdisigner made their first contribution in https://github.com/hyperf/hyperf/pull/4892
    • @wisp-x made their first contribution in https://github.com/hyperf/hyperf/pull/4910
    • @kingIZZZY made their first contribution in https://github.com/hyperf/hyperf/pull/5016
    • @Ahmard made their first contribution in https://github.com/hyperf/hyperf/pull/5017
    • @JeaNile made their first contribution in https://github.com/hyperf/hyperf/pull/5038
    • @gaotiefeng made their first contribution in https://github.com/hyperf/hyperf/pull/5046
    • @rust17 made their first contribution in https://github.com/hyperf/hyperf/pull/5102
    • @wenccc made their first contribution in https://github.com/hyperf/hyperf/pull/5132
    • @lucasdotvin made their first contribution in https://github.com/hyperf/hyperf/pull/5163
    • @aldok10 made their first contribution in https://github.com/hyperf/hyperf/pull/5171
    • @ReinanHS made their first contribution in https://github.com/hyperf/hyperf/pull/5131
    • @xuanyanwow made their first contribution in https://github.com/hyperf/hyperf/pull/5202
    • @lihq1403 made their first contribution in https://github.com/hyperf/hyperf/pull/5204
    • @devin110 made their first contribution in https://github.com/hyperf/hyperf/pull/5254
    • @joandysson made their first contribution in https://github.com/hyperf/hyperf/pull/5270

    Full Changelog: https://github.com/hyperf/hyperf/compare/v2.2.25...v3.0.0

    Source code(tar.gz)
    Source code(zip)
  • v2.2.35(Aug 27, 2022)

    Fixed

    • #5062 Fixed bug that cannot stop server by Ctrl C.

    Optimized

    • #5002 Optimized the generation rules of rpc proxy class suffix, which can be customized more easily.
    • #5005 Don't generate rpc proxy again when open scan cacheable.

    Full Changelog: https://github.com/hyperf/hyperf/compare/v2.2.34...v2.2.35

    Source code(tar.gz)
    Source code(zip)
  • v2.2.34(Jul 21, 2022)

    Fixed

    • #4948 Fixed memory leak caused by an exception which occurred in Parallel.
    • #4796 Fixed id repeat when generate snowflake id caused by calling init more than once.

    Full Changelog: https://github.com/hyperf/hyperf/compare/v2.2.33...v2.2.34

    Source code(tar.gz)
    Source code(zip)
  • v2.2.33(May 30, 2022)

    Fixed

    • #4776 Fixed bug that graphql event collect failed.
    • #4790 Fixed bug that rpn method toRPNExpression does not work in some cases.

    Added

    • #4763 Added validation rule array:key1,key2 which make sure the array has no keys other than key1 and key2.
    • #4781 Added close-pull-request.yml to close pr for read-only repositories.

    New Contributors

    • @wilbur-yu made their first contribution in https://github.com/hyperf/hyperf/pull/4763
    • @simon-tu-ke made their first contribution in https://github.com/hyperf/hyperf/pull/4790

    Full Changelog: https://github.com/hyperf/hyperf/compare/v2.2.32...v2.2.33

    Source code(tar.gz)
    Source code(zip)
  • v2.2.32(May 16, 2022)

    Fixed

    • #4745 Fixed null pointer exception when using Producer::close.
    • #4754 Fixed the bug that monolog does not work in 2.6.0 by configuring conflict with monolog>=2.6.0.

    Optimized

    • #4738 Configuring a default groupId when it is null when using hyperf/kafka.

    Full Changelog: https://github.com/hyperf/hyperf/compare/v2.2.31...v2.2.32

    Source code(tar.gz)
    Source code(zip)
  • v2.2.31(Apr 18, 2022)

    Fixed

    • #4677 Fixed bug that process exit failed when using kafka producer.
    • #4686 Fixed bug that server shutdown when parse request failed for websocket server.

    Added

    • #4576 Support path_prefix for node when using rpc-client.
    • #4683 Added Container::unbind() to unbind an arbitrary resolved entry.

    New Contributors

    • @gilbertomarcomini made their first contribution in https://github.com/hyperf/hyperf/pull/4683

    Full Changelog: https://github.com/hyperf/hyperf/compare/v2.2.30...v2.2.31

    Source code(tar.gz)
    Source code(zip)
  • v2.2.30(Apr 3, 2022)

    Fixed

    • #4648 Fixed bug that circuit breaker couldn't call fallback on open state when using hyperf/retry.
    • #4657 Fixed bug that last modified time was not updated after write session again when using hyperf/session.

    Added

    • #4646 Support setting auth for RedisSentinel.

    New Contributors

    • @her-cat made their first contribution in https://github.com/hyperf/hyperf/pull/4657

    Full Changelog: https://github.com/hyperf/hyperf/compare/v2.2.29...v2.2.30

    Source code(tar.gz)
    Source code(zip)
  • v2.2.29(Mar 28, 2022)

    Fixed

    • #4620 Fixed bug that the file name should be an empty string by default for Hyperf\Memory\LockManager.

    New Contributors

    • @Stitch-June made their first contribution in https://github.com/hyperf/hyperf/pull/4620

    Full Changelog: https://github.com/hyperf/hyperf/compare/v2.2.28...v2.2.29

    Source code(tar.gz)
    Source code(zip)
  • v2.2.28(Mar 14, 2022)

    v2.2.28 - 2022-03-14

    Fixed

    • #4588 Fixed bug that database does not support bit.
    • #4589 Fixed bug that ephemeral instance register failed when using nacos.

    Added

    • #4580 Added method Hyperf\Utils\Coroutine\Concurrent::getChannel().

    Optimized

    • #4603 Make public for method Hyperf\ModelCache\Manager::formatModels().

    New Contributors

    • @flc1125 made their first contribution in https://github.com/hyperf/hyperf/pull/4580

    Full Changelog: https://github.com/hyperf/hyperf/compare/v2.2.27...v2.2.28

    Source code(tar.gz)
    Source code(zip)
  • v2.2.27(Mar 7, 2022)

    Optimized

    • #4572 Use Hyperf\LoadBalancer\Exception\RuntimeException instead of \RuntimeException for hyperf/load-balancer.

    Full Changelog: https://github.com/hyperf/hyperf/compare/v2.2.26...v2.2.27

    Source code(tar.gz)
    Source code(zip)
  • v2.2.26(Feb 21, 2022)

    Fixed

    • #4536 Fixed bug that response header content-type will be set more than once sometimes when using json-rpc.

    Added

    • #4527 Added some useful methods for Hyperf\Database\Schema\Blueprint.

    Optimized

    • #4514 Improved some performance by using lowercase headers.
    • #4521 Try to connect to another one when connected redis sentinel failed.
    • #4529 Split hyperf/context from hyperf/utils.

    New Contributors

    • @zhuangyuanhui made their first contribution in https://github.com/hyperf/hyperf/pull/4527

    Full Changelog: https://github.com/hyperf/hyperf/compare/v2.2.25...v2.2.26

    Source code(tar.gz)
    Source code(zip)
  • v2.2.25(Jan 30, 2022)

    Fixed

    • #4484 Fixed bug that NacosDriver::isRegistered does not work when using nacos 2.0.4.

    Added

    • #4477 Support Macroable for Hyperf\HttpServer\Request.
    • #4494 Added comments about withTrashed, onlyTrashed and withoutTrashed.

    Optimized

    • #4254 Added check of grpc.enable_fork_support option and pcntl extension.

    New Contributors

    • @CATT-L made their first contribution in https://github.com/hyperf/hyperf/pull/4494

    Full Changelog: https://github.com/hyperf/hyperf/compare/v2.2.24...v2.2.25

    Source code(tar.gz)
    Source code(zip)
  • v2.2.24(Jan 24, 2022)

    Fixed

    • #4474 Fixed bug that multiplex connection don't close after running test cases.

    Optimized

    • #4451 Optimized code for Hyperf\Watcher\Driver\FindNewerDriver.

    Full Changelog: https://github.com/hyperf/hyperf/compare/v2.2.23...v2.2.24

    Source code(tar.gz)
    Source code(zip)
  • v2.2.23(Jan 17, 2022)

    Fixed

    • #4426 Fixed bug that view cache generated failed caused by concurrent request.

    Added

    • #4449 Allow sorting on multiple criteria for Hyperf\Utils\Collection.
    • #4455 Added command gen:view-engine-cache which used to generate cache files in advance.
    • #4453 Added Hyperf\Tracer\Aspect\ElasticserachAspect which used to record traces for elasticsearch.
    • #4458 Added Hyperf\Di\ScanHandler\ProcScanHandler which used to run application when using swow and windows.

    New Contributors

    • @shenzhe made their first contribution in https://github.com/hyperf/hyperf/pull/4427
    • @laradocs made their first contribution in https://github.com/hyperf/hyperf/pull/4448
    • @wujingke made their first contribution in https://github.com/hyperf/hyperf/pull/4426

    Full Changelog: https://github.com/hyperf/hyperf/compare/v2.2.22...v2.2.23

    Source code(tar.gz)
    Source code(zip)
  • v2.2.22(Jan 4, 2022)

    Fixed

    • #4399 Fixed bug that Redis::scan does not work when using redis cluster.

    Added

    • #4409 Added database handler for session.
    • #4411 Added Hyperf\Tracer\Aspect\DbAspect to log db records when using hyperf/db.
    • #4420 Support SSL for Hyperf\Amqp\IO\SwooleIO.

    Optimized

    • #4406 Adapt swoole 5.0 by removing swoole classes with PSR-0.
    • #4429 Added type hint for Debug::getRefCount() which only support object.

    New Contributors

    • @Nick233333 made their first contribution in https://github.com/hyperf/hyperf/pull/4380
    • @nirolee made their first contribution in https://github.com/hyperf/hyperf/pull/4404
    • @Rock-liyi made their first contribution in https://github.com/hyperf/hyperf/pull/4411
    • @fengxin2017 made their first contribution in https://github.com/hyperf/hyperf/pull/4420
    • @ethanzway made their first contribution in https://github.com/hyperf/hyperf/pull/4409

    Full Changelog: https://github.com/hyperf/hyperf/compare/v2.2.21...v2.2.22

    Source code(tar.gz)
    Source code(zip)
  • v2.2.21(Dec 20, 2021)

    Fixed

    • #4347 Fixed bug that amqp io has been bound to more than one coroutine when out of buffer.
    • #4373 Fixed the metadata generation error caused by switching coroutine for snowflake.

    Added

    • #4344 Added Hyperf\Crontab\Event\FailToExecute event which will be dispatched when executing crontab failed.
    • #4348 Support to open the generated file with your IDE automatically.

    Optimized

    • #4350 Optimized the error message for swoole.use_shortname.
    • #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.

    Full Changelog: https://github.com/hyperf/hyperf/compare/v2.2.20...v2.2.21

    Source code(tar.gz)
    Source code(zip)
  • v2.2.20(Dec 13, 2021)

    What's Changed

    • Fixed type hint error for swoole 4.9 by @limingxinleo in https://github.com/hyperf/hyperf/pull/4319
    • Support pack vendor/bin files for Phar by @sy-records in https://github.com/hyperf/hyperf/pull/4330
    • Added method Hyperf\Testing\Debug::getRefCount($object). by @limingxinleo in https://github.com/hyperf/hyperf/pull/4331
    • Fixed bug that the path with query params won't match route when using testing client. by @Slairmy in https://github.com/hyperf/hyperf/pull/4338
    • Fixed fatal error for declaration when using amqplib 3.1.1 by @limingxinleo in https://github.com/hyperf/hyperf/pull/4346

    New Contributors

    • @Slairmy made their first contribution in https://github.com/hyperf/hyperf/pull/4338

    Full Changelog: https://github.com/hyperf/hyperf/compare/v2.2.19...v2.2.20

    Source code(tar.gz)
    Source code(zip)
  • v2.2.19(Dec 6, 2021)

    What's Changed

    • Add HTTP Chunk docs by @sy-records in https://github.com/hyperf/hyperf/pull/4300
    • clean up calls to function dirname() by @deminy in https://github.com/hyperf/hyperf/pull/4307
    • Fixed bug that file collector-reload not found when running server:watch with absolute path by @sy-records in https://github.com/hyperf/hyperf/pull/4308
    • Improves Hyperf\Utils\Collection and Hyperf\Database\Model\Collection type definitions. by @NeverRetrun in https://github.com/hyperf/hyperf/pull/4317
    • Fixed document about ide plugin PHP Annotations by @topyao in https://github.com/hyperf/hyperf/pull/4316
    • Upgrade swoole version to 4.8.3 in github actions by @sy-records in https://github.com/hyperf/hyperf/pull/4314

    New Contributors

    • @NeverRetrun made their first contribution in https://github.com/hyperf/hyperf/pull/4317
    • @topyao made their first contribution in https://github.com/hyperf/hyperf/pull/4316

    Full Changelog: https://github.com/hyperf/hyperf/compare/v2.2.18...v2.2.19

    Source code(tar.gz)
    Source code(zip)
  • v2.2.18(Nov 29, 2021)

    What's Changed

    • Fixed type hint error for Hyperf\Grpc\Parser::deserializeMessage() when $response->data is null. by @leocavalcante in https://github.com/hyperf/hyperf/pull/4283
    • Added method Hyperf\Utils\Network::ip(). by @sy-records in https://github.com/hyperf/hyperf/pull/4284
    • Added HTTP chunk support for hyperf/http-message by @sy-records in https://github.com/hyperf/hyperf/pull/4290
    • Support dynamic $arguments for function value(). by @weskiller in https://github.com/hyperf/hyperf/pull/4291
    • Support run with absolute paths for server:watch by @sy-records in https://github.com/hyperf/hyperf/pull/4293
    • Added alias id() for Hyperf\Database\Schema\Blueprint::bigIncrements(). by @NiZerin in https://github.com/hyperf/hyperf/pull/4295

    New Contributors

    • @NiZerin made their first contribution in https://github.com/hyperf/hyperf/pull/4295

    Full Changelog: https://github.com/hyperf/hyperf/compare/v2.2.17...v2.2.18

    Source code(tar.gz)
    Source code(zip)
  • v2.2.17(Nov 22, 2021)

    What's Changed

    • Added force index for hyperf/database. by @limingxinleo in https://github.com/hyperf/hyperf/pull/4260
    • Fixed the bug that key sort of the result is inconsistent with $callables for parallel by @geteng-zyp in https://github.com/hyperf/hyperf/pull/4243
    • Upgrade swoole version to 4.8.2 in github actions by @sy-records in https://github.com/hyperf/hyperf/pull/4266
    • Added PHP8 support for hyperf/tracer by @jcchavezs in https://github.com/hyperf/hyperf/pull/4109

    New Contributors

    • @geteng-zyp made their first contribution in https://github.com/hyperf/hyperf/pull/4243

    Full Changelog: https://github.com/hyperf/hyperf/compare/v2.2.16...v2.2.17

    Source code(tar.gz)
    Source code(zip)
  • v2.2.16(Nov 15, 2021)

    What's Changed

    • Update querybuilder.md by @MrYup in https://github.com/hyperf/hyperf/pull/4247
    • Added method getServiceName for rpc client. by @limingxinleo in https://github.com/hyperf/hyperf/pull/4252
    • Skip class file does not exist at scan time by @sy-records in https://github.com/hyperf/hyperf/pull/4253

    New Contributors

    • @MrYup made their first contribution in https://github.com/hyperf/hyperf/pull/4247

    Full Changelog: https://github.com/hyperf/hyperf/compare/v2.2.15...v2.2.16

    Source code(tar.gz)
    Source code(zip)
  • v2.2.15(Nov 8, 2021)

    What's Changed

    • Fixed bug that Hyperf\Server\Entry\Logger does not work when using psr/log 3.0. by @limingxinleo in https://github.com/hyperf/hyperf/pull/4192
    • Added Macroable for Hyperf\Utils\Arr. by @huangdijia in https://github.com/hyperf/hyperf/pull/4157
    • Fixed bug that filesystem cache driver does not work when runtime/caches is not a directory. by @fireqong in https://github.com/hyperf/hyperf/pull/4200
    • Add getMessage annotation for Constants by @sy-records in https://github.com/hyperf/hyperf/pull/4201
    • chore(docs/en): kafka link by @leocavalcante in https://github.com/hyperf/hyperf/pull/4209
    • Update supervisor docs by @luoyou in https://github.com/hyperf/hyperf/pull/4215

    New Contributors

    • @luoyou made their first contribution in https://github.com/hyperf/hyperf/pull/4215

    Full Changelog: https://github.com/hyperf/hyperf/compare/v2.2.14...v2.2.15

    Source code(tar.gz)
    Source code(zip)
  • v2.2.14(Nov 1, 2021)

  • v2.2.13(Oct 25, 2021)

  • v2.2.12(Oct 18, 2021)

    Added

    • #4129 Added methods Str::stripTags() and Stringable::stripTags().

    Fixed

    • #4130 Fixed bug that generate model failed when using option --with-ide and scope methods.
    • #4141 Fixed bug that validator factory does not support other validators.
    Source code(tar.gz)
    Source code(zip)
  • v2.2.11(Oct 11, 2021)

    Fixed

    • #4101 Fixed bug that auth failed when password has special charsets for nacos.

    Optimized

    • #4114 Optimized get error code after Websocket upgrade failed.
    • #4119 Optimized testing client which create the directory again when the directory does not exist.
    Source code(tar.gz)
    Source code(zip)
  • v2.2.10(Sep 26, 2021)

  • v2.2.9(Sep 22, 2021)

    Fixed

    • #4061 Fixed the conflict between the latest version of prometheus_client_php and hyperf/metric.
    • #4068 Fixed bug that exit code of Command is incorrect when throwing an exception.
    • #4076 Fixed server broken caused by sending response failed.

    Added

    • #4014 #4080 Support sasl and ssl for kafka.
    • #4045 #4082 Support to control whether to report by tracer through config opentracing.enable.exception.
    • #4086 Support annotation for interface.

    Optimized

    • #4084 Optimized the exception message when the attribute not found.
    Source code(tar.gz)
    Source code(zip)
  • v2.2.8(Sep 14, 2021)

    Fixed

    • #4028 Fixed the success rate calculation in grafana dashboard.
    • #4030 Fixed bug that async-queue broken caused by uncompressing model failed.
    • #4042 Fixed coroutines deadlock caused by cleaning up expired fds in socketio-server when stop server.

    Added

    • #4013 Support sameSite=None when return response with cookies.
    • #4017 Added Macroable into Hyperf\Utils\Collection.
    • #4021 Added argument $attempts into $callback when using function retry().
    • #4040 Added method ConsumerDelayedMessageTrait::getDeadLetterExchange() which used to rewrite x-dead-letter-exchange by yourself.

    Removed

    • #4017 Removed Macroable from Hyperf\Database\Model\Collection because it already exists in Hyperf\Utils\Collection.
    Source code(tar.gz)
    Source code(zip)
  • v2.2.7(Sep 6, 2021)

    Fixed

    • #3997 Fixed unexpected termination of nats consumer after timeout.
    • #3998 Fixed bug that apollo does not support https.

    Optimized

    • #4009 Optimized method MethodDefinitionCollector::getOrParse() to avoid deprecated in PHP8.

    Added

    • #4002 #4012 Support method FormRequest::scene() which used to rewrite different rules according to different scenes.
    • #4011 Added some methods for Hyperf\Utils\Str.
    Source code(tar.gz)
    Source code(zip)
Owner
Hyperf
A coroutine framework that focuses on hyperspeed and flexibility. Building microservice or middleware with ease.
Hyperf
💫 Vega is a CLI mode HTTP web framework written in PHP support Swoole, WorkerMan / Vega 是一个用 PHP 编写的 CLI 模式 HTTP 网络框架,支持 Swoole、WorkerMan

Mix Vega 中文 | English Vega is a CLI mode HTTP web framework written in PHP support Swoole, WorkerMan Vega 是一个用 PHP 编写的 CLI 模式 HTTP 网络框架,支持 Swoole、Work

Mix PHP 46 Apr 28, 2022
☄️ PHP CLI mode development framework, supports Swoole, WorkerMan, FPM, CLI-Serve

☄️ PHP CLI mode development framework, supports Swoole, WorkerMan, FPM, CLI-Server / PHP 命令行模式开发框架,支持 Swoole、WorkerMan、FPM、CLI-Server

Mix PHP 1.8k Dec 29, 2022
🎲 This project provides an integration for the Doctrine ORM and the Hyperf framework

Hyperf ?? Doctrine This project provides an integration for the Doctrine ORM and the Hyperf framework. Install composer require leocavalcante/hyperf-d

Leo Cavalcante 49 Dec 3, 2022
Jin microservices is a complete microservice demo based on PHP language + hyperf microservices framework

介绍 Jin-microservices是基于 php 语言 + hyperf 微服务 框架的完整微服务demo。 github:https://github.com/Double-Jin/jin-microservices gitee:https://gitee.com/ljj96/jin-mic

null 114 Dec 29, 2022
Hyperf instant messaging program based on swoole framework

Hyperf instant messaging program based on swoole framework

null 20 Aug 12, 2022
An issue tracking tool based on hyperf+reactjs for small and medium-sized enterprises, open-source and free, similar to Jira.

介绍 本项目以 actionview 为蓝本,使用 Hyperf 框架进行重写。 本项目为 Hyperf 框架的 DEMO 项目 原 ActionView 介绍 English | 中文 一个类Jira的问题需求跟踪工具,前端基于reactjs+redux、后端基于php laravel-frame

Gemini-D 14 Nov 15, 2022
🔭 Proof of concept on adding observability features (tracing and metrics) to a Nano microservice (using existing Hyperf components).

?? Tracing Nano Proof of concept on adding observability features (tracing and metrics) to a Nano microservice (using existing Hyperf components ?? ).

Leo Cavalcante 4 Oct 24, 2022
🚀 Developing Rocketseat's Next Level Week (NLW#05) Application using PHP/Swoole + Hyperf

Inmana PHP ?? Developing Rocketseat 's Next Level Week (NLW#05) Application using Swoole + Hyperf. This is the app of the Elixir track. I know PHP/Swo

Leo Cavalcante 18 Jun 1, 2022
Flare is a PHP full-stack web framework that is light, fast, flexible, and secure.

Flare framework is a PHP full-stack web framework that is simple ,powerful , fast , flexible, and secure with long-term support.

Flare framework 3 Oct 24, 2022
li₃ is the fast, flexible and most RAD development framework for PHP

li₃ You asked for a better framework. Here it is. li₃ is the fast, flexible and the most RAD development framework for PHP. A framework of firsts li₃

Union of RAD 1.2k Dec 23, 2022
CodeIgniter - a PHP full-stack web framework that is light, fast, flexible and secure

CodeIgniter 4 Development What is CodeIgniter? CodeIgniter is a PHP full-stack web framework that is light, fast, flexible and secure. More informatio

CodeIgniter 4 web framework 4.5k Jan 4, 2023
FuelPHP v1.x is a simple, flexible, community driven PHP 5.3+ framework, based on the best ideas of other frameworks, with a fresh start! FuelPHP is fully PHP 7 compatible.

FuelPHP Version: 1.8.2 Website Release Documentation Release API browser Development branch Documentation Development branch API browser Support Forum

Fuel 1.5k Dec 28, 2022
QPM, the process management framework in PHP, the efficient toolkit for CLI development. QPM provides basic daemon functions and supervision mechanisms to simplify multi-process app dev.

QPM QPM全名是 Quick(or Q's) Process Management Framework for PHP. PHP 是强大的web开发语言,以至于大家常常忘记PHP 可以用来开发健壮的命令行(CLI)程序以至于daemon程序。 而编写daemon程序免不了与各种进程管理打交道。Q

Comos 75 Dec 21, 2021
Basis for creating a CLI with php

Firulin-core v1 From Firulin-core you can create a CLI any way you want, adding new commands easily. Requeriments PHP 7.4^ Composer Get started co

Márrios 5 Jul 19, 2022
CleverStyle Framework is simple, scalable, fast and secure full-stack PHP framework

CleverStyle Framework is simple, scalable, fast and secure full-stack PHP framework. It is free, Open Source and is distributed under Free Public Lice

Nazar Mokrynskyi 150 Apr 12, 2022
Framework X is a simple and fast micro framework based on PHP

Framework X is a simple and fast micro framework based on PHP. I've created a simple CRUD application to understand how it works. I used twig and I created a custom middleware to handle PUT, DELETE methods.

Mahmut Bayri 6 Oct 14, 2022
Spiral Framework is a High-Performance PHP/Go Full-Stack framework and group of over sixty PSR-compatible components

Spiral HTTP Application Skeleton Spiral Framework is a High-Performance PHP/Go Full-Stack framework and group of over sixty PSR-compatible components.

Spiral Scout 152 Dec 18, 2022
Sunhill Framework is a simple, fast, and powerful PHP App Development Framework

Sunhill Framework is a simple, fast, and powerful PHP App Development Framework that enables you to develop more modern applications by using MVC (Model - View - Controller) pattern.

Mehmet Selcuk Batal 3 Dec 29, 2022
Framework X – the simple and fast micro framework for building reactive web applications that run anywhere.

Framework X Framework X – the simple and fast micro framework for building reactive web applications that run anywhere. Quickstart Documentation Tests

Christian Lück 620 Jan 7, 2023