Code Monkey home page Code Monkey logo

slumen's Introduction

slumen

speed up lumen with swoole

Total Downloads Latest Stable Version

Require

  • PHP >= 7.0.0
  • Lumen >= 5.6.0
  • Swoole >= 4.0.0

Install

$ cd /PATH/TO/LUMEN/PROJECT
$ composer require breeze2/slumen
$ cp vendor/breeze2/slumen/bootstrap/slumen.php ./bootstrap/

Usage

$ vendor/bin/slumen start
$ vendor/bin/slumen stop 
$ vendor/bin/slumen restart
$ vendor/bin/slumen status

slumen's People

Contributors

breeze2 avatar

Stargazers

jiangslee avatar Li QiJun avatar Gennaro Landolfi avatar  avatar KevinLee avatar shuangxijiang avatar  avatar shark99 avatar leishitai avatar Shankar Ganesh avatar  avatar  avatar  avatar kindywu avatar  avatar  avatar 飞鸿影~ avatar keygle avatar Birjemin Master avatar Zhang Bo avatar ddw avatar Roman avatar ZhenYangze avatar Jack Noordhuis avatar  avatar Alex avatar wuweizhen avatar 空白格 avatar

Watchers

James Cloos avatar  avatar wuweizhen avatar  avatar

slumen's Issues

Eloquent ORM有影响,会报错

我用orm的方式查询会报
Argument 2 passed to Symfony\Component\HttpFoundation\JsonResponse::__construct() must be of the type integer

不知道是哪里影响了输出,不用你这套是没有问题的,另外你文档的mysql连接池使用也有问题

<?php
//原lumen用法
$result = App\Models\User::where('id', 1)->get();

//MySQL连接池用法
//注意,这里的App\Models\User须继承自BL\Slumen\Database\Eloquent\Model
$connection = app('mysql')->pop();
$result = App\Models\User::useConnection()->where('id', 1)->get();
app('mysql')->push($connection);

useConnection也不是static的方法

两个连接池的区别是什么?

BL\Slumen\Runtime\MySqlConnectionPoolBL\Slumen\Coroutine\MySqlConnectionPool两种连接池的方式

1.主要区别是什么?
2.各自的使用场景是什么?

start slumen occur error with ubuntu18,php72,swoole4.3,lumen5.8

kindy@ubuntu64:/mnt/hgfs/assembly$ vendor/bin/slumen start
PHP Fatal error: Uncaught TypeError: Argument 1 passed to Dotenv\Dotenv::__construct() must be an instance of Dotenv\Loader, string given, called in /mnt/hgfs/assembly/bootstrap/slumen.php on line 6 and defined in /mnt/hgfs/assembly/vendor/vlucas/phpdotenv/src/Dotenv.php:31
Stack trace:
#0 /mnt/hgfs/assembly/bootstrap/slumen.php(6): Dotenv\Dotenv->__construct('/mnt/hgfs/assem...')
#1 /mnt/hgfs/assembly/vendor/breeze2/slumen/src/Command.php(18): require('/mnt/hgfs/assem...')
#2 /mnt/hgfs/assembly/vendor/breeze2/slumen/src/Command.php(169): BL\Slumen\Command->__construct()
#3 /mnt/hgfs/assembly/vendor/breeze2/slumen/bin/slumen(30): BL\Slumen\Command::main(Array)
#4 {main}
thrown in /mnt/hgfs/assembly/vendor/vlucas/phpdotenv/src/Dotenv.php on line 31

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.