Skip to content

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

Closed
wants to merge 1 commit into from

Conversation

kamil-tekiela
Copy link
Member

This constant was only available with MariaDB's libmysql.

@cmb69
Copy link
Member

cmb69 commented Jul 4, 2022

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 1.

@kamil-tekiela
Copy link
Member Author

@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.

@cmb69
Copy link
Member

cmb69 commented Jul 4, 2022

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?

@kamil-tekiela
Copy link
Member Author

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

@kocsismate
Copy link
Member

Pinging @ramsey @adoy @saundefined again, as FF is very close.

@saundefined
Copy link
Member

Sorry for the long reply, I'm closer to Christoph's position.
Perhaps others will disagree with me :)

@adoy
Copy link
Member

adoy commented Jul 18, 2022

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.

@kamil-tekiela
Copy link
Member Author

Done! The constant is deprecated and a test is added.

Copy link
Member

@cmb69 cmb69 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@kamil-tekiela kamil-tekiela requested a review from adoy July 18, 2022 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants