Skip to content

Installation

phil/typography-bundle

Requirements

RequirementWhy
PHP 8.5 or laterAs phil/typography
phil/typographyThe typographers, fixers and hyphenation patterns
symfony/config, symfony/dependency-injection 8.2The configuration and the services
twig/twig 3.21, optionalThe typography and typography_text filters
symfony/translation-contracts 3.6The current locale, read from Symfony's LocaleSwitcher
symfony/translation 8.2, optionalThe LocaleSwitcher, which gives the filters the locale of the request
phil/ujo-bundle, optionalThe typographic pass over the HTML of UJO documents

Installing

composer require phil/typography-bundle

Symfony Flex enables the bundle; without Flex, add it to config/bundles.php:

return [
    // ...
    Phil\TypographyBundle\PhilTypographyBundle::class => ['all' => true],
];

With no configuration, the default typographer is the preset of the kernel's default locale, with hyphenation; the filters, and the HTML of UJO documents when phil/ujo-bundle is installed, are fixed in the locale of the request.