-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Remove MYSQLI_IS_MARIADB constant #8919
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
Conversation
Hmm, to provide a more graceful upgrade experience, what about deprecating the constant for now, and to remove it later? And of course, remove the unused branch which defines it to |
@cmb69 We could do that, but this constant has only been added a few months ago and is pretty much useless in userland. I doubt we can find many usages of it in the wild. It was done mainly for PHPT, not to actually be used by PHP developers. I feel that a deprecation is unnecessary here. |
Well, the constant is available as of PHP 8.1.2, listed in the changelog and already documented in the manual. I don't think we should just drop it. @ramsey, what do you think about this? |
In GitHub there are some references to this constant: https://github.com/search?l=PHP&q=MYSQLI_IS_MARIADB&type=Code Most are from PHP source code copies, but we also have this:
|
According to https://grep.app/search?q=MYSQLI_IS_MARIADB&filter[lang][0]=PHP there are no uses of this constant in the wild apart from stubs and static analysers. As this constant was only useful with libmysql I would be in favour of just dropping it in PHP 8.2. It could only show which version of libmysql PHP was compiled with, which is useless now. The constant was only available in PHP 8.1 >= 8.1.2. See #7713 I leave it up to RMs to decide if it's ok to just drop the constant, or set it to always FALSE and deprecated in 8.2. @ramsey @adoy @saundefined |
Pinging @ramsey @adoy @saundefined again, as FF is very close. |
Sorry for the long reply, I'm closer to Christoph's position. |
Even if I agree that there are almost no chances removing this constant breaks any code, we should still deprecate it in 8.2 and remove it in next version. |
38ac5ae
to
a3e9e05
Compare
Done! The constant is deprecated and a test is added. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
This constant was only available with MariaDB's libmysql.