Giter Club home page Giter Club logo

laravelfly's Introduction

Would you like php 7.4 Preloading? Would you like php coroutine? Today you can use them with Laravel because of Swoole. With LaravalFly, Laravel will begin like Django 3.0 to be fully async-capable.

LaravelFly is a safe solution to speeds up new or old Laravel 5.5+ projects, with preloading and coroutine, while without data pollution or memory leak. And it makes Tinker available online (use tinker while Laravel is responding requests from browsers).

Thanks to Laravel, Swoole and PsySh.

Notice: Great News! Laravel is supporting Swoole offcially with laravel/octane!

A simple ab test

ab -k -n 1000 -c 10 http://zc.test (21 sql statements were executed in single request)

. fpm Fly
Time taken ≈ 43.5 s 12.3 s
Requests per second 23 81.5
50% 303 ms 117 ms
80% 360 ms 153 ms
99% 1341 ms 239 ms
Test Env
  • env:
    • ubuntu 16.04 on VirtualBox ( 1 CPU: i7-7700HQ 2.80GHz ; Memory: 2G )
    • php7.2 + opcache + 5 workers for both fpm and laravelfly ( phpfpm : pm=static pm.max_children=5)
    • connection pool and coroutine mysql
  • Test date : 2018/10

Version Compatibility

  • Laravel 5.5 ~ 6.0
  • Swoole >4.2.13

Quick Start

1.pecl install swoole
Make sure extension=swoole.so in config file for php cli, not for fpm.
Suggest: pecl install inotify

2.composer require "scil/laravel-fly":"dev-master"

3.php vendor/scil/laravel-fly/bin/fly start
If you enable eval(tinker()) and see an error about mkdir, you can start LaravelFly with sudo.

Now, your project is flying and listening to port 9501. Enjoy yourself.

Docker-compose

composer require "scil/laravel-fly":"dev-master"

php artisan vendor:publish --tag=fly-server

# 127.0.0.1:8080
# you can edit this docker-compos file and use your own nginx conf
docker-compose -f vendor/scil/laravel-fly-local/docker/docker-compose.yml up -d

Doc

Configuration

Commands: Start, Reload & Debug

Coding Guideline

Events about LaravelFly

Using tinker when Laravel Working

For Dev

Recommended Packages

  • swlib/saber Coroutine HTTP client, based on Swoole\Coroutine\Http\Client.
    Browser-like cookie managment, multiple requests concurrent, request/response interceptors and so on.
    To ensure safety, set const LARAVELFLY_COROUTINE = true; in fly.conf.php.

Features and Behaviors

  • Same codes can run on PHP-FPM or LaravelFly. LaravelFly can be installed on your existing projects without affecting nginx/apache server, that's to say, you can run LaravelFly server and nginx/apache server simultaneously to run the same laravel project. The nginx conf swoole_fallback_to_phpfpm.conf allow you use LaravelFlyServer as the primary server, and the phpfpm as a backup server which will be passed requests when the LaravelFlyServer is unavailable. Another nginx conf use_swoole_or_fpm_depending_on_clients allows us use query string ?useserver=<swoole|fpm|... to select the server between swoole or fpm. That's wonderful for test, such as to use eval(tinker()) as a online debugger for your fpm-supported projects. Apache? There is a example Cooperate with Apache from laravel-s.

  • Moderate strategy: by default, each Third Party service provider is registered on server worker process (before the first request arrived at server) , booted in request.

  • By default, all Laravel official services are COROUTINE-FRIENDLY, including mysql and redis. You can make a service or object before any requests. There are two ways:

    • let the service or object live in multiple requests (only one instance of the service). LaravelFly named it WORKER SERVICE, WORKER OBJECT or COROUTINE-FRIENDLY SERVICE/OBJECT.
    • cloned the service or object in each request (one instance in one request).LaravelFly named it CLONE SERVICE or CLONE OBJECT. This way is simple, but often has the problem Stale Reference. This type is used widely by laravel-swoole and laravel-s, while used rarely by LaravelFly.
  • Extra speed improvements such as connection pool, middlewares cache, view path cache.

  • Check server info at /laravel-fly/info. (This feture is under dev and more infomations will be available.)

  • No support for static files any more, so use it with other servers. Conf examples: nginx or Apache

  • swoole-job,A Laravel job or event listener can be delivered into a swoole task process and executed at once artisan queue:work needless any more.

  • exit() or die() in an route action would output content to console or swoole log, and not make server die or reload. If you would like to change that behavior, fork LaravalFly and catch \Swoole\ExitException in LaravelFly\Map\Kernel::handle.

  • Support connection pool. There's only one connection available in each request.But if you use fly() or fly2(), you can use connections more than one.

  • functions fly() and fly2() which are like go() provided by golang or swoole, plus Laravel services can be used in fly() and fly2() without closure. The fly2() has the limited ability to change services in current request, e.g. registering a new event handler for current request. fly2() is not suggested.

A coroutine starting in a request, can still live when the request ends. What's the effect of following route?
It responds with 'coroutine1; outer1; coroutine2; outer2; outer3',
but it write log 'coroutine1; outer1; coroutine2; outer2; outer3; coroutine2.end; coroutine1.end'

// ensure ` const LARAVELFLY_COROUTINE = true;` in fly.conf.php

Route::get('/fly', function () {

    $a = [];
    
    fly(function () use (&$a) {
    
        $a[] = 'coroutine1';
        \co::sleep(2);
        $a[] = 'coroutine1.end';
        \Log::info(implode('; ', $a));
        
        // Eloquent can be used even if current request has ended.
        // $user = new User();
        // $user->name = implode('; ',$a);
        // $user->save();
        
    });

    $a[] = 'outer1';
    

    // go() can use laravel service  with closure
    $log = app('log');
    go(function () use (&$a, $log) {
        $a[] = 'coroutine2';
        \co::sleep(1.2);
        $a[] = 'coroutine2.end';
    });

    $a[] = 'outer2';

    \co::sleep(1);

    $a[] = 'outer3';

    return implode(';', $a);

});

Similar projects that mix swoole and laravel

The main distinguishing feature of LaravalFly is refactoring Laravel, like what Django 3.0 does.

It is alse a safe sollution. It has supported Lumen and websocket. Its doc is great and also useful for LaravelFly.

The main difference is that in laravel-swoole user's code will be processed by a new app cloned from SwooleTW\Http\Server\Application::$application and laravel-swoole updates related container bindings to the new app. However in LaravelFly, the sandbox is not a new app, but an item in the $corDict of the unique application container.
In LaravelFly, most other objects such as app, event.... always keep one object in a worker process, clone is not used at all by default. LaravelFly makes most of laravel objects keep safe on their own. It's about high cohesion & low coupling and the granularity is at the level of app container or services/objects. For users of laravel-swoole, it's a big challenge to handle the relations of multiple packages and objects which to be booted before any requests. Read Stale Reference.

. technique work to maintaining relations of cloned objects to avoid Stale Reference
laravel-swoole clone app contaniner and objects to make them safe more work (as app,event...are cloned)
LaravelFly Mode Map refactor most official objects to make them safe on their own few work ( nothing is cloned by default)

In LaravelFly, another benefit of non-cloned objects is allowing some improvements, such as event listeners cache, route middlewares cache.

Many great features!

About data pollution? Same technique and problems as laravel-swoole. And neither support coroutine jumping (from one request to another request).

Todo About Improvement

  • Pre-include. Server configs 'pre_include' and 'pre_files'.
  • Server config 'early_laravel'
  • Cache for LaravelFly app config. laravelfly_ps_map.php or laravelfly_ps_simple.php located bootstrap/cache
  • Cache for Log. Server options 'log_cache'.
  • Watching maintenance mode using swoole_event_add. No need to check file storage/framework/down in every request.
  • Cache for kernel middlewares objects. Kernel::getParsedKernelMiddlewares, only when LARAVELFLY_SERVICES['kernel'] is true.
  • Cache for route middlewares. $cacheByRoute in Router::gatherRouteMiddleware, only useful when all route middleaes are reg on worker.
  • Cache for route middlewares objects. config('laravelfly.singleton_route_middlewares') and $cacheForObj in Router::gatherRouteMiddleware, avoid creating instances repeatly.
  • Cache for terminateMiddleware objects.
  • Cache for event listeners. $listenersStalbe in LaravelFly\Map\IlluminateBase\Dispatcher
  • Cache for view compiled path. LARAVELFLY_SERVICES['view.finder'] or App config 'view_compile_1'
  • Mysql coroutine. Old code dropped, laravel-s used.
  • db connection pool and redis connection pool. In fly() or fly2(), connections to be used would be fetched from pool, not inherit the same connections from request coroutine. code: $this->connections[$childId] = []; in ConnectionsTrait.php
  • swoole redis driver
  • swoole redis driver: how to use errMsg errCode
  • use hyperf/database to replace official version?
  • use swlib/swpdo to replace SwoolePDO?
  • Cache for HasRelationships. disable and experimental, not ready
  • Cache for RouteDependencyResolverTrait
  • Converting between swoole request/response and Laravel Request/Response
  • safe: auth, remove some props?
  • use: https://github.com/louislivi/smproxy
  • use: https://github.com/kcloze/swoole-jobs or https://github.com/osgochina/Donkey

Other Todo

  • add events
  • watch code changes and hot reload
  • supply server info. default url is: /laravel-fly/info
  • function fly()
  • job executed in task process. Related: vendor\scil\laravel-fly-files-local\src\Foundation\Bus\
  • event listeners executed in task process. Related: LaravelFly\Map\IlluminateBase\Dispatcher and vendor\scil\laravel-fly-files\src\Foundation\Support\Providers\EventServiceProvider.php
  • use $this->output instead of echo() in Common.php
  • bootstrap all service providers in task process
  • try ocramius/generated-hydrator for laravel-fly/info when its version 3 is ready (it will require nikic/php-parser v4 which is needed by others) // or Zend\Hydrator\Reflection?
  • add tests about auth SessionGuard: Illuminate/Auth/SessionGuard.php with uses Request::createFromGlobals
  • add tests about uploaded file, related symfony/http-foundation files: File/UploadedFile.php and FileBag.php(fixPhpFilesArray)
  • websocket
  • send file
  • travis, static analyze like phan, phpstan or https://github.com/exakat/php-static-analysis-tools
  • cache fly

laravelfly's People

Contributors

fridzema avatar scil avatar stevenyangecho avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

laravelfly's Issues

class Psy\Input\ShellInput not found

When i execute php vendor/scil/laravel-fly/bin/fly start, the ternimal display error with
Fatal error: Uncaught Error: Class 'Psy\Input\ShellInput' not found in /www/wwwroot/zdd/vendor/scil/laravel-fly/src/LaravelFly/Server/Traits/Console.php:38

Version compatibility issue with laravel 5.7.27

