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

Does not work with php 8.4 #1455

Open
tacman opened this issue Nov 6, 2024 · 9 comments
Open

Does not work with php 8.4 #1455

tacman opened this issue Nov 6, 2024 · 9 comments
Labels
dependencies Pull requests that update a dependency file enhancement reflection compatibility

Comments

@tacman
Copy link
Contributor

tacman commented Nov 6, 2024

Can 8.4 be added? Right now, composer.json locks this library to 8.2 or 8.3

@Ocramius
Copy link
Member

Ocramius commented Nov 6, 2024

Only once all has been tested for 8.4: parser, stubs, and new PHP 8.4 functionality.

The reflection API changed a lot, which may lead to a new major release.

@Ocramius Ocramius added reflection compatibility dependencies Pull requests that update a dependency file enhancement labels Nov 6, 2024
@tacman
Copy link
Contributor Author

tacman commented Nov 6, 2024

Indeed! Here's an interesting thread on the topic.

https://discourse.thephp.foundation/t/php-dev-asymmetric-visibility-reflection-api-problems/634/2

Should I keep this issue open? PHP 8.4 will be released later this month, as I'm sure you already know.

Thanks for the great library.

@Ocramius
Copy link
Member

Ocramius commented Nov 6, 2024

You can keep the issue open: it is worth noting that 8.4 support may likely arrive sometime next year though.

@tacman
Copy link
Contributor Author

tacman commented Nov 6, 2024

Is there any way to allow this to run with php 8.4 and not support any of the new features?

I have a maker-bundle that uses this library to read through properties and generate some stubs. I tried bumping a project to 8.4 today that uses the maker-bundle and so it failed as not being installable. I don't really want any of the new features, I just want to install the library.

That it, I uses better-reflection for a tiny part, and don't want to be blocked from installation because of it.

My gut feeling is that if composer had ^8.3, all of my existing code would run, but it wouldn't properly reflect 8.4 code, but that it would work with php 8.3 code running under php 8.4.

Does that make sense? I want my main application to run 8.4, even if better-reflection doesn't work for new 8.4 features.

@Ocramius
Copy link
Member

Ocramius commented Nov 6, 2024

It's not a priority, and it's not a healthy tradeoff to make "just to have something", especially since we extend core API.

Running on PHP 8.3 is just fine, FWIW, until you get your dependencies upgraded.

Alternatively, actively work on implementing PHP 8.4 features here :-)

@tacman
Copy link
Contributor Author

tacman commented Nov 6, 2024

understood! I'm just excited about property hooks, can't wait to get rid of boilerplate getters and setters.

@Ocramius
Copy link
Member

Ocramius commented Nov 6, 2024

Ya, that's part of what needs to be implemented here, in fact, before we can say that we allow PHP 8.4, otherwise it's just a lie / breach of contract.

@tacman
Copy link
Contributor Author

tacman commented Nov 6, 2024

Hmm. I don't think it's a lie to run php 8.4 and only support reflecting php 8.3. But I hear what you're saying.

@Ocramius
Copy link
Member

Ocramius commented Nov 6, 2024

I'd rather have a clear boundary, than a very blurry one :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file enhancement reflection compatibility
Projects
None yet
Development

No branches or pull requests

2 participants