Swoft 2.0.6 official release

What is Swoft?

Swoft is a PHP-based micro-services coroutine framework Swoole extension implementation. Go Swoft can be like, like, built-in web server and common coroutine coroutine client and resident memory, do not rely on traditional PHP-FPM. There coroutine Go mode of operation similar language, similar to Spring Cloud framework flexible annotation and powerful global dependency injection container, perfect service management, flexible and powerful AOP, standard specification PSR achieve more.

Swoft by up to three years of accumulation and exploration direction, the Swoft fight the PHP community Spring Cloud, it is the best choice for high-performance PHP framework and micro-governance services.

Swoft v2.0.6

swoft 2.0 polished and optimized several versions, has been used in numerous production environments, users get a lot of recognition and support. The official version we have done a lot of improvement and optimization, with better performance.

Two new and improved development tools, enabling developers to easily use:

  • swoft/swoole-tracker Link tracking, memory leaks, blocked Check intention and performance analysis can help developers solve
  • swoft-cli Now supports basic application skeleton to create a structure and components, as well as the class file generation

Debugging tool (swoft-swoole-tracker)

Swoft debugging tool can help developers solve link tracking, memory leaks, blocked Check intention and performance analysis.

Installation Components:

composer require swoft/swoole-tracker

Configuration Middleware:

return [
   // ...
   'httpDispatcher'    => [
       // Add global http middleware
       'middlewares' => [
            // ...
            \Swoft\Swoole\Tracker\Middleware\SwooleTrackerMiddleware::class,
       ],
   ],
   // ...
];

Link Trace

Service Monitoring

service status

Memory Leak

Jam detection

Development Tools (swoft-cli)

swoft-cli  added scene class generating functions (control, middleware, tasks, etc.), creation of a skeleton, scaffolding component initialization tool.

installation:

wget https://github.com/swoft-cloud/swoft-cli/releases/download/{VERSION}/swoftcli.phar

Functional class generation

php swoftcli.phar gen:http-ctrl user --prefix /users

Create a new project

Now you can quickly create a new project by swoft-cli. 5 sets of templates provided by default warehouse user to initialize different project skeleton.

php swoftcli.phar create:application --help

Create a new component

You can also create new components by swoft-cli, and help you to quickly complete the initial configuration:

php swoftcli.phar create:component --help

 

update content

Repair (Fixed) :

  • Repair ws server receives the message, using the current default fd as customer response message end  3a8890cf
  • 修复 ws server通过swoole server拿到的全部连接里,fd的类型可能不是整型导致报错。0fa79d7
  • 修复 stdlib SystemHelper 在 windows 10 中会被 Defender 删除 71c2893
  • 修复 increment/decrement 多拿了一个连接 94c7171
  • 修复 模型属性 $modelTimestamps 关闭了无效 94c7171
  • 修复 在初始化前调用了log,导致可能会在启动阶段报context丢失错误 5a27704f
  • 修复 ws server的握手和open使用同一个顶级协程ID,如果有一个先执行完成,可能会导致后面的出现session丢失 c2cd17a
  • 修复 after 定时器传递参数 bug 8ed609a
  • 修复定时任务内存泄漏和日志打印数据丢失问题 aa6bc32
  • 优化 Http server sgo 处理流程 e60d92e
  • 修复数据库在事物情况下重连导致数据不一致问题 c2e87f2
  • 修复 Aop 极端情况返回 0 问题 85bc1b1
  • 修复 BeanFactory::createBean() 方法创建问题 c2e2c89
  • 修复 RPC 错误数据是字符串问题 3a34658
  • 修复 redisCluster 初始化问题 3a60c06
  • 修复 DbException 没有抛出 Database 的异常 Code 3a60c06
  • 修复 ModelAttribute 的 getter 和 setter 驼峰判断错误 2e2f0f1
  • 修复 Aggregate 聚合, 返回字符串强行转换 int错误 7aa98a6
  • 修复模型 updateCounters 方法更新之后没有同步实体数据 967d6f8

更新(Update):

  • 调整 ws server在worker 退出时自动关闭连接,添加开关配置,可以选择是否开启。3a8890c
  • ws server 新增事件: MESSAGE_PUSH OPEN_BEFORE MESSAGE_RECEIVE e1b0583

增强(Enhancement)

  • 新增日志按时间切割 f649df2
  • 新增日志支持传递额外参数 55d5533
  • 调整和新增了一些ws server相关事件,方便用户使用 e1b0583
  • 模型对 Prop 支持 630aad8
  • 新增连接连接池(mysql/redis/rpc)启动初始化连接功能 a367173
  • tcp server 使用长度分包时,支持自定义头部数据打包、解包格式 a6fbe932
  • RPC 调用错误信息调整 d9226b1
  • 新增操作 Database 异常, 打印控制台 错误 SQL 3a60c06
  • 新增操作数据迁移 int 系列 长度支持 967d6f8
  • 新增获取原始 sql 方法 getRawSql 967d6f8
  • 扩展 updateOrInsert和 updateOrCreate 支持自增参数 967d6f8

扩展(Extra):

  • Swoftcli 已经支持基本的应用骨架和组件结构创建,以及类文件生成功能
  • SwoftTracker 支持方便开发者调试

Guess you like

Origin www.oschina.net/news/110128/swoft-2-0-6-released