Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
strategy:
matrix:
php: ['8.4', '8.5']
dependencies: [highest, lowest]

steps:
- uses: actions/checkout@v7
Expand All @@ -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
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 2 additions & 1 deletion test/PhpFeaturesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ public function testPsrLoggerReceivesMessages(): void
/** @var list<string> */
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;
}
Expand Down