PHPackages                             ocubom/html-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. ocubom/html-bundle

Abandoned → [ocubom/twig-extra-bundle](/?search=ocubom%2Ftwig-extra-bundle)Symfony-bundle[Utility &amp; Helpers](/categories/utility)

ocubom/html-bundle
==================

A Symfony bundle to integrate several custom utilities for HTML manipulation

v1.0.2(3y ago)110MITPHPPHP &gt;=7.4

Since Aug 24Pushed 3y ago1 watchersCompare

[ Source](https://github.com/ocubom/html-bundle)[ Packagist](https://packagist.org/packages/ocubom/html-bundle)[ Docs](https://ocubom.github.io)[ RSS](/packages/ocubom-html-bundle/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (6)Versions (4)Used By (0)

Ocubom HTML Bundle
==================

[](#ocubom-html-bundle)

A Symfony bundle to integrate several custom utilities for HTML manipulation

[![Contributors](https://camo.githubusercontent.com/131eb57ae61c68f2ca884fac0563e5a3d67838eeb778b81973216f572626a776/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6e7472696275746f72732f6f6375626f6d2f68746d6c2d62756e646c652e7376673f7374796c653d666f722d7468652d6261646765)](https://github.com/ocubom/html-bundle/graphs/contributors)[![Forks](https://camo.githubusercontent.com/b3f703a38dfc45a49603abce95108ee0e79ec0853b71af2deddc2df40090ff59/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f6f6375626f6d2f68746d6c2d62756e646c652e7376673f7374796c653d666f722d7468652d6261646765)](https://github.com/ocubom/html-bundle/network/members)[![Stargazers](https://camo.githubusercontent.com/87a2e6d873863c7378d5530cfc0b2bed1dfbb2409ddaa3278112006bca7558a3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6f6375626f6d2f68746d6c2d62756e646c652e7376673f7374796c653d666f722d7468652d6261646765)](https://github.com/ocubom/html-bundle/stargazers)[![Issues](https://camo.githubusercontent.com/e041695d73a5553867c96aaaf8e34954bac99ab39a110b775b2961d697b75d42/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f6f6375626f6d2f68746d6c2d62756e646c652e7376673f7374796c653d666f722d7468652d6261646765)](https://github.com/ocubom/html-bundle/issues)[![License](https://camo.githubusercontent.com/1f87f6c3d22c87895d9be1afa7cb14ddd54c82f952bc84aae09f4d7a08790861/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6f6375626f6d2f68746d6c2d62756e646c652e7376673f7374796c653d666f722d7468652d6261646765)](https://github.com/ocubom/html-bundle/blob/master/LICENSE)

[![Version](https://camo.githubusercontent.com/1a9f750f20c006aba2293ed50c187d7128c8ede2dc39b26bfb31ee64f76a7f9f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6f6375626f6d2f68746d6c2d62756e646c652e7376673f6c6f676f3d7061636b6167697374266c6f676f436f6c6f723d253233666566656665267374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/ocubom/html-bundle)[![CI](https://camo.githubusercontent.com/595989db8bed76db1740f49b7a09edf792220fbc01076ecc1ad903e347c21e97/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6f6375626f6d2f68746d6c2d62756e646c652f746573742e796d6c3f6272616e63683d6d61696e266c6162656c3d4349266c6f676f3d676974687562267374796c653d666f722d7468652d6261646765)](https://github.com/ocubom/html-bundle/actions/)[![Code Quality](https://camo.githubusercontent.com/809aa767a0312e4db4ba6a0604919ae18928b365cc97964c35a9cdc7506a7bff/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f7175616c6974792f672f6f6375626f6d2f68746d6c2d62756e646c652e7376673f6c6f676f3d7363727574696e697a6572266c6f676f436f6c6f723d666666267374796c653d666f722d7468652d6261646765)](https://scrutinizer-ci.com/g/ocubom/html-bundle/)[![Coverage](https://camo.githubusercontent.com/867dd79106eb98425883d04bea4ce44e8d332b30844c358d954becf1993214cf/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f6f6375626f6d2f68746d6c2d62756e646c652e7376673f6c6f676f3d7363727574696e697a6572266c6f676f436f6c6f723d666666267374796c653d666f722d7468652d6261646765)](https://scrutinizer-ci.com/g/ocubom/html-bundle/code-structure/main/code-coverage)

[**Explore the docs »**](https://github.com/ocubom/html-bundle)

[Report Bug](https://github.com/ocubom/html-bundle/issues)· [Request Feature](https://github.com/ocubom/html-bundle/issues)

 Contents- [About HTML Bundle](#about-html-bundle)
- [Getting Started](#getting-started)
    - [Installation](#installation)
    - [Usage](#usage)
- [Roadmap](#roadmap)
- [Contributing](#contributing)
- [Authorship](#authorship)
- [License](#license)

About HTML Bundle
-----------------

[](#about-html-bundle)

[Ocubom HTML Bundle](https://github.com/ocubom/html-bundle) is a [Symfony Bundle](https://symfony.com/doc/current/bundles.html) that integrates several utilities for HTML manipulation.

This suite started as an internal class based on [nochso/html-compress-twig](https://packagist.org/packages/nochso/html-compress-twig) to allow the use of [wyrihaximus/html-compress](https://packagist.org/packages/wyrihaximus/html-compress) with Twig 3.0. This class used to be embedded into several projects. Over time, each project adapted its version slightly, leading to fragmented development and difficult maintenance. Therefore, the development is unified in this extension which is made public in case it is useful for other projects.

Getting Started
---------------

[](#getting-started)

### Installation

[](#installation)

Make sure Composer is installed globally, as explained in the [installation chapter](https://getcomposer.org/doc/00-intro.md) of the Composer documentation.

#### Applications that use Symfony Flex

[](#applications-that-use-symfony-flex)

Open a command console, enter your project directory and execute:

```
$ composer require ocubom/html-bundle
```

#### Applications that don't use Symfony Flex

[](#applications-that-dont-use-symfony-flex)

##### Step 1: Download the Bundle

[](#step-1-download-the-bundle)

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:

```
$ composer require ocubom/html-bundle
```

##### Step 2: Enable the Bundle

[](#step-2-enable-the-bundle)

Then, enable the bundle by adding it to the list of registered bundles in the `config/bundles.php` file of your project:

```
// config/bundles.php

return [
    // ...
    Ocubom\HtmlBundle\OcubomHtmlBundle::class => ['all' => true],
];
```

### Usage

[](#usage)

Just create the file `config/packages/ocubom_html.yaml` using the configuration reference:

```
bin/console config:dump-reference ocubom_html
```

You can use the [example configuration](https://github.com/ocubom/html-bundle/blob/main/.install/symfony/config/packages/ocubom_html.yaml) provided.

```
ocubom_html:

    # Register Ocubom/TwigHtmlExtension to minify the HTML (defaults)
    compress:
        force: false
        level: smallest

    # Headers extract
    # The listener is only registered if some header is registered
    #headers:
    #    # Duplicate robots meta as X-Robots-Tag
    #    # @see https://developers.google.com/search/docs/advanced/robots/robots_meta_tag#xrobotstag
    #    -   name:    'X-Robots-Tag'
    #        pattern: '@[\p{Zs}]*\p{Zs}*\n?@i'
    #        value:   '%2$s'
    #        replace: '%1$s'
    #        formats:
    #            - 'text/html'
    #
    #    # Disable Metro Interface
    #    # @see https://github.com/h5bp/html5-boilerplate/blob/5.3.0/dist/doc/extend.md#prompt-users-to-switch-to-desktop-mode-in-ie10-metro
    #    -   name:    'X-UA-Compatible'
    #        enabled: true
    #        pattern: '@[\p{Zs}]*\p{Zs}*\n?@i'
    #        value:   '%2$s'
    #        replace: '' # Delete the meta tag as is not standard
    #        formats:
    #            - 'text/html'
```

> **Note**This configuration will be installed if your project uses [endroid/installer](https://packagist.org/packages/endroid/installer)

*For more examples, please refer to the [Documentation](https://github.com/ocubom/html-bundle).*

Roadmap
-------

[](#roadmap)

See the [open issues](https://github.com/ocubom/html-bundle/issues) for a full list of proposed features (and known issues).

Contributing
------------

[](#contributing)

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".

1. Fork the Project.
2. Create your Feature Branch (`git checkout -b feature/your-feature`).
3. Commit your Changes (`git commit -m 'Add your-feature'`).
4. Push to the Branch (`git push origin feature/your-feature`).
5. Open a Pull Request.

Authorship
----------

[](#authorship)

- Oscar Cubo Medina — [@ocubom](https://twitter.com/ocubom) —

See also the list of [contributors](https://github.com/ocubom/html-bundle/graphs/contributors) who participated in this project.

License
-------

[](#license)

Distributed under the MIT License. See [LICENSE](https://github.com/ocubom/html-bundle/blob/master/LICENSE) for more information.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~57 days

Total

3

Last Release

1248d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/642ac779b1c36bfa6dfae27c756efcf88f75ff34fd50b376a72acb05e845502d?d=identicon)[ocubom](/maintainers/ocubom)

---

Top Contributors

[![ocubom](https://avatars.githubusercontent.com/u/184187?v=4)](https://github.com/ocubom "ocubom (7 commits)")

---

Tags

bundlecompresshtmlhtml-attributeshttp-headersminifyphpsymfonysymfony-bundlesymfonyhtmlminifycompressSymfony Bundle

###  Code Quality

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/ocubom-html-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/ocubom-html-bundle/health.svg)](https://phpackages.com/packages/ocubom-html-bundle)
```

###  Alternatives

[pentatrion/vite-bundle

Vite integration for your Symfony app

2725.3M13](/packages/pentatrion-vite-bundle)[pugx/autocompleter-bundle

Add an autocomplete type to forms

93861.6k3](/packages/pugx-autocompleter-bundle)[sensiolabs/minify-bundle

Assets Minifier (CSS, JS) for Symfony &amp; Minify integration in Asset Mapper

5694.9k1](/packages/sensiolabs-minify-bundle)[spomky-labs/pwa-bundle

Progressive Web App Manifest Generator Bundle for Symfony.

6144.4k1](/packages/spomky-labs-pwa-bundle)[wyrihaximus/minify-html

Html minifier for CakePHP3

18148.3k1](/packages/wyrihaximus-minify-html)[sineflow/clamav

ClamAV PHP Client for Symfony

10168.5k](/packages/sineflow-clamav)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
