aboutsummaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
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
2026-06-21test(tests): expand stub macros into plain test functionsnsfisis
The per-file stub!/encode_stub!/etc. macros generated #[ignore]d test functions but obscured the individual test bodies. Expanding them inline removes the macro indirection so future ports can fill in each function directly. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21feat(php-shim): implement pure-function todo!() stubsnsfisis
Fill in the shim functions that have an easy, accurate pure-Rust port: array (merge/flip/fill_keys/slice/search/is_list), string (substr_count, strpbrk, raw/urlencode, ucfirst/ucwords, strstr, strcspn, explode limit, str_replace arrays), mb_* (strlen/substr/str_split), sort callbacks (uasort/uasort_map/uksort), levenshtein, intdiv, ceil, ctype_digit, json_encode, count_mixed and the PhpMixed/to_* boolean casts. Runtime- or crate-dependent and hard-to-port-accurately stubs (sprintf, version_compare, natural sort, hashing, etc.) are left as todo!().
2026-06-21test(tests): port setUp/tearDown as set_up/tear_down with TearDownnsfisis
Port PHP setUp/tearDown across the ported integration tests using same-named set_up()/tear_down() functions and a TearDown struct whose Drop runs tear_down(). Fixture-init setUp returns its fixtures; tmpdir-style setUp/tearDown carry state in TearDown fields. Parts that depend on unported infrastructure (PHPUnit mocks, Config::merge, the PHP error handler) stay todo!() and are only wired into ignored stubs to avoid breaking live tests. Also fix shirabe-php-shim putenv to handle the no-'=' form (PHP unsets the variable), which Platform::clear_env relies on for the env-clearing tearDowns. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21test: port remaining repository and util tests as stubsnsfisis
All ignored: Composer/Filesystem/Platform/Vcs repositories and the AuthHelper/Bitbucket/Git/Perforce/RemoteFilesystem/Svn utils mock IO/Config/HttpDownloader(curl)/ProcessExecutor or use reflection; Filesystem/ProcessExecutor/StreamContextFactory/ProxyManager need on-disk fixtures or proxy env. setUp/tearDown not ported. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test: port package archiver/loader/version/locker and PluginInstaller stubsnsfisis
All ignored: ArrayLoader/ValidatingArrayLoader/VersionSelector parse constraints via a look-around regex; ArchiveManager uses PharData (todo!()); ArchivableFilesFinder/VersionGuesser/Locker mock git/process/IO; the plugin API is not implemented (TODO(plugin)). Wires up the plugin test target. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test: port downloader/installer/io/json/event-dispatcher/functional stubsnsfisis
All ignored: these mock IO/HttpDownloader (curl)/ProcessExecutor/installers, use ZipArchive/JsonManipulator todo!()s, need Symfony console or schema validation, reflect into ClassLoader, or run end-to-end install/functional fixtures. Wires up the event_dispatcher test target. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test: port Auditor/JsonConfigSource/AutoloadGenerator as stubsnsfisis
All ignored: Auditor mocks HttpDownloader and parses constraints (look-around regex); JsonConfigSource uses JsonManipulator (addcslashes todo!()); the AutoloadGenerator cases are fixture/mocked-installer integration. Wires up the config test target. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test(dependency-resolver): port ↵nsfisis
DefaultPolicy/PoolBuilder/PoolOptimizer/Solver as stubs All ignored: they build Pools/run the Solver over packages whose constraint parsing uses a look-around regex the regex crate cannot compile, with fixture-heavy setup. setUp/tearDown not ported. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test(config): port ConfigTestnsfisis
testAddPackagistRepository is fully modelled but Config::merge of an anonymous {name: false} disable entry reaches current() (todo!()), so it is ignored; the remaining env-dependent / plugin-config cases are stubbed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test(json): port JsonManipulatorTest as stubsnsfisis
JsonManipulator's text-rewriting operations reach addcslashes (todo!()) in the php-shim, so all 50 cases are stubbed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test(json): port JsonFileTestnsfisis
Parse-error cases are modelled but JsonFile::parse_json's error path reaches json_last_error (todo!()), so they are ignored; the encode/schema/merge-conflict/ indentation cases are stubbed (encode flag mapping, validateSchema, large fixtures). setUp/tearDown not ported. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test(package): port ArrayDumperTestnsfisis
requiredInformation/rootPackage/dumpAbandoned(+replacement) pass; testKeys drives ~25 dynamic set<Property> calls over heterogeneous types and is stubbed. Wires up the package/dumper test submodule. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test(command): port remaining command tests as ApplicationTester stubsnsfisis
Adds Base/Bump/Config/DumpAutoload/Fund/Global/Init/Install/Licenses/Remove/ Repository/Require/RunScript/Show/Suggests/Update command tests. All ignored: they need the ApplicationTester/initTempComposer harness (Init also reflects into protected helpers). setUp/tearDown not ported. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test(repository): port VCS driver tests ↵nsfisis
(Git/GitHub/GitLab/Bitbucket/Svn/Perforce/Forgejo) Svn/GitBitbucket/Perforce supports pass. GitHub::supports reaches non-strict in_array (todo!()) and Forgejo::supports uses a regex the regex crate cannot compile, so those are ignored. All API-driven cases mock the HttpDownloader (curl) / ProcessExecutor and are stubbed. setUp/tearDown not ported. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test(repository): port PathRepositoryTest as stubsnsfisis
PathRepository does not implement RepositoryInterface and exposes no public getPackages/count/hasPackage (delegation to its inner ArrayRepository is not ported), so the cases cannot be driven; the unversioned ones also need the VersionGuesser. All stubbed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test(package): port RootPackageLoaderTest as stubsnsfisis
All ignored: load() parses require constraints via a look-around regex and the cases mock RepositoryManager / ProcessExecutor / VersionGuesser. Wires up the package/loader test submodule. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test: port SecurityAdvisoryPoolFilter, downloader/command/app stubsnsfisis
All ignored/todo!(): the advisory filter parses affectedVersions via a look-around regex; the Hg/Fossil/Perforce/Archive downloaders and RepositoryManager need mocked process/HttpDownloader (curl); the Validate/ Archive commands, ApplicationTest and CompletionFunctionalTest need the ApplicationTester/console harness. setUp/tearDown not ported. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test(dependency-resolver): port RuleSetTestnsfisis
addWhenTypeIsNotRecognized passes (the type check precedes the hash). All other cases call RuleSet::add, which computes get_hash -> hash_raw (todo!()), and prettyString also mocks RepositorySet/Request; those are ignored. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test: port GitHub/GitLab/Forgejo, Search/CheckPlatformReqs, ZipArchiver stubsnsfisis
All ignored/todo!(): the auth-util tests mock IO/Config/HttpDownloader, the command tests need ApplicationTester, and ZipArchiver builds a zip via ZipArchive (todo!()). setUp/tearDown not ported. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test: port ArtifactRepositoryTest and BinaryInstallerTest as stubsnsfisis
ArtifactRepository reads archives via ZipArchive/PharData (todo!()); BinaryInstaller installs and executes a real PHP binary and mocks a Package. Both stubbed. setUp/tearDown not ported. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test: port TransactionTest and StrictConfirmationQuestionTest as stubsnsfisis
TransactionTest needs Transaction::new (uasort_map todo!()) and non-root link setters; StrictConfirmationQuestionTest needs Symfony QuestionHelper. Both stubbed. Wires up the question test target. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test: port HgDriverTest and RootAliasPackageTestnsfisis
HgDriver::supports and RootAliasPackage setRequires pass. The other Hg cases need an HgDriver instance (HttpDownloader/curl, mocked process); the other RootAliasPackage setters only update alias_of, not the alias's own copy, so those getters stay empty. All such cases ignored. setUp/tearDown not ported. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test(cache): port CacheTestnsfisis
clearCache verified against a real Cache over a temp dir; the gc() cases mock Cache::getFinder (not overridable from a test) and are stubbed. setUp/tearDown not ported. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test: port MetapackageInstallerTest and SelfUpdate/Status/Home command stubsnsfisis
MetapackageInstaller install/uninstall verified against a real InstalledArrayRepository; update reaches version_compare (todo!()) and is ignored. The command tests need the ApplicationTester harness (stubbed). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test(repository): port FilterRepositoryTestnsfisis
All cases pass: only/exclude matching, both-filters guard, disabled child advisories, and canonical vs non-canonical loadPackages. setUp's repository fixture is inlined; teardown not ported. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test(dependency-resolver): port RuleTestnsfisis
equals/type/enable/disable/isAssertion pass; getHash reaches hash_raw (todo!()) and prettyString needs mocked RepositorySet/Request, so both are stubbed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test(package): port BasePackageTestnsfisis
setRepository (same/another) and packageNamesToRegexp pass; the dev-version formatting case mocks abstract BasePackage getters and is stubbed. Adds the test_case helper to the package test target. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test(factory): ignore fails-if-dir to avoid COMPOSER env racensfisis
In the full suite it races test_get_composer_json_path_from_env over the global COMPOSER env; without the deferred tearDown clearing it, only one mutator can run. Keeps from_env as the sole COMPOSER mutator. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test: port IniHelperTest and RepositoryUtilsTestnsfisis
IniHelper cases reach XdebugHandler::get_all_ini_files (todo!()); RepositoryUtils filterRequiredPackages is fully modeled but building linked packages via ArrayLoader parses constraints with a look-around regex the regex crate cannot compile. Both ignored. setUp/tearDown not ported. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test: port ClassLoader/HttpDownloader/Reinstall command testsnsfisis
ClassLoader::getPrefixes verified; loadClass/serializability rely on PHP runtime class loading and serialize() (stubbed). HttpDownloader and Reinstall need curl/ApplicationTester (stubbed). Wires up the autoload test target. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test: port TlsHelperTest and HhvmDetectorTest as stubsnsfisis
TlsHelper is not ported; the HhvmDetector cases are always skipped (no HHVM, no hhvm executable). All ignored/todo!(). setUp not ported. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test(filter): port IgnoreListPlatformRequirementFilterTestnsfisis
Both isIgnored and isUpperBoundIgnored data sets pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test: port Documentation/Xz/Audit/ErrorHandler/PharArchiver tests as stubsnsfisis
All ignored/todo!(): they need infrastructure not yet ported (console Application, HttpDownloader/curl, ApplicationTester, PHP runtime error handler, PharData/ZipArchive). Wires up the downloader test target. setUp/tearDown not ported. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test(repository): port RepositoryFactoryTestnsfisis
generateRepositoryName ported (ignored: integer index is not stringified). The manager case mocks IO/Config/HttpDownloader and uses reflection, so it is stubbed. setUp/tearDown not ported. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test(script): port Script EventTestnsfisis
Both cases ignored: calculate_originating_event is todo!(), and the nested case cannot be expressed since set_originating_event takes a concrete event_dispatcher::Event. setUp/tearDown not ported. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test(factory): port FactoryTestnsfisis
getComposerFile env paths verified. The default-values case mocks IO/Config (unportable); the unset-env case is order-dependent without the deferred tearDown, so both are ignored. setUp/tearDown not ported. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test(repository): port FossilDriverTestnsfisis
Wires up the repository/vcs submodule. setUp/tearDown not ported. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test(composer): port ComposerTestnsfisis
setPackage/setDownloadManager getters verified against real instances. The repository-manager, installation-manager and locker cases build an HttpDownloader, which reaches curl_multi_init (todo!()) in the php-shim, so they are ignored. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test(command): port Diagnose/Exec/ClearCache command testsnsfisis
Stubbed as todo!()/ignored: all need the ApplicationTester/initTempComposer harness, which is not yet ported. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test(json): port JsonFormatterTestnsfisis
Stubbed as todo!()/ignored: Composer\Json\JsonFormatter is not yet ported. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test(util): port MetadataMinifierTestnsfisis
Stubbed as todo!()/ignored: MetadataMinifier::minify is not ported upstream. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test(command): port AboutCommandTestnsfisis
Stubbed as todo!()/ignored: needs the ApplicationTester harness, not yet ported. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test(installer): port InstallerEventTestnsfisis
Ignored: Transaction::new reaches a todo!() (uasort_map) in the php-shim. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test(repository): port InstalledRepositoryTestnsfisis
testAddRepository maps the expected LogicException to #[should_panic] since InstalledRepository::add_repository guards with assert!. testFindPackagesWithReplacersAndProviders is #[ignore] because that assert omits InstalledRepositoryInterface, so adding an InstalledArrayRepository panics before the lookup runs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test(repository): port ArrayRepositoryTestnsfisis
Seven cases pass against ArrayRepository. testAutomaticallyAddAliased... is #[ignore] because AliasPackage::get_unique_name returns the aliased package's unique name rather than the alias's own version, so has_package cannot find the alias version. Adds a shared get_alias_package helper to the test TestCase, building the alias via from_rc_unchecked since the public handle API exposes link/alias construction only indirectly. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test(repository): port CompositeRepositoryTestnsfisis
Six cases pass against ArrayRepository/CompositeRepository. testFindPackage is #[ignore] because constraint string parsing relies on a look-around regex that the regex crate does not support. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test(util): port PackageSorterTestnsfisis
PackageSorter::sort_packages reaches strnatcasecmp (a todo!() in the php-shim) whenever it compares equally-weighted packages, so the cases are #[ignore]. createPackage is reconstructed via ArrayLoader because the public handle API only exposes link setters on root packages. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test(advisory): port AuditConfigTestnsfisis
Config::merge reaches array_merge (a todo!() in the php-shim), so the cases that build a Config are #[ignore]. testMixedFormats additionally relies on integer-key handling that AuditConfig::parse_ignore_with_apply does not yet implement. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>