Skip to content

Latest commit

 

History

History
37 lines (27 loc) · 1.48 KB

UPGRADE-3.0.md

File metadata and controls

37 lines (27 loc) · 1.48 KB

Upgrade from 2.x to 3.0

Twig extension services

  • If you rely on the service instances of Twig extensions registered by this bundle, you need to adjust the service IDs to address them:

    twig.extension.craue_arrayHelperCraue\TwigExtensionsBundle\Twig\Extension\ArrayHelperExtension twig.extension.craue_changeLanguageCraue\TwigExtensionsBundle\Twig\Extension\ChangeLanguageExtension twig.extension.craue_decorateEmptyValueCraue\TwigExtensionsBundle\Twig\Extension\DecorateEmptyValueExtension twig.extension.craue_formatDateTimeCraue\TwigExtensionsBundle\Twig\Extension\FormatDateTimeExtension twig.extension.craue_formatNumberCraue\TwigExtensionsBundle\Twig\Extension\FormatNumberExtension twig.extension.craue_formCraue\TwigExtensionsBundle\Twig\Extension\FormExtension twig.extension.craue_stringHelperCraue\TwigExtensionsBundle\Twig\Extension\StringHelperExtension

  • Be aware that these services are now private so you either have to use proper dependency injection or create public aliases.

Global craue_availableLocales

  • The Twig global craue_availableLocales has been replaced by a Twig function with the same name.

    before:

     {{ craue_availableLocales | join(', ') }}
    
     {% for locale in craue_availableLocales %}
     	...
     {% endfor %}

    after:

     {{ craue_availableLocales() | join(', ') }}
    
     {% for locale in craue_availableLocales() %}
     	...
     {% endfor %}