Skip to content
This repository has been archived by the owner on Jun 14, 2023. It is now read-only.

PHP 8 Compatible? #20

Open
programster opened this issue Jun 30, 2021 · 2 comments
Open

PHP 8 Compatible? #20

programster opened this issue Jun 30, 2021 · 2 comments

Comments

@programster
Copy link

programster commented Jun 30, 2021

Hey there,
When I tried to install the package, I got the following error message:

  [InvalidArgumentException]                                                           
  Package pachico/slim-swoole has a PHP requirement incompatible with your PHP versio  
  n, PHP extensions and Composer version:                                              
    - pachico/slim-swoole requires php ^7.0 which does not match your installed versi  
  on 8.0.7.                                                                            
    - pachico/slim-swoole requires dflydev/fig-cookies ^1.0 but it is not present.     
    - pachico/slim-swoole requires psr/http-message ^1.0 but it is not present.

Selection_236

I see that the composer.json file has the following configuration:

    "require": {
        "php": "^7.0",
        "dflydev/fig-cookies": "^1.0",
        "psr/http-message": "^1.0"
    },

Is this as easy as changing it to:

    "require": {
        "php": "^7.0|^8.0",
        "dflydev/fig-cookies": "^1.0",
        "psr/http-message": "^1.0"
    },

... or would this cause other issues?

In the meantime, I added the following to my composer.json in order to install the package successfully, and I will have to make sure the environment is PHP 7.4 when I run it in Docker.

    "config": {
        "platform" : {
            "php": "7.4.0"
        }
    }
@jsanahuja
Copy link

This worked for me https://github.com/imefisto/psr-swoole-native. And it is also in the Swoole documentation https://openswoole.com/article/swoole-and-psr

@pachico
Copy link
Owner

pachico commented Apr 26, 2022

This project will loose its reason to exist once OpenSwoole will implement PSR compliant Requests and Responses.
At the moment:

  • it doesn't support latest PHP versions
  • it doesn't support latest OpenSwoole versions either
  • its purpose will be irrelevant soon

This means I'm just keeping this for reference but I discourage people from using it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants