Conversation
all php-css-parser 9
|
Unit tests are happy. Have you had a chance to review changes between 8 and 9? I haven't yet done so to see if there are any breaking changes that need to be addressed. |
|
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 Line Svg/Style.php 89 Method Svg\Style::fromAttributes() should return Svg\Style but return statement is missing. Line Svg/Surface/CPdf.php 1109 Undefined variable: $object Line Svg/Surface/SurfaceCpdf.php 220 Call to an undefined method Svg\Surface\SurfaceCpdf::_convert_gif_bmp_to_png(). |
The only potentially breaking change is MyIntervals/PHP-CSS-Parser#1194. It is unlikely to be breaking, but since it changed the class hierarchy, we considered it worthy of a new major release, just in case. You can allow v8 or v9 in |
|
Thank you for the information. I do plan to start reviewing changes for the next release of SvgLib i the near future. |
What about dropping all unsupported/EOL versions of the dependencies? |
|
I'm fine to do that, though preferably separately as a major release. I know it's not strictly necessary since dependency management will take care of it, but I prefer to do it that way to maintain a clear cut off point. |
|
Makes sense. PHP 7.1 reached EOL in 2019. PHP 8.5 will be released in a few weeks, seems like a nice time for a new release. |
FYI I'll address this issue outside of this PR. |
|
It looks like work needs to be done to make SvgLib compatible with version 9. Running through some local (non-unit) tests I'm getting the following error:
when rendering the following SVG: This was the first problem I encountered, and I stopped looking at that point so there could be other issues. I'll continue to review usage to see what changes would need to be made. |
bsweeney
left a comment
There was a problem hiding this comment.
There are some usage-based compatibility issues that need to be addressed.
|
So in the places where you cast CSS objects to strings, you‘ll need to call |
|
Thank you for the guidance. |
|
Looking through the changelog, I believe that's the only problematic use case in SvgLib. |
Implicit rule value conversion to string was removed in version 9.
|
This would fix #129 |
|
@bsweeney I know you’re probably very busy, but I was wondering if you happen to know when PHP 8.5 support (via the updated php-svg-lib) might be added and tagged in a dompdf release? |
|
I'm finalizing the next Dompdf release now so should be in the near future. |
|
Great, thanks for your fast response! |
allow php-css-parser 9