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..6dac749 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,14 @@ # Change Log All notable changes to this project will be documented in this file. +## [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 +- 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; }