-
Notifications
You must be signed in to change notification settings - Fork 20
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Solve #161 |
Fantastic, great work. Thank you. |
As I am directly implementing this in my ext-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 |
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.