Download the PHP package webfactory/html5-tagrewriter-bundle without Composer

On this page you can find all versions of the php package webfactory/html5-tagrewriter-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package html5-tagrewriter-bundle

WebfactoryHtml5TagRewriterBundle

This bundle provides Symfony integration for the webfactory/html5-tagrewriter package.

Core feature is the Twig filter rewriteTags, which allows sections of HTML5 in Twig templates to be processed by RewriteHandlers. RewriteHandlers can be configured in the container through tags or using an autoconfiguration attribute.

See the webfactory/html5-tagrewriter documentation for details on what a RewriteHandler is and how to implement one. Processing is based on the PHP 8.4 DOM HTML5 parser (Dom\HTMLDocument).

Usage in Twig

Use the rewriteTags filter to process HTML through a TagRewriter:

Registering RewriteHandlers

Using the #[AsRewriteHandler] Attribute (Recommended)

The easiest way to register a RewriteHandler is using the #[AsRewriteHandler] attribute. With autowiring and autoconfiguration enabled, the handler will be automatically registered:

Attribute Options

The #[AsRewriteHandler] attribute accepts two optional parameters:

Using Service Tags

If you need more control or cannot use autoconfiguration, you can manually tag your services with webfactory.html5_tag_rewriter.rewrite_handler:

Credits, Copyright and License

This bundle is based on internal work that we have been using at webfactory GmbH, Bonn, since 2019. However, that (old) bundle implementation was written for the legacy PHP DOM extension, leading to several quirks in HTML processing and requiring the use of Polyglot HTML 5.

Thus, we decided to overhaul the bundle for PHP 8.4 HTML5 DOM support and re-release it as open source.

Copyright 2026 webfactory GmbH, Bonn. Code released under the MIT license.


All versions of html5-tagrewriter-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >= 8.4
symfony/config Version ^6.4 || ^7.4 || ^8.0
symfony/dependency-injection Version ^6.4 || ^7.4 || ^8.0
symfony/http-kernel Version ^6.4 || ^7.4 || ^8.0
twig/twig Version ^3.0
webfactory/html5-tagrewriter Version ^1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package webfactory/html5-tagrewriter-bundle contains the following files

Loading the files please wait ...