Download the PHP package huang-yi/shadowfax without Composer

On this page you can find all versions of the php package huang-yi/shadowfax. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package shadowfax

English | 中文

Shadowfax

The Shadowfax is a package that runs your Laravel application on Swoole.

Installation

You may use Composer to install Shadowfax to your project:

If you are using Lumen, you need to register the service provider manually in bootstrap/app.php:

After installing Shadowfax, publish its configuration files using the shadowfax:publish Artisan command:

Configuration

The primary configuration file is shadowfax.yml. And this file name is added to the .gitignore file by shadowfax:publish Artisan command.

  1. Basic configuration:
  1. server configuration:

This section defines the Swoole\Server configuration. Read the official docs for more information.

  1. abstracts configuration:

This option allows you to set a group of abstracts in the Laravel IoC container. These abstracts will be rebound after each request.

  1. controllers configuration:

This option allows you to clean the controller instances in route after each request.

  1. cleaners configuration:

This option allows you to register custom cleaners. These cleaners will run after each request.

  1. db_pools configuration:

This option allows you to configure database connection pools. You can add multiple key-value pairs in here. The key name is a connection name in your database.connections, the key value is the connection pool capacity. e.g.:

  1. redis_pools configuration:

This option allows you to configure redis connection pools. You can add multiple key-value pairs in here. The key name is a connection name in your database.redis, the key value is the connection pool capacity. e.g.:

  1. controller server configuration:

This section defines the controller server configuration. The controller server allows you to stop or reload your Shadowfax.

Command

Shadowfax provides a shadowfax command to manage your server processes. This command is build on the Symfony console component, so you can run php shadowfax list for more information.

You may run the php shadowfax start command to start Shadowfax server. The --watch|-w option can run your Shadowfax in watch mode. In watch mode, the processes will be automatically reloaded when the files under your project change.

You must install the fswatch before using --watch|-w option.

The php shadowfax reload allows you to reload the Shadowfax processes.

The php shadowfax stop allows you to stop the Shadowfax server.

Database Connection Pool

Before using database connection pools, you must enable Swoole coroutine and configure the hook_flags:

Then, add your connection to the db_pools option, and specify a pool capacity:

Redis Connection Pool

The difference with database connection pool is that redis connection pools are configured under the redis_pools option.

WebSocket Server

Shadowfax also allows you to build your WebSocket server.

First of all, you need to change the value of configuration item type to websocket. Then create a handler class that implemented the HuangYi\Shadowfax\Contracts\WebSocket\Handler interface:

And bind this handler to a uri in your route file:

Now, you can start the WebSocket server by command php shadowfax start.

Nginx Configuration

You may use Nginx as a reverse proxy in production environment:

You need to add the IP address of the Shadowfax to the App\Http\Middleware\TrustProxies Middleware.

Supervisor Configuration

If you want to use the Supervisor to manage your Shadowfax processes, the following configuration file should suffice:

Benchmarks

Run tests using wrk.

Environment 1

Result:

Environment 2

Result:

Testing

License

Shadowfax is open-sourced software licensed under the MIT license.


All versions of shadowfax with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2|^8.0
ext-swoole Version ^4.3.2
huang-yi/swoole-watcher Version ^1.0
illuminate/console Version ^5.5|^6.0|^7.0|^8.0
illuminate/container Version ^5.5|^6.0|^7.0|^8.0
illuminate/contracts Version ^5.5|^6.0|^7.0|^8.0
illuminate/http Version ^5.5|^6.0|^7.0|^8.0
illuminate/support Version ^5.5|^6.0|^7.0|^8.0
psr/container Version ^1.0
psr/event-dispatcher Version ^1.0
symfony/console Version ^3.3|^4.0|^5.0
symfony/yaml Version ^3.3|^4.0|^5.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package huang-yi/shadowfax contains the following files

Loading the files please wait ....