From 720f0d5503098cd6eee7562df58ca6f1d86a642c Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Fri, 26 Sep 2025 18:17:03 +0200 Subject: [PATCH 1/3] Allow new psr/log & monolog --- composer.json | 4 ++-- src/Readability.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index b3116b7..56f5722 100644 --- a/composer.json +++ b/composer.json @@ -26,12 +26,12 @@ "require": { "php": ">=5.6.0", "ext-mbstring": "*", - "psr/log": "^1.0", + "psr/log": "^1.0.1 || ^2.0 || ^3.0", "masterminds/html5": "^2.7" }, "require-dev": { "friendsofphp/php-cs-fixer": "^2.14", - "monolog/monolog": "^1.24|^2.1", + "monolog/monolog": "^1.24|^2.1|^3.0", "symfony/phpunit-bridge": "^4.4|^5.3|^6.0|^7.0" }, "suggest": { diff --git a/src/Readability.php b/src/Readability.php index d6fcbe2..7450f4d 100644 --- a/src/Readability.php +++ b/src/Readability.php @@ -186,7 +186,7 @@ class Readability implements LoggerAwareInterface /** * @return void */ - public function setLogger(LoggerInterface $logger) + public function setLogger(LoggerInterface $logger): void { $this->logger = $logger; } From 0b21d4ab2d53f2ab759aa0a8bf126b3868b24a32 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Fri, 26 Sep 2025 18:19:16 +0200 Subject: [PATCH 2/3] Clean --- .github/workflows/continuous-integration.yml | 40 -------------------- src/Readability.php | 3 -- 2 files changed, 43 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index a01f3c4..1778b3f 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -155,43 +155,3 @@ jobs: - name: "Run PHPUnit" run: "php vendor/bin/simple-phpunit -v" - - phpunit-composerv2: - name: "PHPUnit with Composer v1 (PHP ${{ matrix.php }})" - runs-on: "ubuntu-latest" - - strategy: - matrix: - php: - - "7.4" - - steps: - - name: "Checkout" - uses: "actions/checkout@v2" - with: - fetch-depth: 2 - - - name: "Install PHP" - uses: "shivammathur/setup-php@v2" - with: - php-version: "${{ matrix.php }}" - coverage: "none" - tools: composer:v1 - extensions: tidy - ini-values: "date.timezone=Europe/Paris" - env: - COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: "Remove useless deps" - run: "composer remove friendsofphp/php-cs-fixer --dev --no-progress --no-update" - - - name: "Install dependencies with Composer" - uses: "ramsey/composer-install@v1" - with: - composer-options: "--optimize-autoloader --prefer-dist" - - - name: "Setup logs" - run: "mkdir -p build/logs" - - - name: "Run PHPUnit" - run: "php vendor/bin/simple-phpunit -v" diff --git a/src/Readability.php b/src/Readability.php index 7450f4d..bb9e9f6 100644 --- a/src/Readability.php +++ b/src/Readability.php @@ -183,9 +183,6 @@ class Readability implements LoggerAwareInterface $this->loadHtml(); } - /** - * @return void - */ public function setLogger(LoggerInterface $logger): void { $this->logger = $logger; From e6ca6f117fa9c6e71d9dcb3e659f6610370060fa Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Fri, 26 Sep 2025 18:21:56 +0200 Subject: [PATCH 3/3] Drop PHP < 7.2 --- .github/workflows/continuous-integration.yml | 5 +---- composer.json | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 1778b3f..36cbac3 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -21,9 +21,6 @@ jobs: strategy: matrix: php: - - "5.6" - - "7.0" - - "7.1" - "7.2" - "7.3" - "7.4" @@ -122,7 +119,7 @@ jobs: strategy: matrix: php: - - "7.2" + - "7.4" steps: - name: "Checkout" diff --git a/composer.json b/composer.json index 56f5722..8a3a5ba 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ "role": "Developer (original JS version)" }], "require": { - "php": ">=5.6.0", + "php": ">=7.2", "ext-mbstring": "*", "psr/log": "^1.0.1 || ^2.0 || ^3.0", "masterminds/html5": "^2.7"