PHPackages                             contao/polyfill-symfony - 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. contao/polyfill-symfony

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

contao/polyfill-symfony
=======================

Adds some Symfony resources for bundles that want to be compatible with both Symfony 4 and 5

1.0.0(5y ago)072.8k↓50%LGPL-3.0-or-laterPHPPHP ^7.2 || ^8.0

Since Dec 23Pushed 5y ago2 watchersCompare

[ Source](https://github.com/contao/polyfill-symfony)[ Packagist](https://packagist.org/packages/contao/polyfill-symfony)[ RSS](/packages/contao-polyfill-symfony/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

Contao polyfill Symfony
=======================

[](#contao-polyfill-symfony)

The package provides some Symfony resources for bundles that want to be compatible with both Symfony 4 and 5:

What's inside?
--------------

[](#whats-inside)

### `InputBag`

[](#inputbag)

The `InputBag` class was added to the HttpFoundation component in Symfony 5. The polyfill will save you a lot of `if (class_exists(InputBag:class))` checks by providing the `InputBag` class in Symfony 4 as well.

### `TranslatorInterface`

[](#translatorinterface)

The `TranslatorInterface` has been moved from the Translation component to the Contracts component in Symfony 5. The polyfill restores the old interface in Symfony 5.

Scope
-----

[](#scope)

If you want your Contao extension to be compatible with multiple Contao versions (e.g. `4.9` to `4.13`), you will also have to be compatible with both Symfony 4 and 5. Require the polyfill in your `composer.json` in this case.

License
-------

[](#license)

Contao is licensed under the terms of the LGPLv3.

Getting support
---------------

[](#getting-support)

Visit the [support page](https://contao.org/en/support.html) to learn about the available support options.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity58

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

Unknown

Total

1

Last Release

1972d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3de3a0dd7c29df679eb280585220c17c1a7340b46c2792d5e8298be859acfbba?d=identicon)[leofeyer](/maintainers/leofeyer)

![](https://www.gravatar.com/avatar/8c7bdddffcaec444b7891b633f45fe2713d2b04ff21a6362fd748720d0822d58?d=identicon)[ausi](/maintainers/ausi)

---

Top Contributors

[![leofeyer](https://avatars.githubusercontent.com/u/1192057?v=4)](https://github.com/leofeyer "leofeyer (2 commits)")

### Embed Badge

![Health badge](/badges/contao-polyfill-symfony/health.svg)

```
[![Health](https://phpackages.com/badges/contao-polyfill-symfony/health.svg)](https://phpackages.com/packages/contao-polyfill-symfony)
```

###  Alternatives

[xiaobopang/pinyin

汉字转带有声调的汉语拼音，汉字转无声调的汉语拼音，汉字转成汉语拼音首字母

315.1k](/packages/xiaobopang-pinyin)

PHPackages © 2026

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