[cache] Standardize cache contract across commands (#162)#170
Merged
Conversation
Contributor
|
🚀 Preview is available for this pull request. |
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.
Related Issue
Closes #162
Motivation / Context
This standardizes the cache contract across cache-aware commands so callers can keep the command default, force cache on, or force cache off with the same mental model. It also makes orchestration commands carry explicit cache intent and nested cache directories consistently.
Changes
HasCacheOptionhelper for--cache,--cache-dir, and nested cache-dir resolutiontests,docs,wiki, andphpdocto follow the same cache contractreportsandstandardsto propagate explicit cache intent and explicit nestedcache-dirvalues to child commands--cache/--no-cacheVerification
./vendor/bin/phpunit tests/Console/Command/DocsCommandTest.php tests/Console/Command/TestsCommandTest.php tests/Console/Command/PhpDocCommandTest.php tests/Console/Command/WikiCommandTest.php tests/Console/Command/ReportsCommandTest.php tests/Console/Command/StandardsCommandTest.phpcomposer dev-tools changelog:checkgit diff --check--no-cachebehavior fortests,phpdoc,docs, andwikireportsandstandardsconfirming argument propagation before the known/dev/ttysubprocess limitation in this environmentDocumentation / Generated Output
tests,docs,wiki,phpdoc,reports, andstandardsdocs/running/specialized-commands.rstanddocs/usage/testing-and-coverage.rstUnreleasedChangelog
Changedentry for the standardized cache contract and nested cache-dir propagationReviewer Notes
composer dev-tools:fixand directreports/standardssubprocess execution still hit the existing/dev/ttyenvironment limitation here; that is not introduced by this change.github/wikiremains a separate local change and is intentionally excluded from this PR