structured-data icon indicating copy to clipboard operation
structured-data copied to clipboard

Upgrade to PHP 8.4 DOM

Open adamjgriffith opened this issue 7 months ago • 3 comments

PHP 8.4 has been released with a rewrite to the ext-dom extension. These classes are compatible with HTML 5 and are WHATWG spec-compliant; solving long-standing bugs in the DOM extension.

See: https://www.php.net/manual/en/migration84.new-features.php#migration84.new-features.dom

Would you consider a PR to upgrade this package?

adamjgriffith avatar May 05 '25 09:05 adamjgriffith

Hi, yes I would most definitely accept a PR! How do you see this?

  • use the new DOM API when PHP >= 8.4 is detected, and fall back to the old API otherwise
  • or require PHP 8.4 from now on?

BenMorel avatar May 06 '25 13:05 BenMorel

I would imagine as this package receives little updates we could just bump the major (minor in this case as it's still 0.x) and enforce a PHP 8.4 minimum version. What do you think?

adamjgriffith avatar May 06 '25 15:05 adamjgriffith

I don't mind bumping the minimum requirement to 8.4. This package doesn't have many users yet, and I'm about to do the same for brick/geo anyway, as I will need PHP 8.4 feature for the next version, too.

BenMorel avatar May 06 '25 22:05 BenMorel