| Age | Commit message (Collapse) | Author |
|
Add a no_banned_use linter that forbids importing anyhow::Result, and
update all call sites to reference it via its fully-qualified path so
it is never confused with std::result::Result.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
|
|
|
RepositoryCommand's JSON-arg detection used the un-delimited regex r"^\s*\{";
the PHP source is the delimited '{^\s*\{}', which compile_php_pattern requires.
Config::merge only extracted repositories from PhpMixed::Array; a JSON array
decodes to PhpMixed::List (an array with integer keys in PHP) and was silently
dropped. Handle List by mapping to integer string keys.
Un-ignores all 10 remaining RepositoryCommandTest cases (16/16 pass).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
|
These slice/map wrappers mirrored PHP's internal array pointer and
have no clean Rust equivalent. Remove them and replace the lone
caller with direct first-element access; the rest were unused imports.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
|
PHP's internal array pointer (current/key/end) has no clean Rust
equivalent. Remove these todo!() shim stubs and replace each call
site with direct first/last element access matching Composer's
original behavior. Unblocks Config::merge of anonymous {name: false}
disable entries, re-enabling test_add_packagist_repository.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
|
Replace the dispatch-on-constant filter_var() and filter_var_with_options()
with dedicated filter_var_boolean/url/email/ip and filter_var_int_with_range,
dropping the FILTER_VALIDATE_* constants and updating all call sites.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
|
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
|
Back parse_url/parse_url_all with reqwest::Url and add the
FILTER_VALIDATE_URL and FILTER_VALIDATE_BOOLEAN arms to filter_var, so
Config::prohibit_url_by_config no longer hits todo!(). reqwest::Url is
not a byte-for-byte port of PHP's parser; the divergences are noted with
TODO(phase-c).
Switch the scheme in_array in prohibit_url_by_config to strict: the
needle is a string-or-null and the haystack holds only non-numeric
string literals, so loose and strict comparison are provably equivalent
here, avoiding a dependency on PHP loose `==` semantics.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
|
The List and Array variants of PhpMixed boxed their elements
unnecessarily. Store PhpMixed values directly and update all callers
accordingly.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
|
|
|
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>
|
|
Resolve category K (array_* functions, integer keys, nested mutation,
sorting). Add shim variants (uasort over Vec<T>, uasort_map for IndexMap)
and delegate to existing typed variants (strtr_array, array_merge_map,
array_search_in_vec). Implement PHP array semantics directly where the
shape is fixed: canonical integer-key coercion (is_php_integer_key,
shared by config and FilesystemRepository::dumpToPhpCode), strict
array_search via trait-object pointer identity, array_reverse/array_chunk
preserve_keys loops, and the installed.php nested version mutations via
auto-vivify helpers.
Resolving the array_merge in UpdateCommand unmasked latent borrow bugs in
execute's tail (Rc input/output moved by value); fixed with .clone() to
match PHP reference sharing, and resolved the tightly-coupled Intervals
constraint check.
composerRequire reclassified to phase-c: it depends on the $GLOBALS
superglobal and PHP's require include mechanism, neither portable.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
|
Implement the foundational PhpMixed conversion infrastructure
(From<bool|i64|f64|String>, order-sensitive PartialEq matching PHP ===)
and resolve the category-G phase-b TODOs that depend on it:
- Fix VCS driver cache paths that discarded parsed JSON or diverged on
null caches (svn/forgejo/gitlab/git-bitbucket/github).
- Wire up real conversions previously stubbed or dropped: suggests
platform config, audit ignore-severities, composer_repository search
and ProviderInfo, class_loader prefix/classmap merges, locker lock
diff comparison, advisory JSON serialization, SPDX license fields.
- Make GenericRule take a typed ReasonData; populate RULE_ROOT_REQUIRE
with the constraint and convert PhpMixed at the call sites.
|
|
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>
|
|
Resolve the resolvable subset of category A (shared ownership / non-cloneable
PHP class) TODOs by leaning on values that are already shared behind Rc/handle
wrappers, where cloning preserves PHP reference semantics:
- solver: call IgnoreListPlatformRequirementFilter::filter_constraint with a
cloned AnyConstraint (a Clone enum) and propagate the Result
- update_command: filter PlatformRepository out of the repository manager's
handles into a CompositeRepository (array_filter equivalent)
- package_discovery_trait: pass the real platform_requirement_filter (Rc clone)
instead of substituting ignore_nothing()
- installation_manager: pass the original full operation list (Vec<Rc<_>>
clone) as all_operations
- file_downloader: swap self.io to NullIO and restore via std::mem::replace
- auditor: reuse the PackageInterfaceHandle list across the advisory and
abandoned-package queries
- process_executor: drop the unused, lossy Clone impl
- config / array_repository: demote settled RefCell-design markers to comments
Remaining category A items (factory installer wiring, purge_packages handle
bridge, installer cache identity, reinstall flow, plugin command discovery)
stay as TODOs since correct resolution needs structural refactors.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
|
* Config::merge called array_merge_recursive where PHP uses plain
array_merge (string-key overwrite); switch those six sites to
array_merge.
* provides/replaces merges that may carry an AliasPackage's
self.version numeric keys ("0","1",...) were collapsing under naive
chain/insert/or_insert; route them through a new array_merge_map().
Co-Authored-By: Claude Opus 4.8 <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>
|
|
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
|
|
|
|
|
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
|
|