Conversation
There was a problem hiding this comment.
Pull request overview
Adds a --verbose flag to the checksecuritytxt.php CLI so that previously-always-printed informational messages (loading URLs, redirects, not-found attempts) are now only emitted when requested, while keeping the rest of the CLI output unchanged.
Changes:
- Add
--verboseCLI option and update usage/help text. - Add a
$verboseparameter toSecurityTxtCheckHostCli::check()and conditionally print URL/redirect/not-found info. - Update and extend CLI tests to cover non-verbose output.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tests/Check/SecurityTxtCheckHostCliTest.phpt | Updates existing calls for the new parameter and adds a non-verbose expectation test. |
| src/Check/SecurityTxtCheckHostCli.php | Adds $verbose param and wraps URL/redirect/not-found info hooks behind it. |
| bin/checksecuritytxt.php | Parses --verbose and documents it in usage output. |
Comments suppressed due to low confidence (1)
src/Check/SecurityTxtCheckHostCli.php:34
SecurityTxtCheckHostCli::check()added a new required$verboseparameter in the middle of the public method signature. This is a backwards-incompatible change for any external callers using positional arguments (their old$strictModevalue will now be interpreted as$verbose). Consider preserving BC by keeping the old parameter order and adding a new optional parameter at the end (or introducing an options object/DTO), then update the CLI script/tests accordingly.
public function check(
?Url $url,
?int $expiresWarningThreshold,
bool $colors,
bool $verbose,
bool $strictMode,
bool $requireTopLevelLocation,
bool $noIpv6,
bool $showUsageHelp,
string $usageHelp,
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Adds a --verbose flag to the bin/checksecuritytxt.php CLI so that “Loading security.txt from …”, “Redirected from … to …”, and “Not found …” messages are only printed when explicitly requested, while keeping the rest of the CLI output intact.
Changes:
- Add a new
$verboseparameter toSecurityTxtCheckHostCli::check()and gate URL/redirect/not-found callbacks behind it. - Add
--verboseflag handling and update CLI usage/help text inbin/checksecuritytxt.php. - Update and extend CLI
.phpttests to cover verbose vs non-verbose output.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/Check/SecurityTxtCheckHostCli.php |
Introduces $verbose and conditionally registers fetch/redirect/not-found output callbacks. |
bin/checksecuritytxt.php |
Parses --verbose argument and updates usage/help text accordingly. |
tests/Check/SecurityTxtCheckHostCliTest.phpt |
Updates existing tests for the new parameter and adds a non-verbose test case. |
Comments suppressed due to low confidence (1)
src/Check/SecurityTxtCheckHostCli.php:35
SecurityTxtCheckHostCli::check()gained a new required$verboseparameter inserted in the middle of the argument list. This is a backwards-incompatible public API change (existing positional calls will now fatal due to missing argument). To preserve BC, consider adding$verboseas an optional parameter at the end (defaulting to false), or introducing an options object/array while keeping the old signature available.
public function check(
?Url $url,
?int $expiresWarningThreshold,
bool $colors,
bool $verbose,
bool $strictMode,
bool $requireTopLevelLocation,
bool $noIpv6,
bool $showUsageHelp,
string $usageHelp,
): void {
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
If specified, the following messages will be printed: - Loading security.txt from ... - Redirected from ... to ... - Not found ... They were always printed until now.
There was a problem hiding this comment.
Pull request overview
Adds an opt-in --verbose flag to the checksecuritytxt.php CLI so that fetch progress details (loaded URLs, redirects, and “not found” messages) are only printed when explicitly requested, while keeping the core “Using …” message.
Changes:
- Add
--verboseargument parsing and usage text tobin/checksecuritytxt.php. - Update
SecurityTxtCheckHostClito accept averboseparameter and gate URL/redirect/not-found output accordingly. - Adjust CLI tests to cover both verbose and non-verbose output, including switching between the two within a single CLI instance.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/Check/SecurityTxtCheckHostCliTest.phpt | Updates call signatures and adds a test to verify verbose vs non-verbose output behavior across sequential runs. |
| src/Check/SecurityTxtCheckHostCli.php | Introduces a per-run $verbose flag and registers callbacks once, printing fetch details only when verbose is enabled. |
| src/Check/SecurityTxtCheckHost.php | Moves fetcher-callback initialization to the constructor to avoid re-registering callbacks on every check() call. |
| bin/checksecuritytxt.php | Adds --verbose flag handling and updates usage/help text accordingly. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Adds a --verbose switch to the checksecuritytxt.php CLI so URL/redirect “progress” messages are only printed when explicitly requested, aligning CLI output with the new default behavior.
Changes:
- Add
--verboseCLI flag and extend help/usage output accordingly. - Gate “Loading…”, “Redirected…”, and “Not found…” messages behind a verbose flag in
SecurityTxtCheckHostCli. - Refactor callback registration to happen once (constructor-time) and update/add CLI tests to cover verbose vs non-verbose behavior across multiple runs.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
bin/checksecuritytxt.php |
Adds --verbose argument parsing and updates usage/help text. |
src/Check/SecurityTxtCheckHostCli.php |
Introduces per-run verbose gating and registers callbacks once to avoid handler accumulation side effects. |
src/Check/SecurityTxtCheckHost.php |
Moves fetcher callback initialization to the constructor (avoids re-registering per check() call). |
tests/Check/SecurityTxtCheckHostCliTest.phpt |
Updates call signatures and adds coverage for verbose then non-verbose execution on the same CLI instance. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…umulate handlers and handler calls
There was a problem hiding this comment.
Pull request overview
This PR adds an opt-in --verbose mode to the bin/checksecuritytxt.php CLI so that URL-level informational messages (loading attempts, redirects, and not-found notices) are only printed when explicitly requested, instead of always.
Changes:
- Add
--verboseargument tobin/checksecuritytxt.phpand document it in usage output. - Gate “Loading…”, “Redirected…”, and “Not found…” messages behind a verbose flag while keeping the final “Using …” line.
- Add/adjust CLI tests to cover a verbose run followed by a non-verbose run on the same CLI instance.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
bin/checksecuritytxt.php |
Parses --verbose, updates usage text, passes verbose flag into the CLI runner. |
src/Check/SecurityTxtCheckHostCli.php |
Introduces a per-run verbose flag and registers callbacks once, printing selected info messages only when verbose. |
src/Check/SecurityTxtCheckHost.php |
Moves fetcher-callback initialization to the constructor (avoids repeated registrations per check() call). |
tests/Check/SecurityTxtCheckHostCliTest.phpt |
Updates call signature for the new verbose argument and adds coverage for verbose vs non-verbose output behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
If specified, the following messages will be printed:
They were always printed until now.