Download the PHP package nowo-tech/html-to-word-bundle without Composer
On this page you can find all versions of the php package nowo-tech/html-to-word-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nowo-tech/html-to-word-bundle
More information about nowo-tech/html-to-word-bundle
Files in nowo-tech/html-to-word-bundle
Package html-to-word-bundle
Short Description Symfony bundle: HTML (WYSIWYG output) → DOCX with named YAML profiles, PHPWord, sanitization and tagged transformers.
License MIT
Homepage https://github.com/nowo-tech/HtmlToWordBundle
Informations about the package html-to-word-bundle
HtmlToWordBundle
⭐ Found this useful? Install from Packagist (
composer require nowo-tech/html-to-word-bundle) and consider starring HtmlToWordBundle on GitHub.
Symfony bundle that converts rich HTML (WYSIWYG output from TipTap, CKEditor, etc.—already rendered server-side) into a downloadable .docx using PHPWord, with:
- named YAML profiles + default profile + deep merge with per-call options, or
convertWithInlineProfile()for a full stored profile (no YAML merge); - sanitization and HTML5 parsing (masterminds/html5);
- tagged transformers for block elements (
p, headings, lists, tables, images, …); - remote & inline images — optional download of
http(s)://<img src>to temp paths before PhpWord, with cleanup after DOCXsave; - optional header/footer (logo, text, page numbers) per profile;
- Symfony-friendly export: streamed/binary responses, local path, optional Flysystem. This bundle does not render Twig, generate HTML, produce PDF, or edit existing Word files.
This bundle is FrankenPHP worker mode friendly.
Quick start
Register Nowo\HtmlToWordBundle\HtmlToWordBundle if Flex does not, then add config/packages/nowo_html_to_word.yaml (see Configuration).
Both host kinds are supported: see Standard Symfony host (zero config) and
DDD / hexagonal host (framework-free DocumentWriterInterface).
Requirements
- PHP 8.2+
- Symfony 6.4 / 7.4+ / 8.x (components declared in
composer.json; Symfony 7.0–7.3 are not supported) - Extensions:
dom,json,libxml
Version information
Stable releases are tagged on GitHub; upgrade notes are in docs/CHANGELOG.md.
Versioning
This library follows Semantic Versioning.
Development
Use the root Makefile and docker-compose.yml:
The PHP Docker image installs extensions required by PHPWord (including GD). Demo apps live under demo/ (see worker audit.
Documentation
- Installation
- Configuration
- Usage
- Contributing
- Code of Conduct
- Changelog
- Upgrading
- Release
- Security
- Engram
- Spec-driven development
- GitHub Spec Kit
Additional documentation
- GitHub Actions CI requirements
- PSR evaluation (REQ-CS-007)
- FrankenPHP demos — how
demo/symfony8runs in Docker. - FrankenPHP worker audit — scenario B (no kernel reset) findings and remediations.
- Example YAML profiles are shipped as
src/Resources/config/nowo_html_to_word.yaml(copy into your app’sconfig/packages/).
Tests and coverage
| Scope | Detail |
|---|---|
| PHPUnit | composer test — unit tests under tests/Unit, integration tests under tests/Integration (minimal Symfony kernel in tests/Fixtures/AppKernel.php). |
| PHP lines | Run composer test-coverage for the console summary, or composer coverage-check (same report written to coverage-output.txt, fails below 100% global lines). Latest reported global line coverage: 100% (PCOV; src/Engine excluded in phpunit.xml.dist; a few defensive branches are marked @codeCoverageIgnore where impractical to hit in CI). |
CI runs tests, PHPStan, and PHP-CS-Fixer on push/PR (see .github/workflows/ci.yml).
License
Released under the MIT License.
All versions of html-to-word-bundle with dependencies
ext-dom Version *
ext-json Version *
ext-libxml Version *
masterminds/html5 Version ^2.9
phpoffice/phpword Version ^1.3
psr/log Version ^1.1 || ^2.0 || ^3.0
symfony/config Version ^6.4 || ^7.4 || ^8.0
symfony/dependency-injection Version ^6.4 || ^7.4 || ^8.0
symfony/deprecation-contracts Version ^2.5 || ^3.0
symfony/http-foundation Version ^6.4 || ^7.4 || ^8.0
symfony/http-kernel Version ^6.4 || ^7.4 || ^8.0
symfony/yaml Version ^6.4 || ^7.4 || ^8.0