swoole hooks can be compiled if pgsql/sqlite are not compiled in statically

This commit is contained in:
DubbleClick
2025-08-25 11:09:02 +07:00
parent af90b840ee
commit e975e151f9
3 changed files with 3 additions and 3 deletions

View File

@@ -20,7 +20,7 @@ class swoole_hook_sqlite extends Extension
public function validate(): void
{
// pdo_pgsql need to be disabled
if ($this->builder->getExt('pdo_sqlite') !== null) {
if ($this->builder->getExt('pdo_sqlite')?->isBuildStatic()) {
throw new WrongUsageException('swoole-hook-sqlite provides pdo_sqlite, if you enable sqlite hook for swoole, you must remove pdo_sqlite extension.');
}
}