aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe
AgeCommit message (Collapse)Author
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>
2026-06-21test(util-http): port RequestProxyTestnsfisis
Six cases pass against the implemented RequestProxy. The SSL-proxy case depends on curl_version (a todo!() in the php-shim) and is #[ignore]. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test(platform): port VersionTestnsfisis
Version::parse_openssl/parse_libjpeg/parse_zoneinfo_version rely on PCRE patterns that compile_php_pattern in the php-shim cannot yet parse, so the cases are #[ignore] while the test code compiles. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test(util): port ZipTestnsfisis
Zip::get_composer_json relies on ZipArchive, whose constructor is a todo!() in the php-shim, so all cases are #[ignore] while compiling. Reuses the existing PHP Fixtures/Zip archives. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test(util): port NoProxyPatternTestnsfisis
NoProxyPattern::test reaches a todo!() (substr_count) in the php-shim, so all cases are marked #[ignore] while the test code compiles. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21style: apply rustfmt to ported test filesnsfisis
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test(dependency-resolver): port PoolTest with shared TestCase helpersnsfisis
Add tests/common/test_case.rs (get_package, get_version_constraint) ported from the PHP TestCase, included into the dependency_resolver binary via #[path]. PoolTest's testPool/testPackageById/testWhatProvidesWhenPackageCannotBeFound pass; testWhatProvidesPackageWithConstraint is #[ignore] (constraint matching reaches a todo!() in the php-shim). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test(package): port VersionBumperTestnsfisis
Marked #[ignore] because VersionBumper::bump_requirement uses a look-around regex pattern the regex crate cannot compile. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test(package): port CompletePackageTestnsfisis
All four cases pass: naming/versioning/marshalling semantics across the versioning-scheme provider, and target-dir normalization. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test(dependency-resolver): port RuleSetIteratorTestnsfisis
Both testForeach and testKeys pass. The PHP foreach over the Iterator is reproduced with the ported valid()/current()/key()/next() methods; the original assertEquals on rule objects is checked via Rc::ptr_eq since the iterator yields the same Rc instances. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test(util): port ConfigValidatorTestnsfisis
Reuses the existing PHP Fixtures composer_*.json. All four cases are marked #[ignore] because ConfigValidator::validate reaches a todo!() in the php-shim. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test(util): port UrlTestnsfisis
Both testUpdateDistReference and testSanitize are marked #[ignore] because the underlying regex patterns cannot be compiled by the regex crate. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test(io): port NullIOTestnsfisis
All eight cases pass against NullIO's no-op IOInterfaceImmutable methods. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test(util): port ProxyItemTestnsfisis
Both testThrowsOnMalformedUrl and testUrlFormatting are marked #[ignore] because ProxyItem::new reaches a todo!() in the php-shim. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test(dependency-resolver): port RequestTestnsfisis
Both cases pass. AnyConstraint has no PartialEq (foreign crate), so the assertEquals on the requires map is reproduced via Debug-representation comparison. The unused ArrayRepository setup from the original is omitted. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test(util): port TarTestnsfisis
All cases reuse the existing PHP fixtures under composer/tests/Composer/Test/Util/Fixtures/Tar. Marked #[ignore] because PharData::new is todo!() in the php-shim. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test(package): port VersionParserTestnsfisis
Both testParseNameVersionPairs (lookbehind/lookahead pattern unsupported by the regex crate) and testIsUpgrade (reaches a todo!() in the php-shim) are marked #[ignore]. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test: port ForgejoUrl, Silencer, PlatformRequirementFilterFactory testsnsfisis
Factory's instance-creation tests pass. ForgejoUrl (undelimited regex panic), Silencer (trigger_error/microtime todo!()), and the factory's unknown-type case (get_debug_type todo!()) are marked #[ignore]. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test: port BufferIO, Runtime, JsonValidationException testsnsfisis
JsonValidationExceptionTest passes. BufferIOTest (set_user_inputs is todo!()) and RuntimeTest (html_entity_decode is todo!()) are marked #[ignore]. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test: port small leaf tests (config, filters, platform, formatter)nsfisis
Port DefaultConfigTest, IgnoreAll/IgnoreNothingPlatformRequirementFilterTest, PlatformTest, GitExcludeFilterTest, and HtmlOutputFormatterTest. Each PHP Test/<Subdir>/ maps to a single integration-test binary via tests/<dir>/main.rs (the target is named after the directory) whose #[test] functions are collected from the module tree. Tests that exercise unported library behavior (regex backreferences, Preg::split, env expansion) are marked #[ignore]. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test: add empty test filesnsfisis
2026-06-20feat(symfony-process): port full Process class from PHPnsfisis
Faithfully port every method, field and constant of Symfony's Process.php into process.rs, replacing the reduced stub. Add the supporting pipes module (PipesInterface/AbstractPipes/UnixPipes/ WindowsPipes), ProcessUtils and the missing process exceptions (LogicException/InvalidArgumentException) with constructors. Methods now return anyhow::Result where PHP throws, take the env argument and a bool-returning callback, and borrow &mut for status-updating accessors; all callers are updated accordingly. Extend the php-shim with proc_open/proc_close (PHP-compatible signatures), proc_get_status, proc_terminate, posix_kill, uniqid, ftruncate, ftell_stream, fseek3, stream_get_contents3 and env helpers. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-20feat(php-shim): implement parse_url and filter_var URL/boolean filtersnsfisis
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>
2026-06-20test(cli): un-ignore no-longer-panicking command testsnsfisis
run-script, search, show, and update no longer panic; they exit with argument errors, which run_no_panic treats as success. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-20feat(outdated): proxy execute to show via shared Applicationnsfisis
The execute() proxy was left as todo!(); wire it to the shared Application handle so `outdated` re-enters the run flow as `show -l`, matching PHP's $this->getApplication()->run(). Add Application::shared() to expose the new_shared self-reference and un-ignore run_outdated. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-20feat(finder): implement Finder traversal and filter pipelinensfisis
Replace the todo!() stubs with an inline port of symfony/finder's searchInDirectory() pipeline, materializing entries as PathBuf in place of SplFileInfo. Also port Glob::toRegex, needed for glob name patterns. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-20fix(path): propagate PathBufnsfisis
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-20feat(clear-cache): implement ClearCacheCommand::executensfisis
Port the command body: resolve Config from tryComposer()'s composer or Factory::createConfig(), then clear or garbage-collect each cache-* path via Cache. try_composer is already implemented, so the prior blocker comment is stale. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-20feat(console): implement doRenderThrowable exception renderingnsfisis
Port Symfony's Application::doRenderThrowable so command failures render the error box instead of hitting todo!(). This unblocks six CLI no-panic tests (config, depends, global, prohibits, remove, repository), whose ignore attributes are now removed. Also fill in the php-shim functions on the render path that were still todo!(): php_exception_get_code, intval, str_pad, str_split, mb_detect_encoding, mb_convert_encoding, mb_strwidth, mb_convert_variables. PHP file/line and the verbose getTrace() block have no faithful Rust equivalent; file/line use PHP's own 'n/a' fallback and the trace block is intentionally omitted. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>