aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe-external-packages/src/composer
AgeCommit message (Collapse)Author
2026-07-04fix(xdebug-handler): implement get_skipped_versionnsfisis
The restart-to-disable-xdebug mechanism isn't ported (is_xdebug_active is hardcoded false), so a restart never happens and PHP's self::$skipped stays at its default empty string. Return that directly instead of todo!(), since PlatformRepository::initialize() calls this unconditionally. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-06-28refactor: add linternsfisis
2026-06-27refactor: fix compiler warnings and clippy warningsnsfisis
2026-06-24refactor(package): point ComposerMirror to crate::util, drop external stubnsfisis
ComposerMirror is part of Composer itself (Util/ComposerMirror.php), not an external package, so its stub belongs in the shirabe crate's util module rather than shirabe-external-packages. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24refactor(semver): re-export shirabe-semver at crate root, drop ↵nsfisis
composer::semver stubs Flatten shirabe-semver's modules into glob re-exports at the crate root and route all consumers through the short paths. Remove the duplicate composer::semver stubs from shirabe-external-packages in favor of the shirabe-semver types. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24refactor(crates): split metadata-minifier and spdx-licenses into own cratesnsfisis
Move MetadataMinifier and SpdxLicenses out of shirabe-external-packages into dedicated shirabe-metadata-minifier and shirabe-spdx-licenses crates, updating all import sites accordingly. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-20feat(ca-bundle): replace CaBundle todo!() with dummy implementationsnsfisis
CaBundle is slated for removal once HTTP handling moves to reqwest, which discovers the system CA bundle itself. Until then, fill the three methods with reasonable stand-ins: get_system_ca_root_bundle_path probes the SSL_CERT_FILE/SSL_CERT_DIR env vars and common distro CA locations, validate_ca_file requires a non-empty readable file, and is_openssl_parse_safe reports safe. The simplifications versus the original are noted with TODO(phase-c). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-14feat(php-shim): implement more shim functionsnsfisis
2026-06-14docs(regex): add regex porting rulesnsfisis
Document the conventions for porting PCRE patterns to the regex crate (no PCRE crate, panic on compile failure, dropping performance-only possessive quantifiers, ad-hoc compatibility comments). Apply the rule to Platform::expand_path by rewriting its conditional subpattern as an explicit alternation, which the regex crate can compile. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-14refactor: auto-fix clippy warningsnsfisis
2026-06-14refactor(pcre): take &mut matches in preg_*2 shim helpersnsfisis
The optional matches output was always passed Some(&mut ...) at every call site, so the Option wrapper added no value. Take &mut directly and inline the former internal helpers. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-14refactor(pcre): return bool/usize from preg_*2 shim helpersnsfisis
preg_match2 returns bool and the preg_match_all* helpers return usize (the match count is never negative), matching how callers use them. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-14refactor(pcre): treat regex compile failure as fatal in shimnsfisis
The preg_* shim helpers wrapped their results in Option/Result solely to signal a regex that failed to compile. Composer never feeds a pattern that fails at runtime, so such a failure is a programming error: panic instead and drop the Option/Result wrappers, updating all callers. preg_replace_callback keeps its Result return type since the callback itself is fallible. preg_match_groups is removed in favor of preg_match at its sole call site. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-14refactor(pcre): move preg_* free functions into php-shimnsfisis
The free preg_* functions, the CaptureKey type, and the PREG_* constants move from the pcre crate into shirabe-php-shim, where the rest of the PHP standard-library shims live. Colliding names take a 2 suffix (preg_match2, preg_split2, etc.) since the shim already exposes differently-shaped variants. Preg keeps its public API and delegates to the relocated functions; CaptureKey is re-exported from composer::pcre so consumers are unaffected. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-14refactor(pcre): drop Result from Preg method return typesnsfisis
The Preg methods panic on PCRE failure (per the file header rationale), so their anyhow::Result wrappers never carried an Err. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14feat(pcre): implement preg_* functionsnsfisis
Replace the todo!() stubs backing the Preg class and the standalone preg_* shim helpers with regex-crate implementations.
2026-06-14refactor(pcre): drop PcreExceptionnsfisis
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>
2026-06-14refactor(pcre): drop strict-groups Preg variantsnsfisis
Rust's type system already distinguishes participating from non-participating capture groups via Option, so the *StrictGroups methods add no safety here. Remove them and switch callers to the plain variants.
2026-06-14refactor(pcre): remove unused Preg methodsnsfisis
Drop the default-argument variants and offset-capture helpers that have no caller on the Rust side, along with the constants and free functions they were the sole users of. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-14feat(pcre): implement Preg classnsfisis
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-14chore: add "ref" comments to file headernsfisis
2026-06-11chore(compiler): drop compiler.rsnsfisis
The Compiler.php is PHP-tooling only (bin/compile) with no Rust equivalent, so it is not ported. Remove the compiler module along with the symbols used solely by it. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-08feat(phase-c): resolve closure-capture phase-b TODOs in config/create-projectnsfisis
Port Config::process() to the real Preg::replace_callback, whose closure borrows &self/flags and calls get_with_flags; surface get() errors via a captured cell so process now returns Result. Switch the replace_callback shim bounds to FnMut to allow the error-capturing closure. Wire CreateProjectCommand suggestion collection through the Rc<RefCell> reporter's interior mutation. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07feat(metadata-minifier): port expand for minified package metadatansfisis
Implement MetadataMinifier::expand with the PHP list-of-arrays signature (Vec<IndexMap>) and wire it into ComposerRepository so composer/2.0 minified package metadata is expanded, resolving the phase-b TODO. minify() is left unported as it is not used in Composer itself. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-26refactor(io): share IOInterface via Rc<RefCell<dyn _>> handlensfisis
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-23refactor(semver): change ConstraintInterface to a closed enumnsfisis
Replace the dyn ConstraintInterface trait objects with an AnyConstraint enum closing over its four implementors (Simple, Multi, MatchAll, MatchNone), mirroring the earlier Rule enum conversion. Rename constraint.rs to simple_constraint.rs to match the renamed Constraint type. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-20refactor: re-export module items to shorten import pathsnsfisis
2026-05-20fix(compile): fix all remaining compile errorsnsfisis
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19fix(compile): fix more random compile errorsnsfisis
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19fix(compile): fix various compile errorsnsfisis
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-17chore: cargo clippy --fixnsfisis
2026-05-17fix(class-map-generator): introduce CaptureKey enum and fix ↵nsfisis
class-map-generator compile errors - Add CaptureKey enum to Preg stub for typed capture access (by index or name) - Expand Preg stub with complete method set matching the PHP Composer\Pcre\Preg API - Update class-map-generator, php-file-cleaner, and php-file-parser to use new API - Add Display impls for exception types in shirabe-php-shim - Add follow_links/exclude stubs to Finder and new/get_pathname stubs to SplFileInfo Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-17chore(style): cargo fmtnsfisis
2026-05-17feat(port): add stub implementations of shirabe-external-packagesnsfisis