Skip to content

Declare type for Exception::$message and Error::$message #6962

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

kocsismate
Copy link
Member

Although I proposed not to declare these property types in #6891 (comment) with respect to BC, I realized afterwards that both the related constructor parameter and the getter's return type is declared as string since PHP 8.0, so I'm wondering if we could yet add these types?

@nikic
Copy link
Member

nikic commented May 10, 2021

@nikic
Copy link
Member

nikic commented May 10, 2021

I think it would be good to add a test for this kind of usage, so we don't break it in the future.

@kocsismate
Copy link
Member Author

Ah, thank you for the example. I'm closing the PR then :) If I'll have time, I'll try to add a test for this!

@kocsismate kocsismate closed this May 10, 2021
@kocsismate kocsismate deleted the exception-message-declare branch May 10, 2021 08:49
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.

2 participants