Skip to content
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

Support for readonly classes #559

Closed
stof opened this issue Aug 22, 2022 · 7 comments
Closed

Support for readonly classes #559

stof opened this issue Aug 22, 2022 · 7 comments
Labels

Comments

@stof
Copy link
Member

stof commented Aug 22, 2022

https://wiki.php.net/rfc/readonly_classes

@stof stof added the PHP8.2 label Aug 22, 2022
@kschatzle
Copy link
Contributor

@stof anyone working on the PHP8.2? Don't want to duplicate work, but I can pick these up.

@kschatzle
Copy link
Contributor

Was playing around with this idea. Essentially make the underlying "testing" class be capable of being readonly. Can't be sure if this is a good idea, just playing with it.

https://gist.github.com/kschatzle/5394a3abc427659d21ef6f854e01c0f6

@stof
Copy link
Member Author

stof commented Sep 5, 2022

@kschatzle not that I'm aware off.

@stof
Copy link
Member Author

stof commented Sep 5, 2022

Note that the initial compat with PHP 8.2 might be to have a clear error message saying that doubling a readonly class is not supported yet, in case supporting this case require more time.

@kschatzle
Copy link
Contributor

Ok, yeah, I saw some isFinal checks in various places. I could see a similar isReadOnly() working similar.

@ciaranmcnulty
Copy link
Member

Yeah I've not seen any activity on it so go ahead if you have the time

@kschatzle
Copy link
Contributor

kschatzle commented Sep 9, 2022

Initial support as requested. #564

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants