aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe-php-shim/src/runtime.rs
AgeCommit message (Collapse)Author
2026-06-27chore(php-shim): remove an unnecessary shim functionnsfisis
2026-06-27feat(php-shim): drop shutdown function shim, defer OOM message to PHPnsfisis
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-26feat(php-shim): stub spl_autoload_register/unregister (TODO-flagged)nsfisis
Compiled Rust never loads a class by name, so the registered callback is dropped. Return success so callers that register an autoloader during startup can proceed. Kept the TODO(phase-d) comment: this is an unblocking stub, not a faithful implementation. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-26feat(http): reimplement CurlDownloader on reqwest; port 15 more testsnsfisis
Replace the libcurl-shim CurlDownloader with a reqwest+tokio implementation per the .ken sketch, resolving the construction panic that blocked command tests (mock path via __new_mock is untouched). Port remote_filesystem (7), hg/svn driver (4), zip_archiver/git_exclude_filter (4) tests. Fix hg/svn/git_exclude regex-delimiter and svn result-propagation porting bugs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-26test: port 70 perforce/repository/downloader/installer/dispatcher testsnsfisis
Port perforce (36), locker (10), composer_repository (7), installation_manager (6), file_downloader (5), and event_dispatcher (6) tests via the mock infra. Fix production porting bugs surfaced en route: BufferIO::get_output look-behind regex, ComposerRepository list-form package iteration and initialize dispatch, gethostname and spl_autoload_functions shims; add EventDispatcher get_listeners test seam. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-25feat(semver): hand-port constraint AND-split to drop look-around regexnsfisis
The PCRE delimiter `(?<!^|as|[=>< ,]) *(?<!-)[, ](?!-) *(?!,|as|$)` used to split AND-constraints relies on look-around, which the regex crate cannot compile (parse_constraints panicked). Reproduce its semantics in a hand-written `split_and_constraints` scanner shared by VersionParser and RootPackageLoader. Also model `method_exists` for the class-name form (shirabe runs no dumped Composer ClassLoader) and un-ignore the InstalledVersions tests, serialized via `#[serial]` since they share global static state. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21feat(php-shim): implement version_compare/spl_object_hash/clone et alnsfisis
Port php_version_compare (canonicalization + special-form ordering) and expose it via version_compare()/version_compare_2(). Implement clone() (via Clone), spl_object_hash()/spl_object_hash_process() (address-based), get_loaded_extensions() and the main-version case of phpversion(). Interpreter/reflection/autoload/eval/$GLOBALS/memory-accounting and Windows-only SAPI helpers remain TODO(phase-d): they have no equivalent in the compiled shim. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21refactor(json): eliminate json_last_error in favor of Resultnsfisis
json_encode/json_encode_ex now return anyhow::Result<String> instead of Option, so callers no longer need json_last_error() to get the failure reason. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21refactor(php-shim): split lib.rsnsfisis