\Swoole\Database\PDOConfig class not found @ 22.0.0
yespire opened this issue · comments
- What did you do? If possible, provide a simple script for reproducing the error.
var_dump(class_exists('\Swoole\Database\PDOConfig'));
- What did you expect to see?
TRUE
- What did you see instead?
FALSE
- What version of OpenSwoole are you using (show your
php --ri openswoole
)?
openswoole 22.0.0 stable
installed with:
enable sockets supports? [no] : yes
enable openssl support? [no] : yes --with-openssl-dir=/opt/homebrew/opt/openssl
enable http2 support? [no] : yes
enable mysqlnd support? [no] : yes
enable hook curl support? [no] : yes
enable postgres support? [no] :
- What is your machine environment used (show your
uname -a
&php -v
&gcc -v
) ?
Darwin loc-ye 21.6.0 Darwin Kernel Version 21.6.0: Mon Aug 22 20:19:52 PDT 2022; root:xnu-8020.140.49~2/RELEASE_ARM64_T6000 arm64
Example of using PDOPool in v22 is added: https://github.com/openswoole/openswoole/blob/master/example/src/Coroutine/MySQLClientPool.php
Still class not-existing error
I tried the on Centos and Mac, here is my test code:
var_dump("OpenSwoole class: " . (int)class_exists('\OpenSwoole\Core\Coroutine\Pool\ClientPool'));
Output:
OpenSwoole class: 0
You have to install openswoole/core library.