Giter VIP home page Giter VIP logo

pushover-php's People

Contributors

oskarstark avatar slunak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

oskarstark

pushover-php's Issues

Error validation subscription keys: Undefined property: stdClass::$licenses

We're using Pushover and this great wrapper for our application to notify users about upcoming events. For easy handling we're using the Pushover Subscription API, so instead of user keys, we have subscription keys. Other as stated in the Pushover documentation, the response seems to not contain the licenses for the user. This leads to an error:

Undefined property: stdClass::$licenses
in serhiy/pushover/src/Client/Response/UserGroupValidationResponse.php in line 103

Steps to reproduce:

1.) Acquire subscription key via Pushover Subscription API
2.) Try to validate using Serhiy\Pushover\Api\UserGroupValidation\Validation

$application = new Application($appId);
$validation = new Validation($application);
$recipient = new Recipient($subscriptionKey);

$response = $validation->validate($recipient);

The last line throws this message

Potential fix:

Check if response contains licenses data prior to accessing it. Since PHP 7 it is possible to use null-coalesence operator ??.
Replace line 103 as follows:

$this->setLicenses($decodedCurlResponse->licenses ?? []);

Thank you for your great work!

Best regards,
Sebastian

Drop support for PHP versions 7.1, 7.2 and 7.3

I will be dropping support for PHP versions 7.1, 7.2 and 7.3, making version 7.4 a minimal required version to run this library. The library version number will be incremented from 1.2.0 to 2.0.0. I will then stop supporting the version 1.2.0.

Update: After dropping mentioned PHP versions, the library minor version will be incremented, e.g. 1.3.0.

Deprecations warnings when running tests on PHP 8.2

PHPUnit 9.5.27 by Sebastian Bergmann and contributors.

.PHP Deprecated:  strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /Users/serhiy/code/pushover/pushover-php/src/Api/Glances/GlanceDataFields.php on line 70
.
Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /Users/serhiy/code/pushover/pushover-php/src/Api/Glances/GlanceDataFields.php on line 70
PHP Deprecated:  strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /Users/serhiy/code/pushover/pushover-php/src/Api/Glances/GlanceDataFields.php on line 93
.
Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /Users/serhiy/code/pushover/pushover-php/src/Api/Glances/GlanceDataFields.php on line 93
PHP Deprecated:  strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /Users/serhiy/code/pushover/pushover-php/src/Api/Glances/GlanceDataFields.php on line 116
.
Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /Users/serhiy/code/pushover/pushover-php/src/Api/Glances/GlanceDataFields.php on line 116

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.