Skip to content

Conversation

@BenjaminHoegh
Copy link

PHP Version Updates:

  • .travis.yml: Removed support for PHP versions 5.3 through 7.0 new range is from 7.1 through 8.4.
  • composer.json: Updated the minimum PHP requirement from >=5.3.0 to >=7.1.0.

Dependency Updates:

  • composer.json: Adjusted the phpunit/phpunit dependency to remove support for versions below ^7.5.

Code Modernization:

  • Parsedown.php: Updated method signatures for blockSetextHeader and blockTable to use nullable type hints (?array) for the $Block parameter. fixing the issue Implicitly marking parameter as nullable is deprecated

This should be safe to release as a 1.8 or 1.7.1 as the only breaking change is the PHP version and people do not really use that old PHP anymore

Fixes Implicitly marking parameter as nullable is deprecated in PHP 8.4 

this also set the minimum php version requirement to 7.1
Minimum PHP version set to 7.1
Minimum PHPUnit set to 7.5
Changed PHP test range to 7.1 to 8.4
Copilot AI review requested due to automatic review settings July 8, 2025 19:48
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR raises the minimum PHP version to 7.1, updates CI and PHPUnit dependencies accordingly, and modernizes two method signatures with nullable type hints.

  • Bump PHP requirement in composer.json from >=5.3.0 to >=7.1.0 and remove old PHPUnit versions below 7.5
  • Update the Travis CI matrix to drop PHP <7.1 and add PHP 8.0–8.4
  • Add ?array nullable hints to blockSetextHeader and blockTable in Parsedown.php

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
composer.json Updated PHP requirement and removed legacy phpunit versions
.travis.yml Removed PHP 5.3–7.0, added PHP 8.0–8.4 in CI matrix
Parsedown.php Changed method signatures for blockSetextHeader and blockTable to use ?array hints
Comments suppressed due to low confidence (3)

Parsedown.php:715

  • The docblock above this method should be updated to reflect the new nullable type, for example @param array|null $Block.
    protected function blockSetextHeader($Line, ?array $Block = null)

Parsedown.php:853

  • Please update the docblock for this method to indicate @param array|null $Block to match the nullable signature.
    protected function blockTable($Line, ?array $Block = null)

composer.json:16

  • [nitpick] Consider updating the project README or CHANGELOG to call out the new minimum PHP requirement (>=7.1.0) so users are aware of the breaking change.
        "php": ">=7.1.0",

@dregad
Copy link

dregad commented Dec 8, 2025

Parsedown 1.7.5 with PHP 8.4/8.5 compatibility was released in the parsedown/parsedown fork.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants