Address issues reported by phpstan
phpstan reports the same warnings with both 8 and 9. They should probably be fixed regardless. The signatures are the same, so I imagine they are compatible.
I'm hesitant to fix these, though, because you're still supporting PHP 7.1, and maintaining compatibility with that is awkward. If yo ever release a new version, I'd recommend rector and updating to only supported versions of php.
Very low priority, I just noticed the new version of that library.
phpstan analyze src 29/29 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
Line Svg/Style.php
89 Method Svg\Style::fromAttributes() should return Svg\Style but return statement is missing.
🪪 return.missing
91 Method Svg\Style::fromAttributes() should return Svg\Style but return statement is missing.
🪪 return.missing
Line Svg/Surface/CPdf.php
1109 Undefined variable: $object
🪪 variable.undefined
1111 Undefined variable: $object
🪪 variable.undefined
3624 Call to vsprintf contains 3 placeholders, 4 values given.
🪪 argument.vsprintf
3663 Call to vsprintf contains 3 placeholders, 4 values given.
🪪 argument.vsprintf
Line Svg/Surface/SurfaceCpdf.php
220 Call to an undefined method Svg\Surface\SurfaceCpdf::_convert_gif_bmp_to_png().
🪪 method.notFound
Originally posted by @tacman in https://github.com/dompdf/php-svg-lib/issues/132#issuecomment-3210877715
Curiously _convert_gif_bmp_to_png does not exist for us, but some users seems to have it: https://github.com/search?q=%22_convert_gif_bmp_to_png%22&type=code
Aha, it was renamed from _convert_gif_bmp_to_png to _convert_to_png in https://github.com/dompdf/dompdf/commit/beb89841a14d680b86db8eb1688959334f4a841c
Svg/Surface/CPdf.php Line 1109 Undefined variable: $object Line 1111 Undefined variable: $object
@bsweeney you should look into this as it seems you changed the nearby code in the recent years
I'll review differences between the Dompdf and SvgLib versions for the next release. Thanks for your efforts.