-
Notifications
You must be signed in to change notification settings - Fork 856
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecation warning when using PHP 8.1 #1237
Comments
Are PR's being accepted on this? |
Hi @felipeEddy , thank you for the report here. I'd love to get these warnings resolved. How are they surfacing for you? This particular case is only possible if calling the magic |
Hey @dcr-stripe, simply loading the bindings in an 8.1 environment will spit out a lot of notices that need to be taken care of. Here are some other examples:
OP used a Code Sniffer I believe. |
Which version of stripe-php are you using @moonbas3 ? These warnings today should already be suppressed by Locally, if I check my PHP version:
and pull in stripe-php v8.7.0 (latest), I don't get these deprecation warnings: <?php
require_once('vendor/autoload.php');
$stripe = new \Stripe\StripeClient('sk_test_123'); I do however get them for other PHP interactions outside of Stripe (eg. with composer, symfony, etc.). So I'm wondering if there's a misconfiguration somewhere 🤔 |
There is #1273 which should fix the ones coming from |
@dcr-stripe Some are caused by PHP Deprecated and others are caused by User Deprecated (e.g., Symfony). @franmomu Nice! Any chance PHPDoc blocks for the below functions can be included in your PR?
|
👍 yeah sure, it's done. |
Has this issue been resolved because I just pulled v9.5 and still get the errors when running php 8.0: [08-Sep-2022 18:47:02 America/Chicago] PHP Deprecated: Return type of Stripe\Util\CaseInsensitiveArray::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home3/degiveco/public_html/rv/includes/stripe/vendor/stripe/stripe-php/lib/Util/CaseInsensitiveArray.php on line 44 |
$ composer require stripe/stripe-php
same issue using php 8.1 |
Any plans on fixing this? |
Hello, thank you for writing in @degive and @adamz01h. I am unable to reproduce the deprecation warnings myself on recent versions of
This seems to indicate that the Can you double-check the version of |
I'm closing, as I suspect this is an environmental issue. Please do re-open if you can demonstrate deprecation warnings in the latest version - ideally with a sample project and reproduction steps! |
I downloaded the latest version and it seems to work fine. Thank you! |
I still have these errors running: PHP 8.1.29 |
There are new rules with the PHP 8.1 update, some fixes must be done in order to prevent errors and warnings. Example below:
I'm current using version v7.112.0.
The text was updated successfully, but these errors were encountered: