Repository navigation
Conversation
added 2 commits
November 13, 2026 20:09
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Raises the coverage of the package from 40.5 % to 90.7 % (measured locally with PHP 8.4 and pcov; the recorded ratchet was 36.86), with tests only (
src/is untouched).56 tests (57 to 113) in five new files: the install flow of
NewCommand,SelfUpdateCommand, the prompts configuration,ProjectProxyand the version lookup. There is no network call:tests/Support/Sandbox.phpputs fakecomposer,ddev,phpandgitfirst in thePATHof a temporary folder, andHTTPS_PROXYpoints to a closed local port, so Packagist always fails the same way;tests/Support/FileOverlay.phpletsVersionread an in-memorycomposer.lockorcomposer.json(it replaces thefilestream wrapper for the duration of a test and each test that uses it callsuninstall()inafterEach). Mockery is not installed, soPrompt::fake()cannot be used: the prompts go through their fallbacks, with a stream set on the input.Not covered:
UpdateChecker(65.4 %) andSelfUpdateCommand(62 %) run their remaining lines only with a successful HTTPS answer from Packagist, andnew Clientis hard-coded insrc/, so it cannot be replaced; a fake HTTPS server would need a certificate authority that Guzzle accepts, which depends on the machine and on the CI. A few isolated lines remain inNewCommand(Windows branches, a failed file read),RunsCommandsandProxyCommand.Existing test not changed:
UpdateCheckerTest("does not crash when notifying") makes a real network call and writes to the real~/.pollora/update-check.json.The ratchet in
.harness.jsonis not changed in this pull request: the figure measured locally before any test (40.5 %) is above the recorded one (36.86), so the CI and the local measure differ for this package. It will be set to the value the CI measures, in a follow-up. 113 tests pass in random orders; Pint, PHPStan, Rector (--dry-run),tests/Arch.phpand the type coverage (100 %, threshold 98) are clean.