Repository navigation
chore: require webisters/cache ^2.0 and report skipped preloads - #22
Merged
Merged
Conversation
webisters/cache 2.0.0 is out and the constraint of ^1.0 could not reach it, so a fresh install of the metapackage kept resolving to 1.1.1 and none of that release landed for anyone installing the framework. Checked every other webisters requirement against the latest published version at the same time. cache was the only one a constraint was holding back; the rest already resolve to their newest release. Verified against the real published packages rather than the local path repositories: composer update pulled cache 2.0.0 and autoload 1.1.0 from Packagist, composer validate is clean and the suite passes. Also made preload.php report what it skipped. autoload 1.1.0 changed Preloader::load() to skip a file it cannot require instead of aborting the whole preload, which is what makes this install work at all: this metapackage does not require psr/simple-cache, so preloading used to die on Framework\Cache\SimpleCache with "Interface not found". It now preloads 258 files and skips 2, and the script says which 2 and why. The information was already being recorded and throwing it away would have left a silently shorter preload looking like a working one. Confirmed both halves in a simulated vendor layout: the default load() completes with the two files skipped, and load(false), which is the pre-1.1.0 behaviour, still aborts on the first one.
.gitignore listed .phpunit.result.cache, the PHPUnit 9 file, but not .phpunit.cache, the directory PHPUnit 10 writes instead. So running the suite left a tracked-looking file behind, and I committed one in the previous commit without noticing. Untracked it and added the directory.
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.
webisters/cache2.0.0 is out and the^1.0constraint could not reach it, so a fresh install of the metapackage kept resolving to 1.1.1 and none of that release landed for anyone installing the framework.Checked every constraint, not just this one
webisters/cache^1.0->^2.0, latest is v2.0.0webisters/*cache was the only one a constraint was holding back.
autoloadpicked up v1.1.0 on its own, since that release was a minor.Verified against the published packages, not the path repositories
This is the point of the exercise, so it was done with
composer.jsonagainst Packagist rather thancomposer.local.json:composer validateclean, suite green, and no security advisories.preload.php now reports what it skipped
This is the part worth reviewing. autoload 1.1.0 changed
Preloader::load()to skip a file it cannot require instead of aborting, and that change is what makes this install preload at all: the metapackage does not requirepsr/simple-cache, andFramework\Cache\SimpleCacheimplements an interface from it.Confirmed in a simulated vendor layout, both directions:
and with
load(false), which is the pre-1.1.0 behaviour:The script was already being handed the list of skipped files and dropping it, which would have left a silently shorter preload looking like a working one. It now says which files and why, and points at the suggestion that would include them.
Also
.gitignorelisted.phpunit.result.cache, the PHPUnit 9 file, but not.phpunit.cache, the directory PHPUnit 10 writes. Running the suite left an untracked file behind and I committed one before noticing, so that is untracked and the directory ignored. Separate commit.