phpfastcache / couchbasev4-extension
Phpfastcache Couchbase v4 扩展
9.2.1
2024-04-29 20:36 UTC
Requires
- php: >=8.0
- ext-couchbase: ^4.0
- couchbase/couchbase: ^4.2.1
- phpfastcache/phpfastcache: ^9.2
Requires (Dev)
- jetbrains/phpstorm-stubs: dev-master
- phpfastcache/phpfastcache-devtools: ^9.2
- phpmd/phpmd: @stable
- phpstan/phpstan: ^1.5
- squizlabs/php_codesniffer: @stable
Suggests
- ext-pcntl: *
- ext-posix: *
This package is auto-updated.
Last update: 2024-09-01 22:33:30 UTC
README
欢迎合并请求,但需要通过测试和质量工具
(必须在存储库根目录下运行命令)
PHPCS, PHPMD, PHPSTAN (Level 6), 单元测试
composer run-script quality
composer run-script tests
# In case you want to fix the code style automatically:
./vendor/bin/phpcbf lib/ --report=summary
支持 & 安全
此扩展的支持必须发布到主 Phpfastcache 存储库。
Composer 安装
composer install phpfastcache/couchbasev4-extension
⚠️ 此扩展需要
1️⃣ PHP Couchbase
扩展 4.x 及以上版本
2️⃣ composer Couchbase/Couchbase
库 4.x 及以上版本
⚠️ 此扩展可选需要
1️⃣ PHP Posix
扩展,用于使用 pcntl_fork()
进行进程分叉。
要正确分叉一个 PHP 进程,您需要通知 Couchbase diver 准备分叉。
⚠️ 警告 您 必须 在调用 pcntl_fork()
之前调用驱动程序的 Phpfastcache\Drivers\Couchbasev4\Driver::prepareToFork()
,否则子进程会锁定。
示例
try { \Phpfastcache\Drivers\Couchbasev4\Driver::prepareToFork(); $pid = pcntl_fork(); if ($pid == -1) { // There was a problem with forking the process } else if ($pid) { // continue parent process operations } else { // continue child process operations } } catch (PhpfastcacheDriverCheckException) { // the driver did not allow you to fork the process }
2️⃣ 如果您计划为此项目做出贡献并在推送合并请求之前运行测试,则还需要 PHP Pcntl
。