Require container-contract ^1.1 instead of pinning 1.0.4 - #23
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Enterprise Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review. 📝 WalkthroughWalkthroughThe Composer constraint for ChangesContainer contract dependency
Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk: ⚪ Minimal · up to This PR updates the container-contract dependency constraint and lockfile without any supplied merge-blocking risk; it is merge-ready after normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.) ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Description
stellarwp/container-contracthas been pinned to an exact1.0.4since the initial commit, andnever revisited. That pin is unsatisfiable alongside any package requiring
^1.1.It's happening with
stellarwp/plugin-absorber. It requires the contract at^1.1(1.1.0 iswhere
get()gained the@template/class-stringconditional return that lets its PHPStan level 9type container resolutions), and
learndash-coreneeds both libraries in the same tree.Why the pin protects nothing
This library touches the contract in exactly one file.
src/Config.phptype-hintsContainerInterfaceonsetServiceContainer()/getServiceContainer()and stores it. It nevercalls
get(),bind(),has()orsingleton().The whole
1.0.4 → 1.1.2diff onsrc/ContainerInterface.phpis PHPDoc —@template T of objectand
@phpstan-return ($id is class-string<T> ? T : mixed)onget(),string|class-stringon the$idparams, a corrected@return voidonbind()— plus adeclare( strict_types=1 )on a filethat declares an interface and therefore contains no method bodies. No signature changes, so nothing
implementing the interface at 1.0.4 stops implementing it at 1.1.2.
Why
^1.1and not^1.0.4^1.0.4would have been the smaller change, but^1.1is the one worth making: it puts thislibrary on the generics as well, so a consumer's static analysis gets the same typed
get()thatmotivated the requirement in
plugin-absorber. A consumer that cannot move to 1.1.x simply stays on1.5.0.
Summary by CodeRabbit