diff --git a/.travis.yml b/.travis.yml index 6953585d..bdcece13 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,8 @@ php: - 5.6 - 7.0 - 7.1 + - 7.2 + - 7.3 cache: directories: @@ -26,16 +28,14 @@ matrix: - php: 7.0 env: SYMFONY_VERSION=2.8.x - php: 7.0 - env: SYMFONY_VERSION=3.0.x - - php: 7.0 - env: SYMFONY_VERSION=3.1.x - - php: hhvm + env: SYMFONY_VERSION=3.3.x + - php: 7.2 env: SYMFONY_VERSION=3.4.x - - php: 7.1 + - php: 7.3 env: SYMFONY_VERSION=4.0.x stability=beta before_install: - - if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then echo 'memory_limit=-1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi + - echo 'memory_limit=-1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; - if [ "$SYMFONY_VERSION" != "" ]; then composer require --dev --no-update symfony/symfony:$SYMFONY_VERSION; fi - if [ "$stability" != "" ]; then composer config minimum-stability $stability; fi diff --git a/Tests/Form/Type/PhoneNumberTypeTest.php b/Tests/Form/Type/PhoneNumberTypeTest.php index df4b615f..37cac194 100644 --- a/Tests/Form/Type/PhoneNumberTypeTest.php +++ b/Tests/Form/Type/PhoneNumberTypeTest.php @@ -221,7 +221,12 @@ public function testCountryChoiceTranslations() IntlTestHelper::requireFullIntl($this); Locale::setDefault('fr'); - $form = $this->factory->create(new PhoneNumberType(), null, array('widget' => PhoneNumberType::WIDGET_COUNTRY_CHOICE)); + if (method_exists('Symfony\\Component\\Form\\FormTypeInterface', 'getName')) { + $type = new PhoneNumberType(); + } else { + $type = 'Misd\\PhoneNumberBundle\\Form\\Type\\PhoneNumberType'; + } + $form = $this->factory->create($type, null, array('widget' => PhoneNumberType::WIDGET_COUNTRY_CHOICE)); $view = $form->createView(); $choices = $view['country']->vars['choices']; diff --git a/Tests/Validator/Constraints/PhoneNumberValidatorTest.php b/Tests/Validator/Constraints/PhoneNumberValidatorTest.php index 9a073d3e..16bfc64e 100644 --- a/Tests/Validator/Constraints/PhoneNumberValidatorTest.php +++ b/Tests/Validator/Constraints/PhoneNumberValidatorTest.php @@ -137,7 +137,6 @@ public function validateProvider() array('+441234567890', true, 'personal_number'), array('+449012345678', false, 'premium_rate'), array('+441234567890', true, 'premium_rate'), - array('+448431234567', false, 'shared_cost'), array('+441234567890', true, 'shared_cost'), array('+448001234567', false, 'toll_free'), array('+441234567890', true, 'toll_free'),