laravel-notification-channels / webpush

Webpush notifications channel for Laravel.
http://laravel-notification-channels.com
MIT License
681 stars 119 forks source link

\Safe\Resource error when installing package #177

Closed dkvhin closed 2 years ago

dkvhin commented 2 years ago

PHP : 8.1 Laravel 9

When installing, I'm getting the followig warning and error

PHP Warning: "resource" is not a supported builtin type and will be interpreted as a class name. Write "\Safe\resource" or import the class with "use" to suppress this warning in D:\xampp\htdocs\rland\vendor\thecodingmachine\safe\generated\sockets.php

integer" will be interpreted as a class name. Did you mean "int"? Write "\Safe\integer" or import the class with "use" to suppress this warning

githesix commented 2 years ago

This package requires: minishlink/web-push ^7.0 that requires: web-token/jwt-util-ecc ^2.0|^3.0.2 that requires: thecodingmachine/safe ^0.1.14 that's getting too old to work with PHP8.1

Installing the latest version of web-token/jwt-util-ecc updates thecodingmachine/safe and solves the warning

pablomadariaga commented 2 years ago

I have the same problem i am using laravel v9.24.0 and php 8.1.9

image

adeiming commented 2 years ago

same here

dkvhin commented 2 years ago

This package requires: minishlink/web-push ^7.0 that requires: web-token/jwt-util-ecc ^2.0|^3.0.2 that requires: thecodingmachine/safe ^0.1.14 that's getting too old to work with PHP8.1

Installing the latest version of web-token/jwt-util-ecc updates thecodingmachine/safe and solves the warning

Worked.

Thank You :)

pablomadariaga commented 2 years ago

@dkvhin How can I perform this update?

dkvhin commented 2 years ago

@dkvhin How can I perform this update?

Just execute

composer require web-token/jwt-util-ecc

This will install the latest package with the updated dependencies

pablomadariaga commented 2 years ago

@dkvhin¿Cómo puedo realizar esta actualización?

solo ejecuta

composer require web-token/jwt-util-ecc

Esto instalará el paquete más reciente con las dependencias actualizadas

thank you very much it worked

Mir-37 commented 1 year ago

I am still stuck on this! My php version is 8.0.28 and composer won't even let me force update "web-token/jwt-utill-ecc", any solution?