| Age | Commit message (Collapse) | Author |
|
Composer never feeds a pattern that fails to compile at runtime, so a
preg_*() failure is a programming error rather than a recoverable
condition. Replace the PcreException path with a panic.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
|
Replace todo!() stubs reached on the `composer --version` path so the
command runs without panicking and exits cleanly:
- introspection (function_exists, class_exists, extension_loaded,
defined) via white-lists modeling a standard Linux PHP CLI
- type casts: php_to_string/strval, php_truthy/boolval, substr,
byte_at, explode, strtr_array
- config/env: error_reporting, ini_get, date_default_timezone_*,
server_get/server_contains_key, php_uname("s")
- IO: turn PhpResource into an enum (Stdin/Stdout/Stderr/File) and
implement fwrite/fflush/stream_isatty/php_fopen resource helpers
- shutdown/exit: register_shutdown_function + run_shutdown_functions,
exit, error_get_last
- preg_match_all_offset_capture via the regex crate; the formatter
pattern drops PCRE possessive quantifiers (original kept in a
comment with a TODO)
proc_open reports unavailable for now (TODO(phase-c)); terminal-size
and tty detection fall back to defaults. sprintf calls on this path
are rewritten with format!(). OutputFormatterStyleInterface gains
clone_box to return shared styles.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
|
Introduce shim functions and constants, replacing the ad-hoc chrono
format strings and parse helpers used as phase-b placeholders.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
|
Change json_encode/json_encode_ex and JsonFile::encode/encode_with_options
to take a generic serde::Serialize value instead of &PhpMixed, implement
Serialize for PhpMixed/ArrayObject, and drop the PhpMixed::String wrapping
at JsonManipulator call sites in favor of passing raw values.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
|
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
|
|
|
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
|
|
|
- Replace RefCell with Mutex in Constraint for thread safety
- Add clone_box() to ConstraintInterface for cloning trait objects
- Propagate Result from Constraint::new() and unwrap at call sites
- Fix VersionParser instantiation (unit struct, not fn)
- Add indexmap dependency to shirabe-semver
|
|
- Remove duplicate function/constant definitions that were added during
porting (strpos, str_contains, str_starts_with, is_scalar, strlen,
substr, strtoupper, str_replace, sprintf, array_keys, str_ends_with,
is_int, array_values, is_object, is_numeric, PHP_EOL,
FILTER_VALIDATE_EMAIL, PHP_VERSION_ID)
- Replace old spl_autoload_register/unregister (PhpMixed args) with
typed Box<dyn Fn> versions
- Replace old array_pop/array_shift/array_unshift/array_splice with
generic/correctly-typed versions
- Replace old trim(chars: &str) with trim(chars: Option<&str>)
- Rename array_slice(PhpMixed) to array_slice_mixed to coexist with
the typed array_slice<V>(IndexMap<String, V>) version
- Fix chdir return type Result<()> -> anyhow::Result<()>
- Add anyhow dependency to shirabe-php-shim
|
|
|
|
Add zip crate dependency and ZipArchive stub to shirabe-php-shim.
Also add dirname and stream_get_contents shim functions.
|
|
|
|
|
|
|
|
|