- Clarified that release binaries embed production Composer runtime as opcodes
- Updated project-release.yml to remove embedded vendor directory
- Revised README to explain development vs production build processes
- Updated Chinese documentation to reflect new build configuration
- Removed outdated comments about PHPT bootstrap initialization costs
- Documented proper usage of project.yml vs project-release.yml for different scenarios
- Add project-release.yml with embedded vendor files for standalone builds
- Implement YAML include mechanism in ProjectYamlLoader with circular reference detection
- Support single file or list of files in include directive with ordered merging
- Add recursive map merging and list replacement for included configurations
- Create CompilerProjectConfigurationTest to verify release compiler embedding
- Add ProjectYamlLoaderTest with comprehensive include scenarios
- Update GitHub workflows to build standalone compiler using project-release.yml
- Document include feature usage in README files with examples
- Remove embedded-files from development project.yml to reduce initialization cost
- Add validation for absolute paths and proper error handling for missing files
- Add version field to expose extension version through Zend module entry
- Add info mapping to accept arbitrary labels and scalar values for phpinfo()
- Generate PHP_MINFO_FUNCTION to display custom extension information
- Preserve info mapping order in module's phpinfo() section
- Validate version as non-empty string without NUL bytes
- Validate info as mapping of non-empty string labels to scalar values
- Add comprehensive tests for metadata parsing and generation
- Update documentation with extension metadata configuration examples
- Add testGccOnWindowsUsesGccIncludeSyntaxForAllSourceTypes method to verify include path formatting
- Test include paths with GCC compiler on Windows for C, C++, and assembler files
- Verify that GCC uses -I flag syntax instead of /I for all source types on Windows
- Confirm proper escaping of include paths with spaces using escapeshellarg
- Add formatIncludePaths method to handle include flag formatting consistently across platforms
- Add referencedClasses array to store fully resolved class names
- Implement recordReferencedClass method to track class references
- Enhance function call parsing with static function resolution
- Add native function lookup and return type detection
- Insert type conversion for runtime call results
- Resolve extension dependencies based on internal functions and classes
- Append extension requirements to generated module header
- Update tests to validate extension dependency detection
- Add test case for runtime builtin int property assignment
- Modify polymorphic class dispatch to restore string representation
- Removed strtotime from the list of functions that use direct PHPX wrappers
- Updated test case to verify only supported datetime calls use direct wrappers
- Modified strtotime test to include absolute, relative, epoch 0 and invalid dates
- Added timezone setting and additional test cases for relative date handling
- Updated expected test output to reflect new strtotime behavior
- Adjusted assertions to check for correct persistent function calls
- Added assertion to check opcodeBuildChecked property is false
- Used reflection to access parent class properties when needed
- Removed anonymousOpcode configuration from build parameters
- Ensured proper state verification for compiler fingerprint tests
- Implemented anonymous file detection and separate cache directory handling
- Added SHA256-based cache key generation for anonymous opcodes
- Created dedicated cache directories for anonymous files with build signature
- Added force clear functionality for anonymous opcode caches
- Updated cache hit tracking to distinguish between vendor and anonymous files
- Added progress output for anonymous opcode cache statistics
- Integrated anonymous file processing into existing opcode pipeline flow
- Extended iOS platform support to handle simulator targets with arm64-apple-ios-simulator
- Added new ios-simulator.yml configuration for building simulator-compatible executables
- Created build-ios.sh script to handle both device and simulator builds with parameter selection
- Implemented dynamic SDK directory selection based on target platform (iphoneos vs iphonesimulator)
- Updated error messages to reflect generic iOS SDK terminology instead of iPhoneOS specific
- Added package-ios-simulator-app.sh for packaging simulator applications without provisioning profiles
- Updated README documentation with complete iOS simulator setup and build instructions
- Modified codesign commands to include --generate-entitlement-der flag for proper entitlement handling
- Adjusted gitignore to exclude new ios-simulator-build directory and simulator executable
- Remove unnecessary blank line after namespace declaration
- Move literal string getter declaration to proper location after include check
- Remove trailing newlines from enum class and function declarations
- Consolidate cache-related function declarations in proper order
- Renamed typephp_get_method_call_cache to get_method_call_cache
- Renamed typephp_get_function_call_cache to get_function_call_cache
- Renamed typephp_get_function_resolution_cache to get_function_resolution_cache
- Updated all references in compiler base and translator classes
- Modified renderDataDeclarations to accept includeGlobals parameter
- Added renderGlobalDeclarationsForSource to handle per-source global declarations
- Updated extension generation to use new naming convention
- Adjusted test assertions to match new function names
- Added test for toStdList and toStdDict methods validating PHP array conversion with type preservation
- Included tests for late static calls from instance methods retaining receiver on inherited and overridden methods
- Added tests verifying late static calls distinguish parent and child private methods in instance context
- Covered various scenarios including scalar conversions, object arrays, and error handling cases
- Verified proper behavior with numeric keys, class inheritance, and dynamic method calls
- Tested type validation for list and dictionary conversions with multiple data types
- Updated swoole/phpx version constraint in composer.json
- Bumped dependency from ~2.8.2 to ~2.9.0
- Maintains tilde operator for minor version flexibility
- Create test for nested unset behavior with numeric string keys in empty array
- Verify proper removal of numeric string keys when using unset operation
- Confirm expected array structure after unset operations
- Document issue #114 related to numeric string key handling
- Fixed __FUNCTION__ to use short name instead of full namespaced name in method context
- Added conditional logic to prepend namespace only when not in method definition
- Added test case to verify proper behavior of __FUNCTION__ and __METHOD__ constants
- Ensured magic constants return correct values based on their usage context
- Updated parser logic to distinguish between function and method definitions properly
- Implemented parseNestedArrayUnset method to handle chained array dimension unsets
- Added logic to process nested ArrayDimFetch expressions in unset statements
- Created proper dimension parsing and code generation for nested array operations
- Maintained PHP evaluation order for key materialization in nested unsets
- Added comprehensive test coverage for nested unset chain behavior
- Extended compiler tests to verify correct handling of complex unset scenarios
- Added "Start All" button to UI with proper enable/disable logic
- Implemented startAll method to start all non-running tunnels at once
- Added logic to skip already running or transitioning tunnels
- Implemented failure collection and reporting for individual tunnel errors
- Updated README documentation with new feature description
- Added start_all_test.php to
- Support single array parameter initialization for std::array, std::vector, std::map,
std::orderedMap, std::list, and std::dict
- Implement type inference from array initializer expressions with exact type matching
- Add rectangular shape validation for std::array initializers
- Generate appropriate C++ code for value initializers using lambda expressions
- Update documentation to reflect new value initializer capabilities
- Add comprehensive tests for valid and invalid initializer scenarios
- Defer StdFunc/StdArgInfo implementation as documented in design records
- Add acceptsCallable property to ArgInfo entity to track callable type acceptance
- Implement logic to detect when function parameters accept callable types
- Add normalization of bare function callable arguments to string representation
- Create helper methods to check if types contain callable declarations
- Add resolution logic for bare identifier function names in callable context
- Update native class support to set acceptsCallable flag based on type checking
- Modify preprocessor to populate acceptsCallable field during argument parsing
- Remove deprecated typeDeclContainsCallable method and consolidate logic
- Add comprehensive test coverage for bare
- Introduce StdVector, StdMap, and StdOrderedMap parameter attributes
- Add explicit std-container contract to ArgInfo entity
- Implement parameter validation and type checking logic
- Add error handling for invalid container parameter usage
- Support container parameter contracts in function signatures
- Generate automatic type conversion at function entry points
- Add compilation tests for std container parameter contracts
- Update documentation with container parameter rules and examples
- Implement compatibility checks between child and parent classes
- Add support for container parameters in trait methods and inheritance
- Add constant initialization code separation with before/after statement handling
- Implement constant finalization logic to prevent metadata replacement during re-parsing
- Create scoped initialization blocks using do-while constructs for temporary variables
- Add codegenFinalized flag to track constant processing state
- Introduce new test case for global nested array constants initialization
- Add incremental declaration test for constant initializer preservation
- Move constant value parsing to dedicated finalizeGlobalConstantValue method
- Update translator to handle scoped constant initialization code generation
- Changed $candidate to $autoloadFile for better readability
- Updated variable references in conditional check
- Maintained same logic for autoload file path construction
- Kept existing rtrim functionality for directory separators
- Preserved array uniqueness check with in_array function
- Replace direct require of TYPEPHP_ROOT_PATH . '/vendor/autoload.php' with resolveComposerAutoloader() function
- Add new resolveComposerAutoloader() function to locate Composer autoloader from multiple candidate paths
- Support both source checkout and packaged SDK environments by checking TYPEPHP_ROOT_PATH and PHP_HOME
- Implement fallback mechanism to search for vendor/autoload.php in different locations
- Add detailed error reporting when autoloader is not found with specific search paths
- Include installation instructions in error output when dependencies are missing
- Exit with error code 1 when autoloader cannot be located
- Update bundled php.ini to use extension_dir = "./ext/" instead of absolute CI runner path
- Add makeWindowsPhpIniPortable function to rewrite extension_dir during packaging
- Preserve enabled extensions and line endings while removing CI-specific path settings
- Include php.exe, php.ini, and ext/php_zip.dll in required archive entries
- Add verification step to ensure packaged PHP runtime works correctly after relocation
- Test
- Add getDeclarationInputFiles method to include stub files in header generation
- Modify incremental compilation to process stub files alongside regular PHP files
- Update build state tracking to handle stub files differently (no translation units)
- Add test coverage for stub declaration generation and dependency invalidation
- Implement MSVC /bigobj flag for large object format support in generated commands
- Generate wrapper callbacks for stub functions and methods bridging to native implementations
- Update source pipeline to handle native/import stub metadata in module entry
- Modify declaration header generation to include stub callback registrations
- Add comprehensive test suite for stub functionality
- Add loadPristineAst method to CompilerBase for independent AST loading
- Introduce PreparedProjectCacheTrait with conservative whole-project caching mechanism
- Implement translation unit splitting for large C++ files with splitLargeTranslationUnit
- Add preprocessing warning count tracking in CompilerDiagnosticTrait
- Enhance gen_stub.php to use cached AST when available instead of reparsing
- Improve incremental compilation checks with splitTranslationUnits validation
- Add comprehensive test coverage for AST caching, prepared project cache, and translation unit splitting
- Optimize precompiled header manager with dependency digest caching and improved invalidation
- Implement file digest memoization for faster native compilation input processing
- Add support for persistent AST cache reuse across compiler processes
- Add CompilerGeneratorFingerprintTest to verify embedded snapshot usage
- Test that compiler snapshots are stable and change with source or options
- Verify ordinary programs and extensions do not register compiler snapshots
- Add separate process attribute for accurate testing conditions
- Test incremental generator fingerprint generation and registration logic
feat(build): implement compiler build fingerprint registration
- Embed immutable source snapshot in self-hosted compiler builds
- Add fallback mechanism for executables built before metadata introduction
- Optimize performance by avoiding expensive source file hashing
- Generate compiled generator fingerprint registration during translation
- Prevent recursive fingerprinting in repeated self-hosted builds
- Register compiler build fingerprint only for binary builds with specific criteria
- Move large array-valued class constant initialization from module_init() to isolated functions
- Generate independent cacheable translation units for request-lifecycle helpers
- Add static zend_class_entry pointers with null initialization for module entry unit
- Preserve arginfo-backed class registration in extension-*.cc while splitting array constants
- Implement proper cleanup of split lifecycle sources during incremental builds
- Cache PHP SDK discovery results to avoid repeated php-config invocations
- Add comprehensive tests for class constant lifecycle splitting behavior
- Verify static class entry declarations do not expose unnecessary linkable symbols
- Add explicit response file path support to compiler backends
- Implement TYPEPHP_COMPILER_EXECUTABLE constant for compiler fingerprinting
- Add exception handling for native source project compilation
- Create dedicated extension header inclusion logic to reduce build invalidations
- Implement small task lane reservation in parallel compilation
- Add DOM extension requirement check for native project support
- Optimize symbol collection with single depth-first AST walk
- Add request array default metadata finalization
- Implement content-based rather than timestamp-based object caching
- Add link cache metadata file management
- Update incremental compilation to preserve timestamps for identical content
- Add comprehensive test coverage for response file and caching features
- Replace sequential indexing with stable ID allocation for persistent entities
- Add StableIdRegistry to maintain consistent IDs across builds
- Implement incremental compilation with dependency tracking
- Add IncrementalBuildState for tracking file dependencies and dirty propagation
- Update anonymous class generation to use stable call site IDs
- Modify type ID allocation to start from 1 and avoid renumbering
- Add literal string ID allocation using stable registry
- Implement global variable usage recording and tracking
- Add dependency symbols for classes, functions, constants, and globals
- Update property and function index allocation to use stable IDs
- Add cache site ID allocation based on call site context
- Implement compilation statistics merging and delta calculation
- Add file writing with content comparison to avoid unnecessary writes
- Implement incremental build cache clearing functionality
- Add metadata restoration for incremental compilation
- Create dependency graph building and dirty file propagation logic
- Implement translation unit emission tracking for incremental builds
- Updated swoole/phpx from ~2.8.1 to ~2.8.2
- Removed ext-dom requirement from composer.json
- Maintained ajaxray/ansikit at ^0.3 version
- Kept other dependency versions unchanged
- Implemented AstCache class with schema versioning and file-based storage
- Added cache validation using source hash, PHP version, and parser version
- Integrated atomic file operations to ensure cache consistency
- Updated CompilerBase to use lazy-initialized AST cache instance
- Replaced direct parser calls with cache-aware load operations in preprocessor
- Modified translator to utilize cached AST instead of reparsing
- Added comprehensive test coverage including cache hit, invalid
- Fixed private method accessibility check to properly return empty string
when method is private and inaccessible
- Updated property signature resolution to preserve method metadata for
nullable object properties
- Modified final class check to require non-nullability for typed property
receiver optimization
- Added test case for nullable typed property preserving by-reference
arguments when non-null
- Added test case for typed property following runtime protected override
or __call target
- Add reflection to access compiler's persistentFuncMap and literalStrings properties
- Retrieve actual function ID and string ID for 'get_class' at runtime
- Replace hardcoded regex values with dynamic IDs from compiler state
- Ensure polymorphic get_class dispatch uses correct persistent function lookup
- Maintain existing assertion logic while making test more robust to compiler changes
- Removed pcntl dependency and related functions from PlatformBase and Windows classes
- Implemented proc_open-based process pool in NativeBuilder for cross-platform parallel compilation
- Updated dispatchParallel to dispatchProcessParallel with new process management logic
- Modified Translator to use process pool instead of pcntl for parallel compilation
- Added fallback to sequential compilation when proc_open is unavailable
- Updated ParallelCompileTest to use process-based tests instead of pcntl mocking
- Bumped version from 0.8.1 to 0.8.2 in project configuration files
* fix(compiler): preserve runtime class dispatch and introspection for polymorphic objects
When an object variable has an upper-bound declared type (e.g. assigned from
a function or method return), SSA marks it as a stable object. However,
stableObjects does not guarantee the concrete runtime class: the instance
may be a subclass at runtime, or null if nullable.
1. FuncCallOptimizer::genGetClassOptimized checked isStableObject($obj->name)
and folded get_class($obj) to the declared type literal string. For
$a = getAnimal() returning a Dog, get_class($a) was incorrectly folded
to "Animal" at compile time.
2. MethodCallTrait::parseStaticCall checked isStableObject($class) and
jumped to _do_call with the declared base class. For $a::who(), this
statically invoked Base::who() instead of dispatching to Dog::who() on
the runtime object.
Require proven exact object instances (exactObjects, populated from direct
new ConcreteClass() definitions) before folding get_class() or devirtualizing
static calls on object variables. Non-exact variables fall back to runtime
class resolution (php::fn::get_class() and php::callStaticMethod()),
matching PHP semantics.
Add unit test coverage verifying exact objects continue to fold/devirtualize
while polymorphic variables retain dynamic runtime dispatch.
* fix(compiler): preserve lexical scope in dynamic static calls and runtime type checks for get_class
- Use php::callScoped with getCallableScopeExpr() for dynamic static calls inside class methods to preserve caller visibility on protected methods
- Fall back to runtime php::call for get_class on non-exact values so nullable objects throw TypeError instead of dereferencing null
- Add behavioral PHPT tests for protected polymorphic static calls and nullable get_class
- Update unit tests for scoped dispatch and runtime introspection
* test(compiler): remove stray top-level main call from PHPT tests
In TypePHP AOT compilation, function main(): void serves as the binary
entrypoint. Top-level function calls outside a function are rejected by
the preprocessor as stray code.