PHPackages                             cooper/canal-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. cooper/canal-client

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

cooper/canal-client
===================

A PHP client for Alibaba Canal, supporting native socket, Swoole, and Clue socket adapters.

v1.0.3(2y ago)616MITPHPPHP &gt;=8.0

Since Feb 18Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/myxiaoao/canal-client)[ Packagist](https://packagist.org/packages/cooper/canal-client)[ RSS](/packages/cooper-canal-client/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (3)Versions (5)Used By (0)

Canal Client
============

[](#canal-client)

[中文文档](README.zh-CN.md)

PHP client for [Alibaba Canal](https://github.com/alibaba/canal/wiki) — MySQL binlog incremental subscription and consumption middleware.

Forked from [canal-php](https://github.com/xingwenge/canal-php), with PHP 8.0+ and Swoole 5.0+ support.

Requirements
------------

[](#requirements)

- PHP &gt;= 8.0
- ext-sockets
- [google/protobuf](https://packagist.org/packages/google/protobuf) ^3.8

Optional:

- [ext-swoole](https://www.swoole.com/) — for Swoole adapter
- [clue/socket-raw](https://packagist.org/packages/clue/socket-raw) — for Clue socket adapter

Installation
------------

[](#installation)

```
composer require cooper/canal-client
```

Adapter Types
-------------

[](#adapter-types)

TypeConstantDescriptionNative Socket`CanalClient::TYPE_SOCKET`PHP native socket (ext-sockets)Swoole`CanalClient::TYPE_SWOOLE`Swoole coroutine clientClue Socket`CanalClient::TYPE_SOCKET_CLUE`clue/socket-raw libraryUsage
-----

[](#usage)

```
