PHPackages                             ocubom/twig-extra-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. [Templating &amp; Views](/categories/templating)
4. /
5. ocubom/twig-extra-bundle

ActiveSymfony-bundle[Templating &amp; Views](/categories/templating)

ocubom/twig-extra-bundle
========================

A Symfony bundle for custom extra Twig extensions

v1.5.0(2y ago)1309MITPHP

Since Dec 31Pushed 2y ago1 watchersCompare

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

READMEChangelogDependencies (9)Versions (13)Used By (0)

Ocubom Twig Extra Bundle
========================

[](#ocubom-twig-extra-bundle)

A Symfony bundle for custom extra Twig extensions.

[![Contributors](https://camo.githubusercontent.com/bcccfca87b58b606bb53e72fde28b72f688cc29b1b008719f7ae12fa993b4598/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6e7472696275746f72732f6f6375626f6d2f747769672d65787472612d62756e646c652e7376673f7374796c653d666f722d7468652d6261646765)](https://github.com/ocubom/twig-extra-bundle/graphs/contributors)[![Forks](https://camo.githubusercontent.com/8e1dc52e2d569fca57a2cff2b81ca8e862a8919410622272c42610b6318c1158/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f6f6375626f6d2f747769672d65787472612d62756e646c652e7376673f7374796c653d666f722d7468652d6261646765)](https://github.com/ocubom/twig-extra-bundle/network/members)[![Stargazers](https://camo.githubusercontent.com/eef4677bac487bc26304af65256ecdf96f91926fc28be026b59e4d38f82e71c9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6f6375626f6d2f747769672d65787472612d62756e646c652e7376673f7374796c653d666f722d7468652d6261646765)](https://github.com/ocubom/twig-extra-bundle/stargazers)[![Issues](https://camo.githubusercontent.com/5383a32e5002b2e9bcec01495afcfbacc75f943ad916c3ae65bd57dd6f12ed78/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f6f6375626f6d2f747769672d65787472612d62756e646c652e7376673f7374796c653d666f722d7468652d6261646765)](https://github.com/ocubom/twig-extra-bundle/issues)[![License](https://camo.githubusercontent.com/d2ca692fbcff17ded16c664087b55e016a62e0bf3891fa47e3e185be7373646d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6f6375626f6d2f747769672d65787472612d62756e646c652e7376673f7374796c653d666f722d7468652d6261646765)](https://github.com/ocubom/twig-extra-bundle/blob/master/LICENSE)

[![Version](https://camo.githubusercontent.com/5629e5b1bf3cfcc0c2cea0c0e29b84539eee917104e2edf06dc1061adbfc201e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6f6375626f6d2f747769672d65787472612d62756e646c652e7376673f6c6f676f3d7061636b6167697374266c6f676f436f6c6f723d253233666566656665267374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/ocubom/twig-extra-bundle)[![CI](https://camo.githubusercontent.com/4d7c90ec2606ca39aaab7abf43ddb763fd90519de6c4d0adf1d223d471be6b12/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6f6375626f6d2f747769672d65787472612d62756e646c652f63692e796d6c3f6272616e63683d6d61696e266c6162656c3d4349266c6f676f3d676974687562267374796c653d666f722d7468652d6261646765)](https://github.com/ocubom/twig-extra-bundle/actions/)[![Code Quality](https://camo.githubusercontent.com/89a1c92694cb4b104fd485db36bbc7dc70a880f229bb1f6fcd497c9eeba94144/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f7175616c6974792f672f6f6375626f6d2f747769672d65787472612d62756e646c652e7376673f6c6f676f3d7363727574696e697a6572266c6f676f436f6c6f723d666666267374796c653d666f722d7468652d6261646765)](https://scrutinizer-ci.com/g/ocubom/twig-extra-bundle/)[![Coverage](https://camo.githubusercontent.com/1404b0fdbbf69ae71d53762c8ffa063eaf4e8499a8f778ca8c6d4a42ca3a762c/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f6f6375626f6d2f747769672d65787472612d62756e646c652e7376673f6c6f676f3d7363727574696e697a6572266c6f676f436f6c6f723d666666267374796c653d666f722d7468652d6261646765)](https://scrutinizer-ci.com/g/ocubom/twig-extra-bundle/code-structure/main/code-coverage)

[**Explore the docs »**](https://github.com/ocubom/twig-extra-bundle/blob/main/docs/index.md)

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

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

About Twig Extra Bundle
-----------------------

[](#about-twig-extra-bundle)

[Ocubom Twig Extra Bundle](https://github.com/ocubom/twig-extra-bundle) is a [Symfony Bundle](https://symfony.com/doc/current/bundles.html) that allows the use of several custom Twig extensions with almost no configuration. 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 slightly adapted its version, resulting in fragmented development and difficult maintenance. Therefore, the development is unified in an extension which is made public in case it is useful for other projects.

Along with the extension a bundle was created to easily integrate it into a Symfony project. The bundle evolves to configure other developed extensions, following the [twig/extra-bundle](https://packagist.org/packages/twig/extra-bundle) philosophy.

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/twig-extra-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/twig-extra-bundle
```

You must also install the Twig extensions to be used:

```
composer require ocubom/twig-html-extension
composer require ocubom/twig-svg-extension
```

##### 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\TwigExtraBundle\OcubomTwigExtraBundle::class => ['all' => true],
];
```

### Usage

[](#usage)

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

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

Or you can use the [example configuration](https://github.com/ocubom/twig-extra-bundle/blob/main/.install/symfony/config/packages/ocubom_twig_extra.yaml) provided.

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

Roadmap
-------

[](#roadmap)

See the [open issues](https://github.com/ocubom/twig-extra-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 —

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

License
-------

[](#license)

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

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 95% 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 ~31 days

Recently: every ~62 days

Total

12

Last Release

885d ago

Major Versions

v1.5.0 → 2.x-dev2023-12-07

### 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 (19 commits)")[![tacman](https://avatars.githubusercontent.com/u/619585?v=4)](https://github.com/tacman "tacman (1 commits)")

---

Tags

symfonybundletwigextrahtmlminifysvgcompressSymfony Bundleocubom

###  Code Quality

Code StylePHP CS Fixer

### Embed Badge

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

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

###  Alternatives

[pentatrion/vite-bundle

Vite integration for your Symfony app

2725.3M13](/packages/pentatrion-vite-bundle)[kreait/firebase-bundle

Symfony Bundle for the Firebase Admin SDK

1534.7M2](/packages/kreait-firebase-bundle)[jbouzekri/phumbor-bundle

A Symfony Bundle to use the minimal Thumbor PHP client from webfactory/phumbor

25740.0k1](/packages/jbouzekri-phumbor-bundle)[nucleos/antispam-bundle

This bundle provides some basic features to reduce spam in symfony forms.

52105.1k](/packages/nucleos-antispam-bundle)[cmsig/seal-symfony-bundle

An integration of CMS-IG SEAL search abstraction into Symfony Framework.

15195.8k5](/packages/cmsig-seal-symfony-bundle)

PHPackages © 2026

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