- Updated swoole/phpx from ~2.9.0 to ~2.9.1 in composer.json
- Bumped minor version for bug fixes and improvements
- Maintained compatibility with existing codebase
- Resolved potential security vulnerabilities in older version
- Update main project version from 0.9.0 to 0.9.1
- Update file version from 0.9.0.1112 to 0.9.1.1112
- Update product version from 0.9.0 to 0.9.1
- Move optimize setting from project.yml to project-release.yml
- Remove Wall compiler flag from cxx-flags list
Composer path repositories install a package as a symlink, so a source
directory reached through one contributed no files at all: PHP's
RecursiveDirectoryIterator does not descend into symlinked directories
unless asked, because RecursiveIteratorIterator calls hasChildren() and
its $allowLinks argument defaults to false.
The build still reported success, and the missing classes only surfaced
at runtime as `class 'X' is undefined`.
Scan with FilesystemIterator::FOLLOW_SYMLINKS. A linked directory is an
ordinary source entry with no setting of its own; what is compiled stays
with `sources` and `ignore`.
Exclusions match the path that reached a file, the one the project wrote
and the scanner traversed. An `ignore` entry is no longer resolved to its
link target, which compared a real path against a linked one and so never
matched.
Real paths are kept for identity alone. A link is refused when it closes
the branch that reached it, so a link to one of its own ancestors cannot
recurse; files reachable through several links are reduced to one path
after exclusions have run, since deduplicating before that would drop an
allowed alias along with an excluded one.
* fix(installer): keep the embed build inside its own prefix
The libphp.so installer reuses the configure options of the PHP already on
the machine so the private build matches it feature for feature. A
distribution build records where *it* installs, though, and those paths are
absolute. On Debian and Ubuntu the options carry --mandir=/usr/share/man,
--includedir=/usr/include, --libdir, --libexecdir, --sysconfdir and
--localstatedir. Inherited unchanged, they survive the --prefix rewrite, and
`make install` tries to write into system directories:
Installing PHP CLI man page: /usr/share/man/man1/
cp: cannot create regular file '/usr/share/man/man1/#INST@3023727#': Permission denied
make: *** [Makefile:265: install-cli] Error 1
Fatal error: Unable to install libphp.so: Command failed: make install
So the build only completed for root, or inside a container where the user
owns /usr. Everyone else got a PHP compiled from scratch and then thrown
away at the last step.
Two further options escape the same way. --program-suffix=8.3 installs the
binaries as php8.3 and php-config8.3, but LibPhpInstaller::installedVersion(),
writePhpIni() and UnixPlatform::findPhpConfig() all look for the plain names,
so a build that got past `make install` still looked like it had produced
nothing. --cache-file points at the distribution's build directory
(/tmp/buildd/nonexistent/config.cache), a path that does not exist here and
whose answers were recorded for a different prefix.
Drop all of them. Autoconf derives every installation directory from --prefix
when it is absent, so the private build lands entirely under the requested
prefix: bin/php, lib/libphp.so, include/php and share/man/man1. Options that
name a *dependency* rather than a destination, such as --with-zlib=/usr and
--with-layout=GNU, are untouched; the built PHP still matches the one it was
derived from.
* fix(installer): offer an existing build before asking to make one
Running a build twice asked four questions to arrive at the answer it
already had:
The current PHP installation does not provide libphp.so: /usr
Build a private PHP embed library now? [Y/n]
PHP version [8.5.10]:
Install directory [/home/alganet/.typephp]:
PHP 8.5.10 with libphp.so already exists in /home/alganet/.typephp; use it? [Y/n]
The reuse check sat at the bottom because it needs a version and a
directory, and those were read from the prompts. But both have defaults
that are known without asking anyone: the directory this installer always
proposes, and the PHP that is running it. That is the case being answered
here, so it can be offered first.
Ask it up front. Accepting now ends the exchange at one question, and the
`--prefix` rewrite no longer has to be reasoned about at all. The later
check stays for a directory or version typed by hand, and is skipped when
the answers repeat the defaults, so the same question is never asked twice.
ensure() also fetched the release list from php.net before looking for an
existing build, so the reuse path made a network round trip to learn the
URL of an archive it was not going to download. Move the fetch next to the
install that needs it.
Nothing recorded PHP_HOME anywhere but this process, and that has not
changed: a fresh run still has to rediscover the build. Being asked once
instead of four times is the part that is worth fixing separately.
A program built on Linux does not start:
./main: error while loading shared libraries: libphpx.so:
cannot open shared object file: No such file or directory
libphpx.so sits beside the phpx checkout and libphp.so under the prefix the
libphp installer chose. The link line names both with -L, which tells the
linker where to look and the loader nothing, and neither directory is on the
default search path. The binary carries no RPATH or RUNPATH at all, so it
only runs under LD_LIBRARY_PATH.
Every part of the mechanism is already present and already reached on Linux.
NativeCommandOptionsTrait asks the platform for getDefaultRpaths() on every
non-nano build, and GccLikeBackend emits -Wl,-rpath for each entry it gets
back. Only the list is missing: PlatformBase returns an empty one, Macos
overrides it with the phpx and PHP library directories, and Linux never
overrode anything.
Move that override up to UnixPlatform, where Linux inherits it. The two
directories are the same ones the -L flags already name, each still guarded
by is_dir(), so macOS keeps the behavior it has today.
Android and Ios return an empty list on purpose: a path on the build host
means nothing on the device that runs the output. Wasi is a cross target too
and had been relying on the inherited default, so it states the same thing
explicitly rather than acquiring host paths from this move.
The recorded paths are absolute, matching what macOS has always emitted. That
is enough to run where the program was built, which is what an embed build
against a private PHP prefix can do in any case. Relocatable output needs
$ORIGIN and the libraries shipped alongside, or --full-static, and neither is
decided here.
- 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