Widen dependency constraints for better co-installability#49
Merged
Conversation
- psr/log: ^1.0 || ^2.0 || ^3.0 — the library only consumes LoggerInterface (nullable constructor option, log calls), so every major is compatible. Adjust the anonymous logger in the test suite to an untyped signature valid against all three majors. - rowbot/url: ^3.1.7 || ^4.0 — rowbot/url 4.1 hard-requires psr/log ^3 and brick/math ^0.12||^0.13, both frequent sources of version conflicts in host applications; 4.0 and 3.1.7 accept older brick/math (and 3.x drops the psr/log requirement entirely), giving Composer's solver room without installing anything extra when no conflict exists. The full test suite passes on 4.1.0, 4.0.0 and 3.1.7 (3.x only ever loads on PHP 8.4; 8.5+ uses native Uri\WhatWg\Url). - CI: run the test suite against both highest and lowest resolved dependency versions (composer update --prefer-lowest) so the advertised lower bounds stay tested. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CDNFjQwP4iZJiawvGBTZWw
fivefilters
marked this pull request as ready for review
July 18, 2026 14:20
Convert the Unreleased section into the v4.0.0 entry. The entry notes explicitly that v4.0.0 includes all changes from v4.0.0-beta.1 and lists only the delta since beta.1, keeping the beta's own entry intact for users who tracked the pre-release. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CDNFjQwP4iZJiawvGBTZWw
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.
Makes it easier to install readability.php into applications whose other dependencies pin different versions of our (transitive) dependencies, without changing the PHP minimum or the versions Composer installs by default.
What changed
psr/log:^2.0 || ^3.0→^1.0 || ^2.0 || ^3.0. The library only consumesLoggerInterface(a nullable constructor option and$logger?->debug()calls); it never implements it, so every major works. The anonymous logger inPhpFeaturesTestnow uses an untypedlog()signature that is valid against all three majors (the previous typed signature fatals under psr/log 1.x).rowbot/url:^4.1→^3.1.7 || ^4.0. rowbot/url 4.1 hard-requirespsr/log ^3.0andbrick/math ^0.12 || ^0.13— both frequent conflict sources in host apps (e.g. olderramsey/uuidpins older brick/math, and the psr/log ^3 requirement made our own^2.0alternative unsatisfiable in practice). Allowing 4.0 and 3.1.7 gives Composer's solver room; nothing changes for apps without conflicts, since Composer still resolves to the newest allowed version.highestandlowestresolved dependencies (composer update --prefer-lowest --prefer-stable) on PHP 8.4 and 8.5, so the advertised lower bounds stay tested. Psalm still runs on highest only.Verification
Full suite (485 tests, 1080 assertions) plus Psalm run locally on PHP 8.4 (the version that actually exercises rowbot/url — 8.5+ uses native
Uri\WhatWg\Url):--prefer-lowestCaveat worth deciding on
rowbot/url 3.1.7 emits 10 PHP 8.4 implicit-nullable deprecation notices from its own code when loaded (behavior is unaffected; all tests pass). Since it only loads on PHP 8.4 and only when another dependency forces the downgrade, I kept it in the constraint — maximum solver room. If you'd rather not advertise a version that emits deprecations, trimming to
^4.0 || ^4.1still captures the brick/math flexibility and is a one-line change.🤖 Generated with Claude Code