Skip to content

feat(opcache): wire the binary-patch pipeline to the hot-swap API #122

Closed

Description

@lisachenko

Follow-up to the OpCache binary-file API (#111, merged). The headline unlock, explicitly deferred.

Connect the file-cache patch pipeline (BinaryCacheFile / ReflectionOpcacheFile) with the runtime hot-swap feature (#107: ReflectionFunction::redefine(), HotSwap/ClassDelta): take a patched image and apply it to already-loaded functions/classes in a live process, rather than only influencing the next include. This is what makes AOP / transpiling / source-protection work on live code.

Scope: define a bridge that diffs a patched ReflectionOpcacheFile against the live entries and drives redefine() / ClassDelta::apply() for the changed bodies, respecting the existing SHM-immutability rules (copy-out for immutable global functions; rejection where a writable per-process slot doesn't exist). Likely builds on #121 for the SHM case.

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