File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#! /bin/bash
22
3- cat <<< $( jq --arg version $VERSION ' .require |= with_entries(if ((.key|test("^symfony/monolog ")|not) and (.key|test("^symfony/"))) then .value=$version else . end)' < composer.json) > composer.json
3+ cat <<< $( jq --arg version $VERSION ' .require |= with_entries(if ((.key|test("^symfony/translation-contracts ")|not) and (.key|test("^symfony/"))) then .value=$version else . end)' < composer.json) > composer.json
Original file line number Diff line number Diff line change 2828 "symfony/config" : " ^3.4.31|^4.0" ,
2929 "symfony/dependency-injection" : " ^3.4.31|^4.0" ,
3030 "symfony/finder" : " ^3.4.31|^4.0" ,
31+ "symfony/framework-bundle" : " ^4.4" ,
3132 "symfony/http-kernel" : " ^3.4.31|^4.0" ,
32- "symfony/translation" : " ^3.4.31|^4.0" ,
33+ "symfony/translation" : " ^4.2" ,
34+ "symfony/translation-contracts" : " ^1.0.2|^2.0|^3.0" ,
3335 "twig/twig" : " ^1.42|^2.0|^3.0"
3436 },
3537 "require-dev" : {
3638 "phpunit/phpunit" : " ^8.5 | ^9.0" ,
37- "symfony/framework-bundle" : " ^3.4.31|^4.0" ,
3839 "symfony/monolog-bundle" : " ^3.4.31|^4.0" ,
3940 "symfony/phpunit-bridge" : " > 5.0" ,
4041 "symfony/twig-bundle" : " ^3.4.31|^4.0" ,
Original file line number Diff line number Diff line change 22
33namespace Webfactory \IcuTranslationBundle \Translator ;
44
5- use Symfony \Component \Translation \TranslatorInterface ;
5+ use Symfony \Component \Translation \TranslatorInterface as LegacyTranslatorInterface ;
6+ use Symfony \Contracts \Translation \TranslatorInterface ;
67use Webfactory \IcuTranslationBundle \Translator \Formatting \FormatterInterface ;
78
89/**
910 * Decorates a Symfony translator and adds support for message formatting.
1011 */
11- class FormatterDecorator implements TranslatorInterface
12+ class FormatterDecorator implements LegacyTranslatorInterface, TranslatorInterface
1213{
1314 /**
1415 * The inner translator.
1516 *
1617 * @var \Symfony\Component\Translation\TranslatorInterface
1718 */
18- protected $ translator = null ;
19+ protected $ translator ;
1920
2021 /**
2122 * The formatter that is used to apply message transformations.
2223 *
2324 * @var \Webfactory\IcuTranslationBundle\Translator\Formatting\IntlFormatter
2425 */
25- protected $ formatter = null ;
26+ protected $ formatter ;
2627
2728 /**
2829 * Creates a decorator for the provided translator.
2930 *
3031 * @param \Webfactory\IcuTranslationBundle\Translator\Formatting\FormatterInterface the formatter that is used
3132 */
32- public function __construct (TranslatorInterface $ translator , FormatterInterface $ formatter )
33+ public function __construct (LegacyTranslatorInterface $ translator , FormatterInterface $ formatter )
3334 {
3435 $ this ->translator = $ translator ;
3536 $ this ->formatter = $ formatter ;
You can’t perform that action at this time.
0 commit comments