Laravel Version: 5.7.27
I ran the following command:
composer require "scil/laravel-fly":"dev-master"
I got the following error:
Problem 1
- scil/laravel-fly-files v5.6.39.4 requires laravel/framework 5.6.39 -> satisfiable by laravel/framework[v5.6.39] but these conflict with your requirements or minimum-stability.
- scil/laravel-fly-files v5.6.39.3 requires laravel/framework 5.6.39 -> satisfiable by laravel/framework[v5.6.39] but these conflict with your requirements or minimum-stability.
- scil/laravel-fly-files v5.6.39.2 requires laravel/framework 5.6.39 -> satisfiable by laravel/framework[v5.6.39] but these conflict with your requirements or minimum-stability.
- scil/laravel-fly-files v5.6.39.1 requires laravel/framework 5.6.39 -> satisfiable by laravel/framework[v5.6.39] but these conflict with your requirements or minimum-stability.
- scil/laravel-fly-files v5.6.38.7 requires laravel/framework 5.6.38 -> satisfiable by laravel/framework[v5.6.38] but these conflict with your requirements or minimum-stability.
- scil/laravel-fly-files v5.6.38.6 requires laravel/framework 5.6.38 -> satisfiable by laravel/framework[v5.6.38] but these conflict with your requirements or minimum-stability.
- scil/laravel-fly-files v5.6.38.5 requires laravel/framework 5.6.38 -> satisfiable by laravel/framework[v5.6.38] but these conflict with your requirements or minimum-stability.
- scil/laravel-fly-files v5.6.38.4 requires laravel/framework 5.6.38 -> satisfiable by laravel/framework[v5.6.38] but these conflict with your requirements or minimum-stability.
- scil/laravel-fly-files v5.6.38.3 requires laravel/framework 5.6.38 -> satisfiable by laravel/framework[v5.6.38] but these conflict with your requirements or minimum-stability.
- scil/laravel-fly-files v5.6.38.2 requires laravel/framework 5.6.38 -> satisfiable by laravel/framework[v5.6.38] but these conflict with your requirements or minimum-stability.
- scil/laravel-fly-files v5.6.38.1 requires laravel/framework 5.6.38 -> satisfiable by laravel/framework[v5.6.38] but these conflict with your requirements or minimum-stability.
- scil/laravel-fly-files v5.5.4402 requires laravel/framework 5.5.44 -> satisfiable by laravel/framework[v5.5.44] but these conflict with your requirements or minimum-stability.
- scil/laravel-fly-files v5.5.4401 requires laravel/framework 5.5.44 -> satisfiable by laravel/framework[v5.5.44] but these conflict with your requirements or minimum-stability.
- scil/laravel-fly-files v5.5.4307 requires laravel/framework 5.5.43 -> satisfiable by laravel/framework[v5.5.43] but these conflict with your requirements or minimum-stability.
- scil/laravel-fly-files v5.5.4306 requires laravel/framework 5.5.43 -> satisfiable by laravel/framework[v5.5.43] but these conflict with your requirements or minimum-stability.
- scil/laravel-fly-files v5.5.4305 requires laravel/framework 5.5.43 -> satisfiable by laravel/framework[v5.5.43] but these conflict with your requirements or minimum-stability.
- scil/laravel-fly-files v5.5.4304 requires laravel/framework 5.5.43 -> satisfiable by laravel/framework[v5.5.43] but these conflict with your requirements or minimum-stability.
- scil/laravel-fly-files v5.5.4303 requires laravel/framework 5.5.43 -> satisfiable by laravel/framework[v5.5.43] but these conflict with your requirements or minimum-stability.
- scil/laravel-fly-files v5.5.4302 requires laravel/framework 5.5.43 -> satisfiable by laravel/framework[v5.5.43] but these conflict with your requirements or minimum-stability.
- scil/laravel-fly-files v5.5.4301 requires laravel/framework 5.5.43 -> satisfiable by laravel/framework[v5.5.43] but these conflict with your requirements or minimum-stability.
- scil/laravel-fly-files v5.5.43 requires laravel/framework 5.5.43 -> satisfiable by laravel/framework[v5.5.43] but these conflict with your requirements or minimum-stability.
- scil/laravel-fly-files v5.5.4001 requires laravel/framework 5.5.40 -> satisfiable by laravel/framework[v5.5.40] but these conflict with your requirements or minimum-stability.
- scil/laravel-fly-files 5.6.x-dev requires laravel/framework 5.6.39 -> satisfiable by laravel/framework[v5.6.39] but these conflict with your requirements or minimum-stability.
- scil/laravel-fly-files 5.5.x-dev requires laravel/framework 5.5.44 -> satisfiable by laravel/framework[v5.5.44] but these conflict with your requirements or minimum-stability.
- scil/laravel-fly dev-master requires scil/laravel-fly-files 5.5.* || 5.6.* || 5.7.* -> satisfiable by scil/laravel-fly-files[5.5.x-dev, 5.6.x-dev, v5.5.4001, v5.5.43, v5.5.4301, v5.5.4302, v5.5.4303, v5.5.4304, v5.5.4305, v5.5.4306, v5.5.4307, v5.5.4401, v5.5.4402, v5.6.38.1, v5.6.38.2, v5.6.38.3, v5.6.38.4, v5.6.38.5, v5.6.38.6, v5.6.38.7, v5.6.39.1, v5.6.39.2, v5.6.39.3, v5.6.39.4].
- Installation request for scil/laravel-fly dev-master -> satisfiable by scil/laravel-fly[dev-master].

Installation failed, reverting ./composer.json to its original content.

修改建议

wiki说明修改

https://github.com/scil/LaravelFly/wiki/Configuration
修改

class WhichKernel extends \LaravelFly\MidKernel{}

class WhichKernel extends \LaravelFly\Kernel{}

代码修改

