Skip to content

feat(opcache): relocate trait-using classes in cache binaries #114

Closed

Description

@lisachenko

Follow-up to the OpCache binary-file API (#111, merged).

PayloadRelocator refuses classes with num_traits > 0: (un)serializeClass() throws OpCacheException::unsupportedPayload('trait-using class relocation') (src/OpCache/PayloadRelocator.php:774, :807).

Scope: port the trait branch of zend_file_cache_(un)serialize_class — trait_names, trait_aliases, and trait_precedences (including the nested trait_method names and exclude_class_names), both directions.

Acceptance: a fixture class use-ing a trait (with an alias + precedence) round-trips byte-for-byte and executes from the patched cache.

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 requestopcacheIssue is related to opcache integration. Either doesn't work well or behaves incorrect.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions