Add xmlwriter and xmlreader extensions - #314
Conversation
|
Thanks for your contribution @KaWaiIhA. We intentionally don't add extensions not natively required by Laravel to keep the binaries slim and our maintenance burden small. We have documentation here on how you can build your own binaries with additional extensions for this reason: https://nativephp.com/docs/desktop/2/digging-deeper/php-binaries As your use case is for a third-party package, can I recommend you utilise this route instead? Unless there is a general need for an extension across the majority of the userbase, we tend to leave it for you to customise. :) |
Makes total sense, thanks for the quick response! I'll build a custom binary |
PhpSpreadsheet (a common library for reading/writing Excel files) requires
ext-xmlwriter unconditionally to write any .xlsx file — it's instantiated
directly throughout its writer code with no fallback. It's currently missing
from the default extension list, so any NativePHP app that writes Excel files
hits a fatal
Class "XMLWriter" not founderror when saving.Adding xmlreader too, since PhpSpreadsheet lists it as a hard composer.json
requirement as well, even though my own use case only hit the xmlwriter gap.
Confirmed both are supported on Windows/Linux/macOS per static-php-cli's own
extension support table: https://static-php.dev/en/guide/extensions.html