Generally, omitting the XML declaration for an external SVG doesn't harm anybody - since the declaration you're adding (<?xml version="1.0"?>) is the default anyway ;-) On the other hand, including an XML declaration on an inline SVG might irritate some parsers. Conclusion: When in doubt, it's safer to exclude it, so this should be the default always.
If somebody really wants to have it, it's very easy to just add this line manually above the outputted QR code. On the other hand, removing it manually is not so easy.
So in total I'd say: Drop this option completely, and always exclude the XML declaration, and add a short note to README that people might want to add this single line manually for external SVG's. I think this would make it easier for anybody :-)
Loosely following up on https://github.com/endroid/qr-code/issues/151, some thoughts about this:
qr_code_data_uri()
of the Symfony bundle: https://github.com/endroid/qr-code-bundle#generate-via-twig<?xml version="1.0"?>
) is the default anyway ;-) On the other hand, including an XML declaration on an inline SVG might irritate some parsers. Conclusion: When in doubt, it's safer to exclude it, so this should be the default always.So in total I'd say: Drop this option completely, and always exclude the XML declaration, and add a short note to README that people might want to add this single line manually for external SVG's. I think this would make it easier for anybody :-)