Problem/Motivation
Deepl support document minification: https://github.com/DeepLcom/deepl-php?tab=readme-ov-file#document-minification
However, extracting the document for minification may fail because the ZipArchive->open call is missing the \ZipArchive::CREATE flag
Steps to reproduce
- Create a docx with a single word 'test'
- Call \DeepL\Translator::translateDocument with $options[TranslateDocumentOptions::ENABLE_DOCUMENT_MINIFICATION]
- Notice the call results in an exception:
Failed to open ... as ZIP file.
Proposed resolution
Add \ZipArchive::CREATE flag to \DeepL\DocumentMinifier::extractZipTo
User interface changes
None
API changes
None
Data model changes
None