upscalesoftware / swoole-session

PHP sessions compatibility with Swoole web-server
Apache License 2.0
9 stars 2 forks source link

Compatibility with openswoole #3

Closed attisan closed 2 years ago

attisan commented 2 years ago

Could this be compatible with openswoole? atm composer complains about the missing extension when using openswoole.

sshymko commented 2 years ago

@attisan The implementation should be compatible with both swoole and openswoole. Inability to install via Composer highlights a problem with an unfortunate split of the Swoole project. In Composer, there's no way to declare dependencies to require either one extension or the other.

The workaround is to install ignoring the platform requirement:

composer install --ignore-platform-req=ext-swoole
sshymko commented 2 years ago

@attisan The workaround to installing any ext-swoole dependencies is to declare the following in your project's composer.json:

{
    "replace": {
        "ext-swoole": "*"
    }
}

After that you'll be able to composer install normally.

I'm working on providing openswoole support. Meanwhile, please use the workaround above.