- Notifications
You must be signed in to change notification settings - Fork20
feat: Add preliminary support for enums#201
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Solve#161 |
c66a28f
intophper-framework:masterUh oh!
There was an error while loading.Please reload this page.
frederikbosch commentedApr 6, 2025
Fantastic, great work. Thank you. |
frederikbosch commentedApr 6, 2025
As I am directly implementing this in myext-fs-notify library, I am wondering how to construct an enum from the Rust side. I'd like to return it from a method. I can add a docs-PR for that once I know how to do it. |
Your request requires further improvement of the enums API, using the PHP function |
frederikbosch commentedApr 6, 2025
That's great. I wish I could you with that, but I am afraid I can't. The knowledge gap I have to bridge is one I cannot make right now. Thanks again for your efforts. |
|
This pull request introduces significant changes to the
phper
project, adding support for PHP enums, improving documentation, and making several internal adjustments to enhance functionality and maintainability.Enum Support:
phper::enums
to provide Rust wrappers for PHP enum functionality, supporting pure enums, integer-backed enums, and string-backed enums.phper-build/src/lib.rs
to include configuration forphper_enum_supported
when PHP version is 8.1 or higher.phper-doc/doc/_06_module/_08_register_enum/index.md
.phper-doc/src/lib.rs
to include the new enum registration documentation module.phper-sys/php_wrapper.c
.Documentation and Configuration:
Cargo.toml
to include thesealed
crate and updated documentation configurations.[1][2]phper/src/lib.rs
.Internal Adjustments:
phper/src/classes.rs
public within the crate for broader usage.[1][2][3][4][5]EnumEntity
in thephper/src/modules.rs
module imports.