Download the PHP package imiphp/project-udp without Composer

On this page you can find all versions of the php package imiphp/project-udp. 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 project-udp

说明

这是一个 imi UDP 项目开发骨架项目,你可以基于这个项目来开发你的项目。

imi 框架:https://www.imiphp.com

imi 文档:https://doc.imiphp.com

安装

创建项目:composer create-project imiphp/project-udp:~2.1.0

如果你希望在 Swoole 运行 imi:composer require imiphp/imi-swoole:~2.1.0

配置

项目命名空间

默认是 ImiApp,可以在 composer.json 中修改:

然后替换代码中的命名空间即可。

运行配置

项目配置目录:config

UDP 服务器配置目录:UDPServer/config

启动命令

Swoole:vendor/bin/imi-swoole swoole/start

Workerman:vendor/bin/imi-workerman workerman/start

权限

.runtime 目录需要有可写权限

测试客户端

test-client 目录中附带了测试客户端,可以用于测试。

生产环境

关闭热更新:config/beans.phphotUpdate.status 设为 false

生产环境建议只保留一个容器,可以提升性能,imi 官方推荐使用 Swoole

移除 imi-workermancomposer remove imiphp/imi-workerman

移除 imi-swoolecomposer remove imiphp/imi-swoole(不推荐)

代码质量

格式化代码

内置 php-cs-fixer,统一代码风格。

配置文件 .php-cs-fixer.php,可根据自己实际需要进行配置,文档:https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/master/doc/config.rst

格式化项目: ./vendor/bin/php-cs-fixer fix

格式化指定文件: ./vendor/bin/php-cs-fixer fix test.php

代码静态分析

内置 phpstan,可规范代码,排查出一些隐藏问题。

配置文件 phpstan.neon,可根据自己实际需要进行配置,文档:https://phpstan.org/config-reference

分析项目: ./vendor/bin/phpstan

分析指定文件: ./vendor/bin/phpstan test.php

测试用例

内置 phpunit,可以实现自动化测试。

文档:https://phpunit.readthedocs.io/en/9.5/

测试用例 demo:tests/Module/Test/TestServiceTest.php

运行测试用例:composer test


All versions of project-udp with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
imiphp/imi Version ~2.1.0
imiphp/imi-workerman Version ~2.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 imiphp/project-udp contains the following files

Loading the files please wait ....