Skip to content

chore: require webisters/cache ^2.0 and report skipped preloads - #22

Merged
HafizMMoaz merged 2 commits into
mainfrom
chore/require-cache-2
Nov 1, 2026
Merged

HafizMMoaz merged 2 commits into
mainfrom
chore/require-cache-2

Conversation

@HafizMMoaz

Copy link
Copy Markdown
Member

webisters/cache 2.0.0 is out and the ^1.0 constraint 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.0
every other webisters/* already resolves to its newest release

cache was the only one a constraint was holding back. autoload picked 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.json against Packagist rather than composer.local.json:

- Upgrading webisters/cache (v1.1.1 => v2.0.0)
- Upgrading webisters/autoload (v1.0.2 => v1.1.0)

composer validate clean, 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 require psr/simple-cache, and Framework\Cache\SimpleCache implements an interface from it.

Confirmed in a simulated vendor layout, both directions:

Total of 258 preloaded files.

Skipped 2 file(s):
1) .../webisters/cache/src/SimpleCache.php
   Interface "Psr\SimpleCache\CacheInterface" not found
2) .../webisters/cache/src/SimpleCacheInvalidArgumentException.php
   Interface "Psr\SimpleCache\InvalidArgumentException" not found
Install the suggested packages to preload these too.

and with load(false), which is the pre-1.1.0 behaviour:

strict load aborts with: Interface "Psr\SimpleCache\CacheInterface" not found

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

.gitignore listed .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.

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.
@HafizMMoaz
HafizMMoaz merged commit f7eb661 into main Nov 1, 2026
2 checks passed
@HafizMMoaz
HafizMMoaz deleted the chore/require-cache-2 branch November 1, 2026 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant