pusher / pusher-http-php

PHP library for interacting with the Pusher Channels HTTP API
https://pusher.com/docs/server_api_guide
1.42k stars 309 forks source link

support php8.1,please. #336

Closed phpmac closed 2 years ago

phpmac commented 2 years ago

Dependency resolution completed in 0.001 seconds
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - pusher/pusher-php-server[3.0.0, v3.0.1, v3.0.2, v3.0.3, v3.0.4, v3.1.0, v3.1.1, v3.2.0, v3.3.0, v3.3.1] require php ^5.4 || ^7.0 -> your php version (8.1.6) does not satisfy that requirement.
    - pusher/pusher-php-server v3.4.0 requires php >=5.4 <7.3 -> your php version (8.1.6) does not satisfy that requirement.
    - pusher/pusher-php-server v3.4.1 requires php >=5.4 <7.4 -> your php version (8.1.6) does not satisfy that requirement.
    - Root composer.json requires pusher/pusher-php-server ~3.0 -> satisfiable by pusher/pusher-php-server[3.0.0, v3.0.1, v3.0.2, v3.0.3, v3.0.4, v3.1.0, v3.1.1, v3.2.0, v3.3.0, v3.3.1, v3.4.0, v3.4.1].
    - ```
benjamin-tang-pusher commented 2 years ago

Our 7.0.2 pusher-http-php supports 8.1.8 running on my machine. It looks like you've specified an old version ^3, but we don't support that old a version anymore.

stesvis commented 2 years ago

I get this exception:

Package pusher/pusher-php-server at version ~3.0 has a PHP requirement incompatible with your PHP version, PHP extensions and Composer version:

  • pusher/pusher-php-server v3.4.1 requires php >=5.4 <7.4 which does not match your installed version 8.0.9.

Because I followed the official documentation which tells you to run: composer require pusher/pusher-php-server "~3.0"

Is it ok to install it without specifying the version? composer require pusher/pusher-php-server

phpmac commented 2 years ago

it's ok,

djurovicigoor commented 2 years ago

@stesvis For me, Version 5.0.2 works with PHP 8.1. Other versions were broken with php8.1

stesvis commented 2 years ago

pusher-php-server

With composer require pusher/pusher-php-server I got version 7.0.2

sonologico commented 2 years ago

Php 8.1 is supported on recent versions (such as 7.0.2). Closing this as solved.