Download the PHP package buexplain/arg without Composer

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

参数描述类

本包解决的问题是,参数通过map传递导致参数无法被编辑器识别的问题。

良好的代码,从能被编辑器识别开始。

注意,本包在hyperf、laravel框架下使用,其它框架下,需要实现Arg\AbstractArg 抽象类,实现方式非常简单,可参考Arg\BaseArgForHyperf

安装命令:composer require buexplain/arg

使用示例

以注册接口为例子,做个简单的示例。

第一步:构造一个注册接口需要的参数描述。

第二步:编写注册接口的控制器

第三步:实现注册逻辑

注意事项

在php8.2中,支持:null、false 和 true 作为独立的类型。 如果将一个类的属性设置为纯null、false 或 true类型,或者三者任意联合的类型,那么在注入外部参数的时候将无法正确转换为null、false 或 true,因为在反射类属性阶段,无法识别出该属性的类型,从而无法正确转换。

运行测试用例

Windows下用cmd跑:

swoole-cli.exe /cygdrive/c/buexplain/arg/vendor/bin/co-phpunit --prepend tests/bootstrap.php --configuration phpunit.xml --log-events-verbose-text phpunit.log

Linux: composer test


All versions of arg with dependencies

PHP Build Version
Package Version
Requires php Version >=8.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 buexplain/arg contains the following files

Loading the files please wait ....