Download the PHP package mdx86/workerman-yii2 without Composer

On this page you can find all versions of the php package mdx86/workerman-yii2. 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 workerman-yii2

workerman-yii2

项目说明

我在另外一个项目 https://github.com/tourze/swoole-yii2 中实现了 swoole+yii2 的组合.

我最早接触的是 workerman. 第一次有 "PHP原来也可以这么炫" 这种感觉, 也是从阅读 workerman 的实现开始的.

个人认为, 不管你是 swoole 还是 workerman 的用户, 既然研究 PHP 已经到这种需要考虑高性能场景的时候了, 你就不应该仅仅满足使用, 而应该尝试下了解你所选方案的具体实现了.

swoole 用 C 写的, 看不懂... 那现在有用 PHP 实现的 workerman 了, 总不能说看不懂了吧? :)

适用人群

  1. 对 PHP 项目有高性能要求的开发者
  2. 熟悉 swoole 或 workerman
  3. 阅读过 http://doc3.workerman.net/
  4. 对于Yii2的核心概念和实现, 有一定掌握.

已经完成的工作

进行中的工作

使用方法

首先执行 composer require tourze/workerman-yii2

下面的配置描述, 基本上就是基于 https://github.com/yiisoft/yii2-app-advanced 这个官方 DEMO 来说明的. 建议在阅读前先大概了解下这个项目.

console配置

console/config/main.php 中加入类似以下的代码:

此时执行 ./yii, 应该可以在底部看到 server 相关命令.

frontend/backend配置

我们建议 frontend 部分使用 swoole 来运行, backend 部分依然使用已有的 php-fpm 模式来运行.

使用本项目, frontend 和 backend 的运行方式会有所变更.

在以前的方式中, 我们会在入口文件 include 所有配置, 然后 new Application 使系统运行起来. 在现在的新方式中, 我们的配置会在服务运行起来时就加载到内存, 节省了上面加载配置的时间.

我们需要在 console/config/params.php 中加入类似以下的代码:

配置好后, 我们执行 ./yii server/http frontend, 就可以启动 swoole 服务器了.


All versions of workerman-yii2 with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.0
workerman/workerman Version ^3.3.4
yiisoft/yii2 Version ^2.0
yiisoft/yii2-bootstrap Version ~2.0.0
yiisoft/yii2-swiftmailer Version ~2.0.0
yiisoft/yii2-redis Version ^2.0
pbweb/xhprof Version ^1.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 mdx86/workerman-yii2 contains the following files

Loading the files please wait ....