Skip to content

Commit

Permalink
Symfony 5 support (#133)
Browse files Browse the repository at this point in the history
* Symfony 5 Support

* Fix vertex test

* Add idea folder to ignore

* Fix travis build

* remove idea from gitignore
  • Loading branch information
KDederichs committed Jan 30, 2020
1 parent 955a633 commit b62a49e
Show file tree
Hide file tree
Showing 21 changed files with 31 additions and 11 deletions.
13 changes: 7 additions & 6 deletions .travis.yml
Expand Up @@ -25,12 +25,13 @@ matrix:
env: COVERAGE=true PHPUNIT_FLAGS="-v --coverage-text"

- php: 7.2
env: DEPENDENCIES="dunglas/symfony-lock:^2"
env: SYMFONY_REQUIRE="~2.8"
- php: 7.2
env: DEPENDENCIES="dunglas/symfony-lock:^3"
env: SYMFONY_REQUIRE="~3.4"
- php: 7.2
env: DEPENDENCIES="dunglas/symfony-lock:^4"

env: SYMFONY_REQUIRE="~4.4"
- php: 7.2
env: SYMFONY_REQUIRE="~5.0"
# Latest commit to master
- php: 7.2
env: STABILITY="dev"
Expand All @@ -42,7 +43,7 @@ matrix:
before_install:
- if [[ $COVERAGE != true ]]; then phpenv config-rm xdebug.ini || true; fi
- if ! [ -z "$STABILITY" ]; then composer config minimum-stability ${STABILITY}; fi;
- if ! [ -v "$DEPENDENCIES" ]; then composer require --no-update ${DEPENDENCIES}; fi;
- if [ "$SYMFONY_REQUIRE" != "" ]; then composer global require --no-scripts symfony/flex; fi

install:
# To be removed when this issue will be resolved: https://github.com/composer/composer/issues/5355
Expand All @@ -51,4 +52,4 @@ install:

script:
- composer validate --strict --no-check-lock
- ./vendor/bin/phpunit $PHPUNIT_FLAGS
- ./vendor/bin/phpunit $PHPUNIT_FLAGS
9 changes: 5 additions & 4 deletions composer.json
Expand Up @@ -26,12 +26,13 @@
"psr/cache" : "^1.0",
"willdurand/geocoder" : "^4.2",
"react/promise" : "^2.2",
"symfony/console" : "^2.7 || ^3.0 || ^4.0",
"symfony/property-access" : "^2.7 || ^3.0 || ^4.0",
"symfony/serializer" : "^2.7 || ^3.0 || ^4.0",
"symfony/console" : "^2.7 || ^3.0 || ^4.0 || ^5.0",
"symfony/property-access" : "^2.7 || ^3.0 || ^4.0 || ^5.0",
"symfony/serializer" : "^2.7 || ^3.0 || ^4.0 || ^5.0",
"react/event-loop" : "0.4.*",
"php-http/discovery" : "^1.0",
"cache/array-adapter" : "^1.0"
"cache/array-adapter" : "^1.0",
"ext-bcmath": "*"
},

"require-dev" : {
Expand Down
1 change: 1 addition & 0 deletions src/CLI/Command/Convert/DM.php
Expand Up @@ -63,5 +63,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
'<value>%s</value>',
$geotools->convert($coordinate)->toDM($input->getOption('format'))
));
return 0;
}
}
1 change: 1 addition & 0 deletions src/CLI/Command/Convert/DMS.php
Expand Up @@ -64,5 +64,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
'<value>%s</value>',
$geotools->convert($coordinate)->toDMS($input->getOption('format'))
));
return 0;
}
}
1 change: 1 addition & 0 deletions src/CLI/Command/Convert/UTM.php
Expand Up @@ -56,5 +56,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
'<value>%s</value>',
$geotools->convert($coordinate)->toUTM()
));
return 0;
}
}
1 change: 1 addition & 0 deletions src/CLI/Command/Distance/All.php
Expand Up @@ -77,5 +77,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
$result[] = sprintf('<label>Vincenty:</label> <value>%s</value>', $distance->vincenty());

$output->writeln($result);
return 0;
}
}
1 change: 1 addition & 0 deletions src/CLI/Command/Distance/Flat.php
Expand Up @@ -72,5 +72,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
}

$output->writeln(sprintf('<value>%s</value>', $distance->flat()));
return 0;
}
}
1 change: 1 addition & 0 deletions src/CLI/Command/Distance/GreatCircle.php
Expand Up @@ -72,5 +72,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
}

$output->writeln(sprintf('<value>%s</value>', $distance->greatCircle()));
return 0;
}
}
1 change: 1 addition & 0 deletions src/CLI/Command/Distance/Haversine.php
Expand Up @@ -72,5 +72,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
}

$output->writeln(sprintf('<value>%s</value>', $distance->haversine()));
return 0;
}
}
1 change: 1 addition & 0 deletions src/CLI/Command/Distance/Vincenty.php
Expand Up @@ -72,5 +72,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
}

$output->writeln(sprintf('<value>%s</value>', $distance->vincenty()));
return 0;
}
}
1 change: 1 addition & 0 deletions src/CLI/Command/Geocoder/Geocode.php
Expand Up @@ -140,5 +140,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
}

$output->writeln($result);
return 0;
}
}
1 change: 1 addition & 0 deletions src/CLI/Command/Geocoder/Reverse.php
Expand Up @@ -128,5 +128,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
}

$output->writeln($result);
return 0;
}
}
1 change: 1 addition & 0 deletions src/CLI/Command/Geohash/Decode.php
Expand Up @@ -44,5 +44,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
'<value>%s, %s</value>',
$coordinate->getLatitude(), $coordinate->getLongitude()
));
return 0;
}
}
1 change: 1 addition & 0 deletions src/CLI/Command/Geohash/Encode.php
Expand Up @@ -50,5 +50,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
'<value>%s</value>',
$geotools->geohash()->encode($coordinate, $input->getOption('length'))->getGeohash()
));
return 0;
}
}
1 change: 1 addition & 0 deletions src/CLI/Command/Vertex/Destination.php
Expand Up @@ -60,5 +60,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
'<value>%s, %s</value>',
$destination->getLatitude(), $destination->getLongitude()
));
return 0;
}
}
1 change: 1 addition & 0 deletions src/CLI/Command/Vertex/FinalBearing.php
Expand Up @@ -59,5 +59,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
'<value>%s</value>',
$geotools->vertex()->setFrom($from)->setTo($to)->finalBearing()
));
return 0;
}
}
1 change: 1 addition & 0 deletions src/CLI/Command/Vertex/FinalCardinal.php
Expand Up @@ -59,5 +59,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
'<value>%s</value>',
$geotools->vertex()->setFrom($from)->setTo($to)->finalCardinal()
));
return 0;
}
}
1 change: 1 addition & 0 deletions src/CLI/Command/Vertex/InitialBearing.php
Expand Up @@ -59,5 +59,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
'<value>%s</value>',
$geotools->vertex()->setFrom($from)->setTo($to)->initialBearing()
));
return 0;
}
}
1 change: 1 addition & 0 deletions src/CLI/Command/Vertex/InitialCardinal.php
Expand Up @@ -59,5 +59,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
'<value>%s</value>',
$geotools->vertex()->setFrom($from)->setTo($to)->initialCardinal()
));
return 0;
}
}
1 change: 1 addition & 0 deletions src/CLI/Command/Vertex/Middle.php
Expand Up @@ -60,5 +60,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
'<value>%s, %s</value>',
$middle->getLatitude(), $middle->getLongitude()
));
return 0;
}
}
2 changes: 1 addition & 1 deletion tests/Vertex/VertexTest.php
Expand Up @@ -524,7 +524,7 @@ public function VertexCoordinatesAndExpectedDeterminantValueProvider()
'from' => array(1, 4),
'to' => array(2, 7)
),
'-1'
'-1.00000000'
),
array(
array(
Expand Down

0 comments on commit b62a49e

Please sign in to comment.