定制 friendsofhyperf/pest-plugin-hyperf 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

friendsofhyperf/pest-plugin-hyperf

最新稳定版本:v3.2.0-alpha.1

Composer 安装命令:

composer require --dev friendsofhyperf/pest-plugin-hyperf

包简介

The Pest Hyperf Plugin.

README 文档

README

Latest Stable Version Total Downloads License

This is a Pest plugin that enables your Hyperf project's Pest to run within a Swoole-based coroutine environment.

Installation

composer require friendsofhyperf/pest-plugin-hyperf --dev

Usage

php vendor/bin/pest --coroutine
# or
php vendor/bin/pest --prepend test/prepend.php --coroutine
  • test/prepend.php
<?php
require_once __DIR__ . '/../vendor/autoload.php';

defined('BASE_PATH') or define('BASE_PATH', dirname(__DIR__, 1));

(function () {
    \Hyperf\Di\ClassLoader::init();

    \Hyperf\Context\ApplicationContext::setContainer(
        new \Hyperf\Di\Container((new \Hyperf\Di\Definition\DefinitionSourceFactory())())
    );
    
    // $container->get(Hyperf\Contract\ApplicationInterface::class);
})();

Contact

License

MIT

统计信息

  • 总下载量: 6.07k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 2
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-06-14