- Can I install ggggino/wordbundle in a Laravel application?
- No. The bundle requires symfony/symfony in the ~2.3–2.8 range, while Laravel 10, 11 and 12 depend on Symfony 6.x/7.x components such as http-foundation, console and process. Composer cannot satisfy both constraint sets in a single vendor tree, so the install fails before you write any code. Using --ignore-platform-reqs or hand-editing constraints is not a viable production path. Install phpoffice/phpword directly instead.
- Does ggggino/wordbundle support Laravel 10, 11 or 12?
- No. It is a Symfony2 bundle with no Laravel service provider, no package auto-discovery and no compatibility with modern Symfony components. It targets an EOL Symfony branch, so there is no supported path to current Laravel versions. The underlying PHPWord library it wraps is framework-agnostic and works fine in Laravel on its own.
- What should I use instead of wordbundle to create Word documents in Laravel?
- Use phpoffice/phpword directly. Bind a small WordDocumentService in a Laravel service provider, keep your .docx templates in resources/templates/, and wrap generation in a queued job when output is large. That is roughly 20 lines of glue code and replaces the entire bundle. You get the same generation and templating features without the Symfony2 dependency conflict.
- Is ggggino/wordbundle safe and maintained for production use?
- There is no meaningful adoption signal: 0 stars, 0 dependents, a single maintainer and no issue history, so no community CVE watching or bug triage. Symfony 2.x has been end-of-life since November 2018 with no security patches, and any transitive 2.x package pulled in is equally unpatched. The wrapper itself is unaudited and undocumented. Avoid it for production and depend on PHPWord directly.
- How do I read or parse an uploaded .docx file in Laravel?
- Use PHPWord's IOFactory::load() on the uploaded file path; it reads .docx and .odt reasonably well. Legacy binary .doc files are not supported natively and require third-party conversion first. Complex layouts, embedded charts and nested tables round-trip poorly, so validate parsed output before relying on it.
- How do I generate a Word document from a .docx template in Laravel?
- Use PHPWord's TemplateProcessor with ${placeholder} substitution. Store templates in resources/templates/ and resolve paths through config() or storage_path(), then save the result to storage/app. Wrap generation in a queued job when documents are large or generated in bulk. No Symfony bundle, services.yml or Twig extension is needed.
- Can PHPWord or wordbundle convert .docx to PDF in Laravel?
- No. PHPWord is a document generator and reader, not a high-fidelity rendering engine, and the bundle adds nothing on top of it. PDF output requires LibreOffice headless, a hosted conversion service, or another pipeline stage. Treat PDF as a separate architectural decision rather than expecting it from this package.
- What are the memory limits when generating Word files in Laravel?
- PHPWord builds the document in memory as a DOM-like tree, so large documents or bulk generation will hit memory_limit before they hit CPU. Queue the work, cap document size, and raise the limit only for dedicated workers. For bulk exports, generate one document per job rather than many in a single request.
- What licence does ggggino/wordbundle use?
- MIT on both the bundle and PHPWord, so there is no copyleft contamination or legal exposure. That is the one clean part of the package and it carries over to the underlying library you should use instead. Check the licence of the PHPWord version you pin, since it is the component you actually ship.
- Do I need to port the bundle's Twig extensions or config to Laravel?
- No. The Symfony-specific surface — DI extension, services.yml loading and bundle registration — is boilerplate that maps to a single Laravel service provider of about 20 lines. Use config() for template paths and Blade or plain PHP for any view logic. There is no state, schema or persisted configuration in the bundle, so there is nothing to migrate.