darylldoyle / svg-sanitizer

A PHP SVG/XML Sanitizer
GNU General Public License v2.0
454 stars 67 forks source link

[ask] it's possible to use on php 5.6 ? #80

Closed derryberni closed 1 year ago

derryberni commented 2 years ago

Hello i wanna ask my application use php 5.6 when i'm try to install it no show error and when use it not show error also. there are possibility issue when use php 5.6? because i see support package "php": "^7.0 || ^8.0"

Thanks

darylldoyle commented 1 year ago

Thanks @derryberni, it currently doesn't run on 5.6.

@ohader I remember that 5.6 support was dropped, but I can't remember why. That said, I'd love your thoughts on trying to add back 5.6 support. It seems like WordPress are also considering utilising this library to allow SVG uploads, but since WP maintains 5.6 support, this would be a blocker. See https://github.com/WordPress/performance/issues/427#issuecomment-1225095943.

ohader commented 1 year ago

Hm, I don't think there was a "strong" reason for dropping PHP 5.6 support - basically due to the fact it was officially unsupported at that time already. I know there are PHP5 forks of this library, I'll try to get their opinion on this topic...

ohader commented 1 year ago

The way to a PHP5-compat version does not seem to be too difficult: https://github.com/darylldoyle/svg-sanitizer/compare/master...TYPO3GmbH:svg-sanitize-elts7:master

In case anyone wants to pick that up and re-introduces those commits, just go ahead 👍