Skip to content

Improve PHP 8.5 compatibility#3654

Merged
bsweeney merged 1 commit intomasterfrom
php85-compatibility
Sep 20, 2025
Merged

Improve PHP 8.5 compatibility#3654
bsweeney merged 1 commit intomasterfrom
php85-compatibility

Conversation

@bsweeney
Copy link
Copy Markdown
Member

@bsweeney bsweeney commented Sep 1, 2025

  • only use imagedestroy with PHP < 8
  • only use curl_close with PHP < 8
  • use http_get_last_response_headers with PHP >= 8.4
  • use canonical types for casts
  • support SVG processing by getimagesize

addresses #3644

@bsweeney bsweeney added this to the 3.1.1 milestone Sep 1, 2025
@bsweeney bsweeney force-pushed the php85-compatibility branch from b347ac0 to 21054cb Compare September 9, 2025 13:20
@bsweeney bsweeney linked an issue Sep 9, 2025 that may be closed by this pull request
@oleibman oleibman mentioned this pull request Sep 9, 2025
@bsweeney bsweeney force-pushed the php85-compatibility branch 4 times, most recently from 7dfc8c8 to 6eca577 Compare September 13, 2025 19:45
- only use imagedestroy with PHP < 8
- only use xml_parser_free with PHP < 8
- only use curl_close with PHP < 8
- only use setAccessible reflection method with PHP < 8.1
- use http_get_last_response_headers with PHP >= 8.4
- utilize getimagesize support for SVG images
- use canonical types for casts
- improve array key null safety

addresses #3644
@bsweeney bsweeney merged commit 794ec85 into master Sep 20, 2025
35 checks passed
@bsweeney bsweeney deleted the php85-compatibility branch September 20, 2025 17:30
@oleibman
Copy link
Copy Markdown

Great job! I have locked all our active branches to Dompdf 3.1.1, and there are no longer any deprecation notices, for Php8.5, and everything continues to work for 8.5 and earlier Php releases. Let's hope for no more surprises.

@bsweeney
Copy link
Copy Markdown
Member Author

There appears to be an issue with the change to null handling in the font selection logic (#3660). I'll need to release an update soon.

@oleibman
Copy link
Copy Markdown

oleibman commented Oct 7, 2025

Just confirming that Dompdf 3.1.2 also works without any issues for us.

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.

Still More Php8.5 Deprecations Yet Another Php8.5 Deprecation Another Php8.5 Deprecation - imagedestroy Deprecation in Php8.5

2 participants