src/LaravelFly/Map/Util/Dict.php中,修改if (static::$normalAttriForObj ?? false) {if (isset(static::$normalAttriForObj)) {

类似的还有static::$arrayAttriForObj, static::$arrayStaticAttri

启动报错,#21 {main}[FLY ERROR] bootstrap: Class xxxx does not exist

  1. laravel5.6最基本的版本中,是没有问题的。
  2. 迁移到项目上后,开始报错了。
  3. 提示找不到files方法,修改后会提示找不到Auth方法。

provider

    'providers' => [

        /*
         * Laravel Framework Service Providers...
         */
        Illuminate\Auth\AuthServiceProvider::class,
        Illuminate\Broadcasting\BroadcastServiceProvider::class,
        Illuminate\Bus\BusServiceProvider::class,
        Illuminate\Cache\CacheServiceProvider::class,
        Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class,
        Illuminate\Cookie\CookieServiceProvider::class,
        Illuminate\Database\DatabaseServiceProvider::class,
        Illuminate\Encryption\EncryptionServiceProvider::class,
        Illuminate\Filesystem\FilesystemServiceProvider::class,
        Illuminate\Foundation\Providers\FoundationServiceProvider::class,
        Illuminate\Hashing\HashServiceProvider::class,
        Illuminate\Mail\MailServiceProvider::class,
        Illuminate\Notifications\NotificationServiceProvider::class,
        Illuminate\Pagination\PaginationServiceProvider::class,
        Illuminate\Pipeline\PipelineServiceProvider::class,
        Illuminate\Queue\QueueServiceProvider::class,
        Illuminate\Redis\RedisServiceProvider::class,
        Illuminate\Auth\Passwords\PasswordResetServiceProvider::class,
        Illuminate\Session\SessionServiceProvider::class,
        Illuminate\Translation\TranslationServiceProvider::class,
        Illuminate\Validation\ValidationServiceProvider::class,
        Illuminate\View\ViewServiceProvider::class,

        /*
         * Package Service Providers...
         */

        /*
         * Application Service Providers...
         */
        App\Providers\AppServiceProvider::class,
        App\Providers\AuthServiceProvider::class,
        // App\Providers\BroadcastServiceProvider::class,
        App\Providers\EventServiceProvider::class,
        App\Providers\RouteServiceProvider::class,
        Laravel\Passport\PassportServiceProvider::class,
        SimpleSoftwareIO\QrCode\QrCodeServiceProvider::class,

        Intervention\Image\ImageServiceProvider::class,
        \Yangyifan\Upload\UploadServiceProvider::class,
        \App\Providers\Cee\Volunteer\VolunteerProvider::class,
        App\Providers\Cee\Major\EvaluationProvider::class,
        App\Providers\Im\TimProvider::class,
        //Hhxsv5\LaravelS\Illuminate\LaravelSServiceProvider::class,
        Silber\PageCache\LaravelServiceProvider::class,
    ],

错误代码

#0 /www/htdocs/vendor/scil/laravel-fly-files/src/Container.php(701): ReflectionClass->__construct('files')
#1 /www/htdocs/vendor/scil/laravel-fly-files/src/Container.php(578): Illuminate\Container\Container->build('files')
#2 /www/htdocs/vendor/scil/laravel-fly-files/src/Container.php(533): Illuminate\Container\Container->resolve('files', -1, Array)
#3 /www/htdocs/vendor/scil/laravel-fly-files/src/Application.php(697): Illuminate\Container\Container->make('files', Array)
#4 /www/htdocs/vendor/scil/laravel-fly-files/src/Container.php(1154): Illuminate\Foundation\Application->make('files')
#5 /www/htdocs/vendor/barryvdh/laravel-ide-helper/src/IdeHelperServiceProvider.php(118): Illuminate\Container\Container->offsetGet('files')
#6 /www/htdocs/vendor/barryvdh/laravel-ide-he#0 /www/htdocs/vendor/scil/laravel-fly-files/src/Container.php(701): ReflectionClass->__construct('files')
#1 /www/htdocs/vendor/scil/laravel-fly-files/src/Container.php(578): Illuminate\Container\Container->build('files')
#2 /www/htdocs/vendor/scil/laravel-fly-files/src/Container.php(533): Illuminate\Container\Container->resolve('files', -1, Array)
#3 /www/htdocs/vendor/scil/laravel-fly-files/src/Application.php(697): Illuminate\Container\Container->make('files', Array)
#4 /www/htdocs/vendor/scil/laravel-fly-files/src/Container.php(1154): Illuminate\Foundation\Application->make('files')
#5 /www/htdocs/vendor/barryvdh/laravel-ide-helper/src/IdeHelperServiceProvider.php(118): Illuminate\Container\Container->offsetGet('files')
#6 /www/htdocs/vendor/barryvdh/laravel-ide-helper/src/IdeHelperServiceProvider.php(61): Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider->createLocalViewFactory()
#7 /www/htdocs/vendor/scil/laravel-fly-files/src/Application.php(546): Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider->register()
#8 /www/htdocs/app/Providers/AppServiceProvider.php(53): Illuminate\Foundation\Application->register(Object(Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider))
#9 /www/htdocs/vendor/scil/laravel-fly-files/src/Application.php(546): App\Providers\AppServiceProvider->register()
#10 /www/htdocs/vendor/scil/laravel-fly/src/LaravelFly/Backup/ProviderRepository.php(28): Illuminate\Foundation\Application->register(Object(App\Providers\AppServiceProvider))
#11 /www/htdocs/vendor/scil/laravel-fly/src/LaravelFly/Map/Application.php(242): LaravelFly\Backup\ProviderRepository->load(Array)
#12 /www/htdocs/vendor/scil/laravel-fly/src/LaravelFly/Map/Bootstrap/RegisterAcrossProviders.php(10): LaravelFly\Map\Application->registerAcrossProviders()
#13 /www/htdocs/vendor/scil/laravel-fly-files/src/Application.php(172): LaravelFly\Map\Bootstrap\RegisterAcrossProviders->bootstrap(Object(LaravelFly\Map\Application))
#14 /www/htdocs/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(162): Illuminate\Foundation\Application->bootstrapWith(Array)
#15 /www/htdocs/vendor/scil/laravel-fly/src/LaravelFly/Server/Traits/Laravel.php(90): Illuminate\Foundation\Http\Kernel->bootstrap()
#16 /www/htdocs/vendor/scil/laravel-fly/src/LaravelFly/Server/HttpServer.php(32): LaravelFly\Server\Common->startLaravel()
#17 [internal function]: LaravelFly\Server\HttpServer->onWorkerStart(Object(Swoole\Http\Server), 3)
#18 /www/htdocs/vendor/scil/laravel-fly/src/LaravelFly/Server/Common.php(311): Swoole\Http\Server->start()
#19 /www/htdocs/vendor/scil/laravel-fly/src/LaravelFly/Server/HttpServer.php(23): LaravelFly\Server\Common->start()
#20 /www/htdocs/vendor/scil/laravel-fly/bin/fly(84): LaravelFly\Server\HttpServer->start()
#21 {main}[FLY ERROR] bootstrap: Class files does not exist

support laravel5.6 5.7

composer require scil/laravel-fly

Using version ^0.9.2 for scil/laravel-fly
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

Problem 1

- scil/laravel-fly-files v5.5.4302 requires laravel/framework 5.5.43 -> satisfiable by laravel/framework[v5.5.43] but these conflict with your requirements or minimum-stability.
- scil/laravel-fly-files v5.5.4301 requires laravel/framework 5.5.43 -> satisfiable by laravel/framework[v5.5.43] but these conflict with your requirements or minimum-stability.
- scil/laravel-fly-files v5.5.43 requires laravel/framework 5.5.43 -> satisfiable by laravel/framework[v5.5.43] but these conflict with your requirements or minimum-stability.
- scil/laravel-fly-files v5.5.4001 requires laravel/framework 5.5.40 -> satisfiable by laravel/framework[v5.5.40] but these conflict with your requirements or minimum-stability.
- scil/laravel-fly-files 5.5.x-dev requires laravel/framework 5.5.43 -> satisfiable by laravel/framework[v5.5.43] but these conflict with your requirements or minimum-stability.
- Installation request for scil/laravel-fly ^0.9.2 -> satisfiable by scil/laravel-fly[v0.9.2].
- Can only install one of: laravel/framework[v5.6.35, v5.6.28].
- Can only install one of: laravel/framework[v5.6.28, v5.6.35].
- Can only install one of: laravel/framework[v5.6.28, v5.6.35].
- scil/laravel-fly-files 5.6.x-dev requires laravel/framework 5.6.28 -> satisfiable by laravel/framework[v5.6.28].
- scil/laravel-fly v0.9.2 requires scil/laravel-fly-files 5.5.* || 5.6.* -> satisfiable by scil/laravel-fly-files[5.5.x-dev, 5.6.x-dev, v5.5.4001, v5.5.43, v5.5.4301, v5.5.4302, v5.6.38.1, v5.6.38.2].
- scil/laravel-fly-files v5.6.38.1 requires laravel/framework 5.6.38 -> satisfiable by laravel/framework[v5.6.38].
- scil/laravel-fly-files v5.6.38.2 requires laravel/framework 5.6.38 -> satisfiable by laravel/framework[v5.6.38].
- Conclusion: don't install laravel/framework v5.6.38
- Installation request for laravel/framework (locked at v5.6.35, required as 5.6.*) -> satisfiable by laravel/framework[v5.6.35].

Installation failed, reverting ./composer.json to its original content.

docker fpm fallback 502 bad gateway

My docker-compose

#Docker Networks
networks:
  app-network:
    driver: bridge
services:
  app:
    build: php-fpm
    container_name: app
    restart: always
    ports:
      - "9501:9501"
    #      - "9000:9000"
    #      - "81:81"
    expose:
      - 80
      - 9501
      - 9000
    #    entrypoint: "php vendor/scil/laravel-fly/bin/fly start"
    entrypoint: "php-fpm"
    environment:
      SERVICE_NAME: app
      SERVICE_TAGS: dev
    volumes:
      - ${APP_PATH_HOST}:${APP_PATH_CONTAINER}
      - ./php-fpm/config:/usr/local/etc/php
    working_dir: ${APP_PATH_CONTAINER}
    networks:
      - app-network

  #Nginx Service
  nginx:
    build: nginx
    restart: always
    ports:
      - "80:80"
      - "443:443"
    networks:
      - app-network
    working_dir: /app
    volumes:
      - ${APP_PATH_HOST}/public:/usr/share/nginx/html
      - ./nginx/conf.d/app.conf:/etc/nginx/nginx.conf
    command: [nginx-debug, '-g', 'daemon off;']

  db:
    image: mysql
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: 123456
    volumes:
      - ${DB_PATH_HOST}:/var/lib/mysql
    command: --default-authentication-plugin=mysql_native_password
    ports:
      - "3306:3306"
    networks:
      - app-network

  adminer:
    image: adminer
    restart: always
    ports:
      - "6080:8080"
    networks:
      - app-network

My nginx app.conf

 user              www-data  www-data;
 worker_processes  5;
 
 pid        /var/run/nginx.pid;
 
 worker_rlimit_nofile 1024;
 
 # include /etc/nginx/modules-enabled/*.conf;
 
 events {
         worker_connections 512;
 }
 
 http {
 
         include /etc/nginx/mime.types;
         default_type application/octet-stream;
         sendfile off;
         tcp_nopush on;
         access_log /var/log/nginx/access.log;
        error_log /var/log/nginx/error.log warn;
 
 
 
 
         upstream default {
             server app:9501  weight=1 max_fails=1 fail_timeout=10 ;
             server app:81  backup;
 
             # The connections parameter sets the maximum number of idle keepalive connections to upstream servers that are preserved in the cache of each worker process. When this number is exceeded, the least recently used connections are closed.
             # It does not limit the total number of connections to upstream servers that an nginx worker process can open. The connections parameter should be set to a number small enough to let upstream servers process new incoming connections as well.
             # https://gist.github.com/magnetikonline/4a2e68b2ce94bd0c945e
             # https://ma.ttias.be/enable-keepalive-connections-in-nginx-upstream-proxy-configurations/
             keepalive 8;
         }
         upstream swoole {
             server app:9501;
         }
         upstream fpm {
             server app:81;
         }
 
         # map to different upstream backends based on query parameter 'useserver'
         # visit http://fly.test/?useserver=swoole to use server swoole
         # visit http://fly.test to use upstream default
         map $arg_useserver $pool {
              default "default";
              swoole "swoole";
              fpm "fpm";
         }
 
         log_format my_upstream '$remote_addr|$time_local|$request_time|$upstream_response_time|$status '
                                  '$upstream_addr|$request';
 
         server {
           server_name fly.test;
            listen 80;
            root /usr/share/nginx/html;
            index index.html;
           charset utf-8;
 
             location = / {
                 # if you have a static home page , try this one:
                 # try_files index.html @other;
                 try_files '' @php;
             }
 
             location / {
                 try_files $uri $uri/ @php;
             }
 
            location @php {
                 proxy_pass http://$pool;
 
                 # Default is HTTP/1, keepalive is only enabled in HTTP/1.1
                 proxy_http_version 1.1;
                 # Remove the Connection header if the client sends it,
                 # it could be "close" to close a keepalive connection
                 proxy_set_header Connection "";
 
                 # proxy_connect_timeout 60s;
                 # proxy_send_timeout 60s;
                 # proxy_read_timeout 120s;
 
                 proxy_set_header    X-Real-IP        $remote_addr;
                 proxy_set_header    X-Forwarded-For  $proxy_add_x_forwarded_for;
                 proxy_set_header    Host             $http_host;
 
                 # proxy_set_header X-Real-PORT $remote_port;
                 # proxy_set_header Scheme $scheme;
                 # proxy_set_header Server-Protocol $server_protocol;
                 # proxy_set_header Server-Name $server_name;
                 # proxy_set_header Server-Addr $server_addr;
                 # proxy_set_header Server-Port $server_port;
 
                 # just a mark for different upstream server, you can disable it
                 add_header X-Upstream $upstream_addr;
                 # log
                 access_log /var/log/nginx/upstream.log my_upstream;
 
            }
 
         #    # only for Let's Encrypt
         #    location ~ /.well-known {
         #        allow all;
         #        # set root is necessage, otherwise "Invalid response from domain..."
         #        # https://www.digitalocean.com/community/questions/letsencrypt-problem-renewing-certs-invalid-response-from-domain
         #        root  {{ doc_root }};
         #    }
 
         }
 
 
         server {
            server_name fly.test;
            listen 81;
            root /usr/share/nginx/html;
            index index.html index.php;
            charset utf-8;
 
            location / {
                 try_files '' /index.php?$query_string;
             }
 
             location /index.php {
                fastcgi_pass app:9000;
                fastcgi_index index.php;
                include fastcgi.conf;
            }
 
       }
     }

Swoole works well, but php-fpm always get 502 bad gateway

does LaravelFly support lumen

我们公司的项目是基于lumen框架的,直接使用swoole会造成数据污染,连接之间的数据会相互干扰。看了您的帖子谈到了这个问题。这个项目能直接移植到lumen下吗

preload error: the name is already in use

`[INFO] include: /project/bootstrap/cache/laravelfly_preload.php

Fatal error: Cannot declare class Monolog\Handler\AbstractHandler, because the name is already in use in /project/bootstrap/\cache/laravelfly_preload.php on line 16140`

Wont Install Laravel v6.6.0

root@UNIT3D-DEMO:/var/www/html# composer require "scil/laravel-fly":"dev-master"
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for scil/laravel-fly dev-master -> satisfiable by scil/laravel-fly[dev-master].
    - Conclusion: remove laravel/framework v6.6.0
    - Conclusion: don't install laravel/framework v6.6.0
    - scil/laravel-fly dev-master requires laravel/framework 5.5.* || 5.6.* || 5.7.* || 5.8.* || 6.0.* -> satisfiable by laravel/framework[5.5.x-dev, 5.6.x-dev, 5.7.x-dev, 5.8.x-dev, v6.0.0, v6.0.1, v6.0.2, v6.0.3, v6.0.4].
    - Can only install one of: laravel/framework[5.8.x-dev, v6.6.0].
    - Can only install one of: laravel/framework[v6.0.0, v6.6.0].
    - Can only install one of: laravel/framework[v6.0.1, v6.6.0].
    - Can only install one of: laravel/framework[v6.0.2, v6.6.0].
    - Can only install one of: laravel/framework[v6.0.3, v6.6.0].
    - Can only install one of: laravel/framework[v6.0.4, v6.6.0].
    - Can only install one of: laravel/framework[5.5.x-dev, v6.6.0].
    - Can only install one of: laravel/framework[5.6.x-dev, v6.6.0].
    - Can only install one of: laravel/framework[5.7.x-dev, v6.6.0].
    - Installation request for laravel/framework (locked at v6.6.0, required as ^6.0) -> satisfiable by laravel/framework[v6.6.0].

laravel InvalidStateException

laravel exception message :InvalidStateException in AbstractProvider.php line 218

After I check, seems to be the session is unavailable

The second question: cpu

My mac probook
ram:8G ram
cpu: i5
when i use your default config in laravelfly.server.php , cpu goes up to nearly 100% , when i change to config below , about 30% down ,is there anything wrong in your script ?

'0.0.0.0',// listen to any address 'listen_ip' => '127.0.0.1',// listen only to localhost ``` 'listen_port' => 9501, // like pm.max_children in php-fpm, but there's no option like pm.start_servers //'worker_num' => 4, 'worker_num' => 2, // set it to false when debug, otherwise true 'daemonize' => true, // like pm.max_requests in php-fpm // 'max_request' =>1000, 'max_request' =>100, //'log_file' => '/data/log/swoole.log', ``` ];

laravel 5.6, [ERROR] bootstrap: Error: 服务器无法启动

[ERROR] bootstrap: Error: Call to undefined method Illuminate\Log\LogServiceProvider::coroutineFriendlyServices() in /Users/liupeng/Site/quding/vendor/scil/laravel-fly/src/LaravelFly/Map/Bootstrap/LoadConfiguration.php:56
Stack trace:
#0 /Users/liupeng/Site/quding/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(206): LaravelFly\Map\Bootstrap\LoadConfiguration->bootstrap(Object(LaravelFly\Simple\Application))
#1 /Users/liupeng/Site/quding/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(162): Illuminate\Foundation\Application->bootstrapWith(Array)
#2 /Users/liupeng/Site/quding/vendor/scil/laravel-fly/src/LaravelFly/Server/HttpServer.php(59): Illuminate\Foundation\Http\Kernel->bootstrap()
#3 {main}

y i run ab test bewteen fpm & laravelfly , fpm is faster

y i run ab test bewteen fpm & laravelfly , fpm is faster
with opcaceh open, php7 zts
it will be even faster, when no opcache and php7 non zts

nginx + fpm + laravel
ab -c 4 -n 100 'http://laravelfly.dev/'

Requests per second:    51.34 [#/sec] (mean)
Time per request:       77.907 [ms] (mean)
Time per request:       19.477 [ms] (mean, across all concurrent requests)
Transfer rate:          100.36 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    8   9.4      6      50
Processing:    32   69  65.6     49     397
Waiting:       32   69  65.6     49     396
Total:         34   77  65.6     58     397

faster than
laravelfly
ab -c 4 -n 100 'http://127.0.0.1:9501/'

Requests per second:    12.17 [#/sec] (mean)
Time per request:       328.751 [ms] (mean)
Time per request:       82.188 [ms] (mean, across all concurrent requests)
Transfer rate:          23.55 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.6      0       6
Processing:    71  321  86.4    316     782
Waiting:       71  321  86.4    316     782
Total:         72  321  86.1    316     782

i got 504 error when i followed your config steps

nginx:
server {
listen 80;
error_log /usr/local/nginx/logs/error.log;
charset utf-8;
root /Users/liufa/Documents/www/laravel_blog/public;
server_name www.laravel_blogfly.com;

# useful when debug
#504 Gateway timeout error http://stackoverflow.com/questions/18229757/nginx-php-fpm-xdebug-netbeans-can-start-only-one-debug-session

# for firefox, otherwise firefox may dowload some page; default file type is: octet-stream
include /usr/local/nginx/mime.types; default_type text/html; 
location / {
    # you can place index.html on document root dir
    index  index.php index.html;
    try_files $uri $uri/ @other;
}

location = / {
    proxy_http_version 1.1;
    proxy_set_header Connection "keep-alive";
    proxy_pass http://127.0.0.1:9501;
    proxy_set_header    X-Real-IP        $remote_addr;
    proxy_set_header    X-Forwarded-For  $proxy_add_x_forwarded_for;
    proxy_set_header    Host             $http_host;
}
location @other {
    proxy_http_version 1.1;
    proxy_set_header Connection "keep-alive";
    proxy_pass http://127.0.0.1:9501;
    proxy_set_header    X-Real-IP        $remote_addr; 
    proxy_set_header    X-Forwarded-For  $proxy_add_x_forwarded_for; 
    proxy_set_header    Host             $http_host;
 }

}

LaravelFly containes blocking code?

能兼容laravel很好,问题是协程中不能使用任何阻塞的代码,数据库、redis以及rpc等都不能是阻塞的,但是我并没有看到有协程客户端封装,如果用的laravel原生的就会有问题吧

laravel 5.6 无法正常运行

使用默认配置 start后报错

[INFO] conf: /opt/www/laravel-test/fly.conf.php
[INFO] server dispatcher created
[INFO] event server.config
[INFO] include: /opt/www/laravel-test/bootstrap/cache/laravelfly_preload.php
[WARN] kernel: LaravelFly\Kernel
[INFO] event server.created for LaravelFly\Server\HttpServer
[INFO] event worker.starting for 0 (pid 24042)
[INFO] event worker.starting for 1 (pid 24043)
[INFO] event worker.starting for 2 (pid 24044)
[INFO] event worker.starting for 3 (pid 24045)
[INFO] event worker.starting for 4 (pid 24046)
[INFO] event app.created for \LaravelFly\Simple\Application (pid 24043)
[INFO] event app.created for \LaravelFly\Simple\Application (pid 24044)
[INFO] event app.created for \LaravelFly\Simple\Application (pid 24045)
[INFO] event app.created for \LaravelFly\Simple\Application (pid 24042)
[INFO] event app.created for \LaravelFly\Simple\Application (pid 24046)
[ERROR] bootstrap: Whoops\Exception\ErrorException: array_diff(): Argument #2 is not an array in /opt/www/laravel-test/vendor/scil/laravel-fly/src/LaravelFly/Simple/Bootstrap/LoadConfiguration.php:39
Stack trace:
#0 [internal function]: Whoops\Run->handleError(2, 'array_diff(): A...', '/opt/www/larave...', 39, Array)
#1 /opt/www/laravel-test/vendor/scil/laravel-fly/src/LaravelFly/Simple/Bootstrap/LoadConfiguration.php(39): array_diff(Array, NULL, NULL)
#2 /opt/www/laravel-test/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(206): LaravelFly\Simple\Bootstrap\LoadConfiguration->bootstrap(Object(LaravelFly\Simple\Application))
#3 /opt/www/laravel-test/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(162): Illuminate\Foundation\Application->bootstrapWith(Array)
#4 /opt/www/laravel-test/vendor/scil/laravel-fly/src/LaravelFly/Server/HttpServer.php(59): Illuminate\Foundation\Http\Kernel->bootstrap()
#5 {main}
[ERROR] bootstrap: Whoops\Exception\ErrorException: array_diff(): Argument #2 is not an array in /opt/www/laravel-test/vendor/scil/laravel-fly/src/LaravelFly/Simple/Bootstrap/LoadConfiguration.php:39
Stack trace:
#0 [internal function]: Whoops\Run->handleError(2, 'array_diff(): A...', '/opt/www/larave...', 39, Array)
#1 /opt/www/laravel-test/vendor/scil/laravel-fly/src/LaravelFly/Simple/Bootstrap/LoadConfiguration.php(39): array_diff(Array, NULL, NULL)
#2 /opt/www/laravel-test/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(206): LaravelFly\Simple\Bootstrap\LoadConfiguration->bootstrap(Object(LaravelFly\Simple\Application))
#3 /opt/www/laravel-test/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(162): Illuminate\Foundation\Application->bootstrapWith(Array)
#4 /opt/www/laravel-test/vendor/scil/laravel-fly/src/LaravelFly/Server/HttpServer.php(59): Illuminate\Foundation\Http\Kernel->bootstrap()
#5 {main}
[INFO] event worker.ready for id 1
[INFO] event worker.ready for id 2
[ERROR] bootstrap: Whoops\Exception\ErrorException: array_diff(): Argument #2 is not an array in /opt/www/laravel-test/vendor/scil/laravel-fly/src/LaravelFly/Simple/Bootstrap/LoadConfiguration.php:39
Stack trace:
#0 [internal function]: Whoops\Run->handleError(2, 'array_diff(): A...', '/opt/www/larave...', 39, Array)
#1 /opt/www/laravel-test/vendor/scil/laravel-fly/src/LaravelFly/Simple/Bootstrap/LoadConfiguration.php(39): array_diff(Array, NULL, NULL)
#2 /opt/www/laravel-test/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(206): LaravelFly\Simple\Bootstrap\LoadConfiguration->bootstrap(Object(LaravelFly\Simple\Application))
#3 /opt/www/laravel-test/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(162): Illuminate\Foundation\Application->bootstrapWith(Array)
#4 /opt/www/laravel-test/vendor/scil/laravel-fly/src/LaravelFly/Server/HttpServer.php(59): Illuminate\Foundation\Http\Kernel->bootstrap()
#5 {main}
[INFO] event worker.ready for id 3
[2018-05-22 15:34:04 #24034.5]  NOTICE  Server is shutdown now.
[INFO] event worker.stopped for id 2
[INFO] event worker.stopped for id 1
[INFO] event worker.stopped for id 3

Function name must be a string

in my laravel 5.6 application I am getting a strange error on every request.

What is possibaly going wrong here?

Symfony\Component\Debug\Exception\FatalThrowableError thrown with message "Function name must be a string"

Stacktrace:
#6 Symfony\Component\Debug\Exception\FatalThrowableError in /srv/site-laravel/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:152
#5 LaravelFly\Server\HttpServer:onRequest in /srv/site-laravel/vendor/scil/laravel-fly/src/LaravelFly/Server/HttpServer.php:0
#4 Swoole\Http\Server:start in /srv/site-laravel/vendor/scil/laravel-fly/src/LaravelFly/Server/Common.php:273
#3 LaravelFly\Server\HttpServer:start in /srv/site-laravel/vendor/scil/laravel-fly/src/LaravelFly/Server/HttpServer.php:26
#2 LaravelFly\Server\HttpServer:start in /srv/site-laravel/vendor/scil/laravel-fly/src/LaravelFly/Fly.php:70
#1 LaravelFly\Fly:start in /srv/site-laravel/vendor/scil/laravel-fly/bin/fly:78
#0 {main} in /srv/site-laravel/vendor/scil/laravel-fly/bin/fly:0

Can't find fly executable

I successfully installed the LaravelFly via
composer require "scil/laravel-fly":"dev-master"

But when when I goto vendor/bin/ folder I don't see

the fly executable there What could I be doing wrong here?

Docker example?

Would it be possible for you to show a docker example of this running?

CORS not work on laravelfly, but works on php-fpm

  1. laravelFly在9501端口正常启动,
  2. 设置nginx反向代理到9501, 本地请求成功,
  3. 已经有CORS.php中间件并在kernel注册, PHP-FPM模式下可以跨域. 但使用laraveFly后不能跨域。

请问有跨域方面的尝试吗, 或者提示也行...
PS:laravoole也不能跨域

Composer Dependency Error

Laravel: 5.6

composer require "scil/laravel-fly":"dev-master"

When trying to install it on laravel 5.6 I get the dependency error:

 Problem 1
    - Installation request for scil/laravel-fly dev-master -> satisfiable by scil/laravel-fly[dev-master].
    - Conclusion: remove nikic/php-parser v4.0.1
    - Conclusion: don't install nikic/php-parser v4.0.1
    - scil/laravel-fly dev-master requires classpreloader/classpreloader ^3.2 -> satisfiable by classpreloader/classpreloader[3.2.0, 3.2.x-dev].
    - classpreloader/classpreloader 3.2.0 requires nikic/php-parser ^1.0|^2.0|^3.0 -> satisfiable by nikic/php-parser[1.x-dev, 2.x-dev, 3.x-dev, v1.0.0, v1.0.0beta1, v1.0.0
beta2, v1.0.1, v1.0.2, v1.1.0, v1.2.0, v1.2.1, v1.2.2, v1.3.0, v1.4.0, v1.4.1, v2.0.0, v2.0.0alpha1, v2.0.0beta1, v2.0.1, v2.1.0, v2.1.1, v3.0.0, v3.0.0alpha1, v3.0.0beta1,
 v3.0.0beta2, v3.0.1, v3.0.2, v3.0.3, v3.0.4, v3.0.5, v3.0.6, v3.1.0, v3.1.1, v3.1.2, v3.1.3, v3.1.4, v3.1.5].
    - classpreloader/classpreloader 3.2.x-dev requires nikic/php-parser ^1.0|^2.0|^3.0 -> satisfiable by nikic/php-parser[1.x-dev, 2.x-dev, 3.x-dev, v1.0.0, v1.0.0beta1, v1
.0.0beta2, v1.0.1, v1.0.2, v1.1.0, v1.2.0, v1.2.1, v1.2.2, v1.3.0, v1.4.0, v1.4.1, v2.0.0, v2.0.0alpha1, v2.0.0beta1, v2.0.1, v2.1.0, v2.1.1, v3.0.0, v3.0.0alpha1, v3.0.0be
ta1, v3.0.0beta2, v3.0.1, v3.0.2, v3.0.3, v3.0.4, v3.0.5, v3.0.6, v3.1.0, v3.1.1, v3.1.2, v3.1.3, v3.1.4, v3.1.5].
    - Can only install one of: nikic/php-parser[1.x-dev, v4.0.1].
    - Can only install one of: nikic/php-parser[2.x-dev, v4.0.1].
    - Can only install one of: nikic/php-parser[3.x-dev, v4.0.1].
    - Can only install one of: nikic/php-parser[v1.3.0, v4.0.1].
    - Can only install one of: nikic/php-parser[v1.4.0, v4.0.1].
    - Can only install one of: nikic/php-parser[v1.4.1, v4.0.1].
    - Can only install one of: nikic/php-parser[v2.0.0, v4.0.1].
    - Can only install one of: nikic/php-parser[v2.0.0alpha1, v4.0.1].
    - Can only install one of: nikic/php-parser[v2.0.0beta1, v4.0.1].
    - Can only install one of: nikic/php-parser[v2.0.1, v4.0.1].
    - Can only install one of: nikic/php-parser[v2.1.0, v4.0.1].
    - Can only install one of: nikic/php-parser[v2.1.1, v4.0.1].
    - Can only install one of: nikic/php-parser[v3.0.0, v4.0.1].
    - Can only install one of: nikic/php-parser[v3.0.0alpha1, v4.0.1].
    - Can only install one of: nikic/php-parser[v3.0.0beta1, v4.0.1].
    - Can only install one of: nikic/php-parser[v3.0.0beta2, v4.0.1].
    - Can only install one of: nikic/php-parser[v3.0.1, v4.0.1].
    - Can only install one of: nikic/php-parser[v3.0.2, v4.0.1].
    - Can only install one of: nikic/php-parser[v3.0.3, v4.0.1].
    - Can only install one of: nikic/php-parser[v3.0.4, v4.0.1].
    - Can only install one of: nikic/php-parser[v3.0.5, v4.0.1].
    - Can only install one of: nikic/php-parser[v3.0.6, v4.0.1].
    - Can only install one of: nikic/php-parser[v3.1.0, v4.0.1].
    - Can only install one of: nikic/php-parser[v3.1.1, v4.0.1].
    - Can only install one of: nikic/php-parser[v3.1.2, v4.0.1].
    - Can only install one of: nikic/php-parser[v3.1.3, v4.0.1].
    - Can only install one of: nikic/php-parser[v3.1.4, v4.0.1].
    - Can only install one of: nikic/php-parser[v3.1.5, v4.0.1].
    - Can only install one of: nikic/php-parser[v1.0.0, v4.0.1].
    - Can only install one of: nikic/php-parser[v1.0.0beta1, v4.0.1].
    - Can only install one of: nikic/php-parser[v1.0.0beta2, v4.0.1].
    - Can only install one of: nikic/php-parser[v1.0.1, v4.0.1].
    - Can only install one of: nikic/php-parser[v1.0.2, v4.0.1].
    - Can only install one of: nikic/php-parser[v1.1.0, v4.0.1].
    - Can only install one of: nikic/php-parser[v1.2.0, v4.0.1].
    - Can only install one of: nikic/php-parser[v1.2.1, v4.0.1].
    - Can only install one of: nikic/php-parser[v1.2.2, v4.0.1].
    - Installation request for nikic/php-parser (locked at v4.0.1) -> satisfiable by nikic/php-parser[v4.0.1].


Installation failed, reverting ./composer.json to its original content.

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.