From f57a9cd8662dcee03014dc7940f9e1c6b3a6e639 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 18 Jul 2026 13:55:34 +0000 Subject: [PATCH 1/2] Widen dependency constraints for better co-installability MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 Claude-Session: https://claude.ai/code/session_01CDNFjQwP4iZJiawvGBTZWw --- .github/workflows/main.yml | 11 +++++++++-- CHANGELOG.md | 6 ++++++ composer.json | 4 ++-- test/PhpFeaturesTest.php | 3 ++- 4 files changed, 19 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 92b3858..37c5f0b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,6 +14,7 @@ jobs: strategy: matrix: php: ['8.4', '8.5'] + dependencies: [highest, lowest] steps: - uses: actions/checkout@v7 @@ -25,11 +26,17 @@ jobs: extensions: dom, mbstring tools: composer:v2 - - name: Install dependencies - run: composer install + - name: Install dependencies (highest) + if: matrix.dependencies == 'highest' + run: composer update --no-interaction + + - name: Install dependencies (lowest) + if: matrix.dependencies == 'lowest' + run: composer update --no-interaction --prefer-lowest --prefer-stable - name: Run tests run: ./vendor/bin/phpunit - name: Static analysis + if: matrix.dependencies == 'highest' run: ./vendor/bin/psalm --output-format=github --no-progress diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f6eb5e..dd62964 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ # Change Log All notable changes to this project will be documented in this file. +## Unreleased + +### Changed +- Widened dependency constraints so the library co-installs with a broader range of applications: `psr/log` now accepts `^1.0 || ^2.0 || ^3.0` (the library only consumes the interface, so every major works) and `rowbot/url` now accepts `^3.1.7 || ^4.0` (older majors avoid rowbot/url 4.x's hard requirements on `psr/log ^3` and newer `brick/math`, both common sources of version conflicts). Note: rowbot/url 3.x emits PHP 8.4 implicit-nullable deprecation notices internally; it is only loaded on PHP 8.4 (PHP 8.5+ uses the native `Uri\WhatWg\Url`), and Composer still picks 4.x unless another dependency forces an older version +- CI now also runs the test suite against the lowest allowed dependency versions (`composer update --prefer-lowest`) to keep the widened constraints honest + ## [v4.0.0-beta.1](https://github.com/fivefilters/readability.php/releases/tag/v4.0.0-beta.1) Ground-up port from the latest Readability.js (v0.6.0) using Claude's Fable model. Uses PHP 8.4's new DOM API and native parser. See [UPGRADE.md](UPGRADE.md) for the full 3.x → 4.0 migration guide. diff --git a/composer.json b/composer.json index 8e6cf33..0de3169 100644 --- a/composer.json +++ b/composer.json @@ -30,8 +30,8 @@ "php": ">=8.4", "ext-dom": "*", "ext-mbstring": "*", - "psr/log": "^2.0 || ^3.0", - "rowbot/url": "^4.1" + "psr/log": "^1.0 || ^2.0 || ^3.0", + "rowbot/url": "^3.1.7 || ^4.0" }, "suggest": { "ext-uri": "Native WHATWG URL parsing, used automatically on PHP 8.5+ instead of rowbot/url" diff --git a/test/PhpFeaturesTest.php b/test/PhpFeaturesTest.php index 8287682..0dcdf8e 100644 --- a/test/PhpFeaturesTest.php +++ b/test/PhpFeaturesTest.php @@ -107,7 +107,8 @@ public function testPsrLoggerReceivesMessages(): void /** @var list */ public array $messages = []; - public function log($level, string|\Stringable $message, array $context = []): void + // Untyped $level/$message keep this compatible with every psr/log major (v1 has no parameter types). + public function log($level, $message, array $context = []): void { $this->messages[] = (string) $message; } From 52f5d3e82b8c017a40a8d0bb7f6463c757ae9430 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 18 Jul 2026 21:13:30 +0000 Subject: [PATCH 2/2] Prepare changelog for v4.0.0 stable release 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 Claude-Session: https://claude.ai/code/session_01CDNFjQwP4iZJiawvGBTZWw --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dd62964..6dac749 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,9 @@ # Change Log All notable changes to this project will be documented in this file. -## Unreleased +## [v4.0.0](https://github.com/fivefilters/readability.php/releases/tag/v4.0.0) + +First stable release of the 4.0 series — a ground-up rewrite. This release includes **all changes from [v4.0.0-beta.1](https://github.com/fivefilters/readability.php/releases/tag/v4.0.0-beta.1) below** (see [UPGRADE.md](UPGRADE.md) for the 3.x → 4.0 migration guide), plus the following changes since beta.1: ### Changed - Widened dependency constraints so the library co-installs with a broader range of applications: `psr/log` now accepts `^1.0 || ^2.0 || ^3.0` (the library only consumes the interface, so every major works) and `rowbot/url` now accepts `^3.1.7 || ^4.0` (older majors avoid rowbot/url 4.x's hard requirements on `psr/log ^3` and newer `brick/math`, both common sources of version conflicts). Note: rowbot/url 3.x emits PHP 8.4 implicit-nullable deprecation notices internally; it is only loaded on PHP 8.4 (PHP 8.5+ uses the native `Uri\WhatWg\Url`), and Composer still picks 4.x unless another dependency forces an older version