Skip to content

PHPC-2004: Use tentative return types for BSON interface toString methods #1283

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

Merged
merged 1 commit into from
Dec 14, 2021

Conversation

jmikola
Copy link
Member

@jmikola jmikola commented Dec 8, 2021

https://jira.mongodb.org/browse/PHPC-2004

This should avoid the BC break introduced in 6c82ec8. PHP 8.1 will automatically add return type info for Stringable, which means the ReturnTypeWillChange attribute should not be necessary on userland classes.

@jmikola
Copy link
Member Author

jmikola commented Dec 8, 2021

I also tested this PR with PHP's master branch (8.2-dev) and there seems to be no conflict between tentative return type info for interface __toString methods and the Stringable behavior previously discussed on internals.

Note: Compiling 8.2-dev did require a small addition to config.m4 to work around a memrchr issue: php/php-src@067df26#commitcomment-61570954

@jmikola jmikola requested a review from sgolemon December 9, 2021 14:40
…hods

This should avoid the BC break introduced in 6c82ec8. PHP 8.1 will automatically add return type info for Stringable, which means the ReturnTypeWillChange attribute should not be necessary on userland classes.
@jmikola jmikola merged commit a039df7 into mongodb:master Dec 14, 2021
@jmikola jmikola deleted the phpc-2004 branch December 14, 2021 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant