Skip to content

Commit

Permalink
Symfony 3 Compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
JHGitty authored and thewilkybarkid committed Dec 22, 2015
1 parent 7355073 commit a941972
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ matrix:
- php: 5.3.3
env: dependencies=lowest

before_install:
- if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then echo 'memory_limit=-1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi

install:
- if [ "$dependencies" = "lowest" ]; then composer update --dev --prefer-lowest --prefer-stable --prefer-source --no-interaction; else composer install --dev --prefer-source --no-interaction; fi;

Expand Down
7 changes: 6 additions & 1 deletion Tests/Form/Type/PhoneNumberTypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@ class PhoneNumberTypeTest extends TypeTestCase
*/
public function testDefaultFormatting($input, $options, $output)
{
$type = new PhoneNumberType();
if (method_exists('Symfony\\Component\\Form\\FormTypeInterface', 'getName')) {
$type = new PhoneNumberType();
} else {
$type = 'Misd\\PhoneNumberBundle\\Form\\Type\\PhoneNumberType';
}

$form = $this->factory->create($type, null, $options);

$form->submit($input);
Expand Down
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@
"require": {
"php": ">=5.3.3",
"giggsey/libphonenumber-for-php": "~5.7|~6.0|~7.0",
"symfony/framework-bundle": "~2.1"
"symfony/framework-bundle": "~2.1|~3.0"
},
"require-dev": {
"doctrine/doctrine-bundle": "~1.0",
"jms/serializer-bundle": "~0.11",
"jms/serializer-bundle": "~0.11|~1.0",
"phpunit/phpunit": "~4.0",
"symfony/form": "~2.3",
"symfony/templating": "~2.1",
"symfony/twig-bundle": "~2.1",
"symfony/validator": "~2.1"
"symfony/form": "~2.3|~3.0",
"symfony/templating": "~2.1|~3.0",
"symfony/twig-bundle": "~2.1|~3.0",
"symfony/validator": "~2.1|~3.0"
},
"conflict": {
"twig/twig": "<1.12.0"
Expand Down

0 comments on commit a941972

Please sign in to comment.