contao / polyfill-symfony
Adds some Symfony resources for bundles that want to be compatible with both Symfony 4 and 5
Fund package maintenance!
to.contao.org/donate
Installs: 69 170
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 4
Forks: 0
Open Issues: 0
Requires
- php: ^7.2 || ^8.0
README
The package provides some Symfony resources for bundles that want to be compatible with both Symfony 4 and 5:
What's inside?
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
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
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
Contao is licensed under the terms of the LGPLv3.
Getting support
Visit the support page to learn about the available support options.