#miaina_code
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1278714219159879764
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hello
Can you tell me more about exactly what you are trying to do here?
And can you share your code snippet that is triggering this error?
Hello thank you for you time
Well We're using Stripe-php library
with PHP 8.2 application
and this error message is triggered every time now
Sure but where is that error coming from
I need way more details to be able to help you
We have a Symfony 6.4 project
with PHP 8.2 and the library use a dynamic attribute
Have you added logs to your code to figure out where specifically that error is coming from?
which is deprecated by php
We noticed the problem when we installed the stripe-php library
within our project
(in production we don't use php 8.2 nor the last version of stripe-php library) so we don't have the problem
Then like the error states it seems you are attempting to do something in your code that is deprecated on a newer PHP version. For instance, the Stripe PHP SDK starts using PHP 8.2 as of 12.4.0: https://github.com/stripe/stripe-php/blob/master/CHANGELOG.md#1240---2023-09-21
I can't help you much with this -- if you want to use newer versions of PHP / our SDK then you need to make sure your code is compatible
The first thing to do is track down what in your code is triggering that error on newer versions of PHP
yes
Stripe/Collection is not compatible with php 8.2
that's what I'm telling you
That is not true
Right so you did custom things
No
Our SDK is compatible with the corresponding versions of PHP
As we note in our Changelog
It is likely the case that your code is based on an old version of PHP which after upgrading our SDK it is no longer compatible
So you have to ensure that you update your code as well if you want to update the Stripe PHP SDK version
no
our code is in full php 8.2
and php 8.2 did deprecat the dynamic attribute
there's a dynamic attribute and Stripe/Collection class
as I mention in my request
$_requestParams;
for the moment to make it work we did add " protected $_requestParams;" in Stripe/Collection
Okay let's pause.
You are saying there is a bug in the newest version of the Stripe PHP SDK when using PHP 8.2, correct?
Specifically version 15.7.0 of the Stripe PHP SDK
yes
I would not say bug
i would say that for PHP 8.2 or newer version
it will not work
Okay, what is a minimal code sample that will reproduce the error that you are seeing?
Well I'm using a framework (symfony 6.4) with stripe-php. So It crashes during the init. I guess just a simple script with the stripe library will be sufficient. may be a code which use Stripe/Collection
Yeah sorry that isn't going to do it -- I need something much more specific. We have many users that use PHP 8.2 with new versions of our SDK and we have not heard of this error before. Without a specific repro I can't help you here. If you want, I'd recommend either posting an issue on the stripe-php Github repo with full details or writing into our Support team via https://support.stripe.com/contact/login with full details and a way to reproduce the error.