Skip to content

ext/pdo_pgsql: Delete unused constants #18358

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
Closed

Conversation

vrana
Copy link
Contributor

@vrana vrana commented Apr 19, 2025

These constants were added by 6ed1819 but they are not used anymore.

They are undocumented which is why I've stumbled upon this.

@devnexen
Copy link
Member

devnexen commented Apr 19, 2025

If that s the case, you need to remove the entries in the related stub too and regenerate using build/gen_stub.php

@devnexen devnexen changed the title Delete unused constants ext/pdo_pgsql: Delete unused constants Apr 19, 2025
@vrana vrana requested a review from kocsismate as a code owner April 19, 2025 21:12
@devnexen
Copy link
Member

Would be good to have a NEWS and above all an UPGRADING entry.

These constants were added by 6ed1819 but they are not used anymore.

They are undocumented which is why I've stumbled upon this.
Copy link
Member

@devnexen devnexen left a comment

Choose a reason for hiding this comment

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

LCTM @SakiTakamachi please have a look

Copy link
Member

@SakiTakamachi SakiTakamachi left a comment

Choose a reason for hiding this comment

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

LGTM, thanks.

Just to be sure, I did a GitHub code search, but it seems there is no (public) code that uses these.

@DanielEScherzer
Copy link
Member

Is there any harm in keeping them around and deprecating them in 8.5? Just because they are not used on GitHub doesn't mean they aren't used somewhere offline

@vrana
Copy link
Contributor Author

vrana commented Jun 6, 2025

Like where? Do you have some example?

@devnexen
Copy link
Member

devnexen commented Jun 6, 2025

Is there any harm in keeping them around and deprecating them in 8.5? Just because they are not used on GitHub doesn't mean they aren't used somewhere offline

You could not know, but it would not make any sense, the driver only cares if the transaction is not idle and the precise state of the said transaction is not even acknowledged from the userland standpoint, only the raw pgsql extension does though.

@devnexen
Copy link
Member

devnexen commented Jun 6, 2025

gonna merge it @vrana I just forgot your PR

@devnexen devnexen closed this in e549ccb Jun 6, 2025
@bukka
Copy link
Member

bukka commented Jun 6, 2025

This is API break however so this should not be done no matter if they are used or not. You would need RFC for such change. @devnexen Please revert it.

@bukka
Copy link
Member

bukka commented Jun 6, 2025

The only way to drop them is through deprecation RFC

@bukka
Copy link
Member

bukka commented Jun 6, 2025

Well it would be probably also possible to create a separate RFC. In any case you cannot just drop constant through PR.

@devnexen
Copy link
Member

devnexen commented Jun 6, 2025

This is API break however so this should not be done no matter if they are used or not. You would need RFC for such change. @devnexen Please revert it.

done

@DanielEScherzer
Copy link
Member

You can add this to https://wiki.php.net/rfc/deprecations_php_8_5

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.

5 participants