Download the PHP package colornet/htcc without Composer

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

component-require

注册异常处理器

在rpc接口服务配置下新增 Ericjank\Htcc\Exception\Handler\TransactionException::class

例如:

在需要进行事务处理的第一个方法体添加注解

如未设置confirm和cancel方法 则默认以调用方法开头以Confirm或Cancel作为方法后缀自动调用

实现try, confirm,cancel方法

被调用端接口需实现try, confirm,cancel方法, 方法内如发生错误需要抛出 Ericjank\Htcc\Exception\RpcTransactionException 异常
, 才能被上层接口捕获并进行相应的处理 为了不影响接口自身在非事务情况下的使用(或者说兼容事务与非事务两种情况),可以使用 inRpcTrans() 方法判断当前是否在rpc事务中,仅在事务中抛出 RpcTransactionException 异常,其他情况则按照原有流程正常执行即可;

也可以用函数 rpcTransCallback 进行简化处理

使用 Ericjank\Htcc\Catcher 处理分布式事务防悬挂、空回滚等问题

try 阶段

通过注入 Ericjank\Htcc\Catcher 获取对象 $this->catcher

confirm 阶段

cancel 阶段

函数


All versions of htcc with dependencies

PHP Build Version
Package Version
Requires hyperf/snowflake Version ~1.1.0
hyperf/di Version ~1.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 colornet/htcc contains the following files

Loading the files please wait ....