Skip to content

Conversation

Xenira
Copy link
Collaborator

@Xenira Xenira commented Feb 20, 2025

BREAKING CHANGE: The old macros were dependent on execution order and have been causing trouble with language servers. They are replaced by a builder. See the migration guide at https://davidcole1340.github.io/ext-php-rs/migration-guides/v0.14.html for information on how to migrate.

Fixes: #99, #131, #327
Refs: #174, #335

@Xenira Xenira force-pushed the macro-state-deprecation-v2 branch from c00a928 to 8bc33fb Compare February 20, 2025 22:56
@Xenira Xenira marked this pull request as draft February 20, 2025 22:56
@Xenira
Copy link
Collaborator Author

Xenira commented Feb 20, 2025

Decided to go with builder pattern and move the outer macro back in priority. Would still like to have it, but there are some cases that really need a builder, so this is the foundation.

@Xenira Xenira force-pushed the macro-state-deprecation-v2 branch 14 times, most recently from 4253a65 to f46ca0a Compare February 27, 2025 19:21
@Xenira
Copy link
Collaborator Author

Xenira commented Feb 27, 2025

So this is a chonker...

Most of it is taken from #174 which already had some review. I tried to rebase onto current master, but it was to old to get that done cleanly.

I pulled what I could and integrated it with the new stuff and added stubs back in.

@Xenira Xenira marked this pull request as ready for review February 27, 2025 19:25
@Xenira Xenira self-assigned this Feb 27, 2025
Xenira and others added 2 commits February 27, 2025 23:36
migrate outdated builder to current version

BREAKING CHANGE: The old macros were dependent on execution order and have been causing trouble with language servers. They are replaced by a builder. See the migration guide at https://davidcole1340.github.io/ext-php-rs/migration-guides/v0.14.html for information on how to migrate.

Fixes: #99, #131, #327
Refs: #174, #335
Co-authored-by: David Cole <[email protected]>
Co-authored-by: Pierre Tondereau <[email protected]>
Co-authored-by: Daniil Gentili <[email protected]>
@Xenira Xenira force-pushed the macro-state-deprecation-v2 branch from f46ca0a to aeed538 Compare February 27, 2025 22:38
Copy link
Contributor

@joelwurtz joelwurtz left a comment

Choose a reason for hiding this comment

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

Make some comment about API and doc, like i have said in the original PR i think this is the best for the future.

Did not look at the implementation, not that much time, but IMO if the API is good implementation can always be fixed later

@Xenira Xenira force-pushed the macro-state-deprecation-v2 branch from aeed538 to 6db05a4 Compare March 1, 2025 23:12
@Xenira Xenira requested a review from joelwurtz March 2, 2025 11:21
@Xenira Xenira force-pushed the macro-state-deprecation-v2 branch 2 times, most recently from 91a1ae8 to 8060a79 Compare March 2, 2025 19:33
Other solutions require unstable features
@Xenira Xenira force-pushed the macro-state-deprecation-v2 branch from 8060a79 to b6724f0 Compare March 2, 2025 19:35
@Xenira
Copy link
Collaborator Author

Xenira commented Mar 10, 2025

I'll just merge this now. Has been open long enough for comments.

Lets just wait a bit longer before the next release to find issues.

@Xenira Xenira merged commit dff9b53 into master Mar 10, 2025
33 checks passed
@Xenira Xenira deleted the macro-state-deprecation-v2 branch March 11, 2025 12:35
.parse_meta()
.map_err(|_| anyhow!("Unable to parse attribute."))?;
fn get_method_props<'a>(self) -> ::std::collections::HashMap<&'static str, ::ext_php_rs::props::Property<'a, #path>> {
todo!()
Copy link
Collaborator

Choose a reason for hiding this comment

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

It looks like this was never fixed, so actually getters / setters don't work at all right now

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.

Spurious macro errors during development Implicit #[php_module] can be akward Rust analyzer macro expansion errors
3 participants