Skip to content

php 8.4 compatibility #183

@pavimus

Description

@pavimus

I'm getting following error with php 8.4:

yii\base\ErrorException: Pushok\Response::__construct(): Implicitly marking parameter $deviceToken as nullable is deprecated, the explicit nullable type must be used instead in /var/www/gallerist_pro/vendor/edamov/pushok/src/Response.php:151
Stack trace:
#0 /var/www/gallerist_pro/vendor/composer/ClassLoader.php(576): yii\base\ErrorHandler->handleError()
#1 /var/www/gallerist_pro/vendor/composer/ClassLoader.php(576): include()
#2 /var/www/gallerist_pro/vendor/composer/ClassLoader.php(427): {closure:Composer\Autoload\ClassLoader::initializeIncludeClosure():575}()
#3 /var/www/gallerist_pro/vendor/edamov/pushok/src/Client.php(164): Composer\Autoload\ClassLoader->loadClass()
#4 /var/www/gallerist_pro/components/APNSBase.php(57): Pushok\Client->push()
#5 /var/www/gallerist_pro/components/APNS.php(245): app\components\APNSBase->flush()
#6 /var/www/gallerist_pro/components/AppNotification.php(70): app\components\APNS->sendUpdateBadgeNotification()

Line 151 in Response.php must be changed from

public function __construct(int $statusCode, string $headers, string $body, string $deviceToken = null)

to

public function __construct(int $statusCode, string $headers, string $body, ?string $deviceToken = null)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions