- Register shutdown function to clear reflection resolver caches in embed SAPI
- Add test to verify library builds exclude executable process title sources
- Remove embed-specific request cache clearing from module shutdown
- Add tests for embed binary module ordering behavior
- Implement temporary module storage switching for interned strings
- Add pre-shutdown functions for AST constant cleanup in embed mode
- Update platform detection to search multiple library directories
- Add test case for finding embed libraries outside standard lib dir
- Modify module initialization to handle persistent/temporary module types correctly
if ($releaseAstConstantFns !== []&& $this->isBuildModeExt()) {
// Lifecycle contract for persistent enum-case AST constants: Zend's
// internal-class teardown (destroy_zend_class) only tolerates them
// after this module's MSHUTDOWN has released them. A temporary
@ -1666,7 +1666,20 @@ CODE;
if ($releaseAstConstantFns !== [] && str_contains($registrationCode, 'return FAILURE')) {
throw new \LogicException('MINIT must not fail after class registration begins: a FAILURE return would leave persistent enum-case AST constants in the class table with no MSHUTDOWN guaranteed to release them before destroy_zend_class(). Move the fallible step before the first register_class_*() call, or release the AST constants on its failure path.');
}
// A module loaded after request startup normally uses request-local
// interned strings. Internal class metadata (notably enum cases and