Repository navigation
Doxswap 2.0 refactors the package around constructor injection and slimmer format classes, and fixes several conversion bugs.
This is a major release with breaking changes. Apps that only call Doxswap::convert() through the facade usually need no code changes. Apps that catch specific exceptions, build Doxswap classes with new, or add custom formats should read the upgrade guide.
Breaking changes
- LibreOffice failures and timeouts throw
ConversionFailedException, not Symfony'sProcessFailedException. The original exception is available fromgetPrevious(). - Classes take their settings through constructors. Resolve them from the container (
app('doxswap')or the facade) instead of usingnew. ConvertibleFormat::getDriver()now takes the target format. Custom formats should extendAbstractFormatorAbstractImageFormat.Filename::rename()is now an instance method.
New
Doxswap::supports($from, $to)andDoxswap::supportedFormats().drivers.process_timeoutconfig option (DOXSWAP_PROCESS_TIMEOUT, default 120 seconds,nullfor no limit).LIBREOFFICE_PATHenv var, withLIBRE_OFFICE_PATHstill read as a fallback.FormatNotFoundExceptionandImagickExtensionNotFoundException.- Config changes made at runtime now apply to later conversions.
Fixes
- Output names keep the original filename:
docx-guide.docxnow converts todocx-guide.pdfinstead of failing. - File extensions and target formats are matched regardless of case, so
Report.DOCXand'PDF'work. - With
perform_cleanupon, the input file is deleted at the path passed toconvert(), so nested inputs likereports/input.docxare cleaned up correctly. - Tested on Laravel 12 and 13.
Full Changelog: v1.0.3...v2.0.0