Skip to content

Support for class modifiers (final, abstract, readonly) in extensions #67

Description

@nexxii04

What do you want?

Add support in the C-ABI extension system to register class modifiers such as final, abstract, and readonly.

Currently, the internal VM (ClassDef) already supports these flags and enforces them correctly, but the C-ABI (zphp_extension.h and extension.zig) does not provide any mechanism or flags to expose them when registering classes through register_class. We need a clean extension method (like a class_set_flags API function) to pass these modifiers from extensions without breaking ABI compatibility.

Why does it belong here?

This allows extensions written via the C-ABI to correctly define restricted, abstract, or readonly classes (similar to native PHP classes and internal zphp modules), ensuring proper object-oriented constraints and safety across extensions.

Alternatives considered

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions