Skip to content
Open

V2 #198

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 7 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,24 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [ '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ]
php: [ '8.2', '8.3', '8.4', '8.5' ]
strategy: [ 'highest' ]
sf_version: ['']
include:
- php: 7.3
sf_version: '4.*'
- php: 7.4
strategy: 'lowest'
- php: 8.0
sf_version: '6.*'
- php: 8.1
sf_version: '6.*'
- php: 8.2
sf_version: '6.*'
- php: 8.3
sf_version: '7.*'
- php: 8.4
sf_version: '7.*'
- php: 8.5
sf_version: '7.*'
- php: 8.5
sf_version: '8.*'

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v6

- name: Generate locales
run: sudo apt-get update && sudo apt-get install tzdata locales -y && sudo locale-gen sv_SE && sudo locale-gen sv_SE.UTF-8 && sudo locale-gen en_US && sudo locale-gen en_US.UTF-8
Expand All @@ -43,7 +39,7 @@ jobs:
coverage: none

- name: Download dependencies
uses: ramsey/composer-install@v2
uses: ramsey/composer-install@v4
env:
SYMFONY_REQUIRE: ${{ matrix.sf_version }}
with:
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Mark stale issues and pull requests

on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:

jobs:
stale:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write

steps:
- uses: actions/stale@v9
with:
stale-issue-message: 'This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs.'
close-issue-message: 'This issue has been automatically closed due to inactivity. Feel free to reopen it if it is still relevant.'
stale-pr-message: 'This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs.'
close-pr-message: 'This pull request has been automatically closed due to inactivity. Feel free to reopen it if it is still relevant.'
days-before-stale: 60
days-before-close: 14
stale-issue-label: 'stale'
stale-pr-label: 'stale'
exempt-issue-labels: 'pinned,security,bug'
exempt-pr-labels: 'pinned,security'
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
.idea
vendor/
composer.lock
composer.phar
phpunit.xml
php-cs-fixer.phar
.phpunit.result.cache
348 changes: 127 additions & 221 deletions README.md

Large diffs are not rendered by default.

126 changes: 68 additions & 58 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,61 +1,71 @@
{
"name" : "league/geotools",
"type" : "library",
"description" : "Geo-related tools PHP 7.3+ library",
"keywords" : ["geotools", "geometry", "geocoder", "geocoding", "geoip", "bounds", "distance", "batch", "async", "geohash", "geolocation", "latlong", "latitude", "longitude"],
"license" : "MIT",

"authors" : [{
"name" : "Antoine Corcy",
"email" : "[email protected]",
"homepage" : "http://sbin.dk",
"role" : "Developer"
}],

"support" : {
"issues" : "https://github.com/thephpleague/geotools/issues",
"source" : "https://github.com/thephpleague/geotools"
},

"replace" : {
"toin0u/geotools" : "*"
},

"require" : {
"php" : "^7.3 || ^7.4 || ^8.0",
"psr/cache" : "^1.0 || ^2.0 || ^3.0",
"willdurand/geocoder" : "^4.5 || ^5.0",
"react/promise" : "^2.8 || ^3.0",
"symfony/console" : "^4.4 || ^5.0 || ^6.0 || ^7.0",
"symfony/property-access" : "^4.4 || ^5.0 || ^6.0 || ^7.0",
"symfony/serializer" : "^4.4 || ^5.0 || ^6.0 || ^7.0",
"react/event-loop" : "^1.0",
"php-http/discovery" : "^1.0",
"ext-bcmath": "*",
"ext-json": "*"
},

"require-dev" : {
"phpunit/phpunit" : "^9.5",
"cache/array-adapter" : "^1.0"
},

"autoload" : {
"psr-4" : {
"League\\Geotools\\" : "src"
}
},

"autoload-dev" : {
"psr-4" : {
"League\\Geotools\\Tests\\" : "tests"
}
},

"bin" : ["bin/geotools"],
"config": {
"allow-plugins": {
"php-http/discovery": true
}
"name": "league/geotools",
"type": "library",
"description": "Geo-related tools PHP 8.2+ library",
"keywords": [
"geotools",
"geometry",
"geocoder",
"geocoding",
"geoip",
"bounds",
"distance",
"batch",
"async",
"geohash",
"geolocation",
"latlong",
"latitude",
"longitude"
],
"license": "MIT",
"authors": [
{
"name": "Antoine Corcy",
"email": "[email protected]",
"homepage": "http://sbin.dk",
"role": "Developer"
}
],
"support": {
"issues": "https://github.com/thephpleague/geotools/issues",
"source": "https://github.com/thephpleague/geotools"
},
"replace": {
"toin0u/geotools": "*"
},
"require": {
"php": "^8.2",
"psr/cache": "^3.0",
"willdurand/geocoder": "^4.5 || ^5.0",
"react/promise": "^2.8 || ^3.0",
"symfony/console": "^7.0 || ^8.0",
"symfony/property-access": "^7.0 || ^8.0",
"symfony/serializer": "^7.0 || ^8.0",
"react/event-loop": "^1.0",
"php-http/discovery": "^1.0",
"ext-bcmath": "*",
"ext-json": "*"
},
"require-dev": {
"phpunit/phpunit": "^11.0"
},
"autoload": {
"psr-4": {
"League\\Geotools\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"League\\Geotools\\Tests\\": "tests"
}
},
"bin": [
"bin/geotools"
],
"config": {
"allow-plugins": {
"php-http/discovery": true
}
}
}
6 changes: 6 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
parameters:
level: 6
paths:
- src
phpVersion: 80200
checkMissingIterableValueType: false
13 changes: 13 additions & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="tests/bootstrap.php" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.5/phpunit.xsd">
<testsuites>
<testsuite name="units">
<directory>tests</directory>
</testsuite>
</testsuites>
<source>
<include>
<directory>src</directory>
</include>
</source>
</phpunit>
13 changes: 0 additions & 13 deletions phpunit.xml.dist

This file was deleted.

2 changes: 1 addition & 1 deletion src/CLI/Command/Convert/DM.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
*/
class DM extends \Symfony\Component\Console\Command\Command
{
protected function configure()
protected function configure(): void
{
$availableEllipsoids = Ellipsoid::getAvailableEllipsoidNames();

Expand Down
2 changes: 1 addition & 1 deletion src/CLI/Command/Convert/DMS.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
*/
class DMS extends \Symfony\Component\Console\Command\Command
{
protected function configure()
protected function configure(): void
{
$availableEllipsoids = Ellipsoid::getAvailableEllipsoidNames();

Expand Down
2 changes: 1 addition & 1 deletion src/CLI/Command/Convert/UTM.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*/
class UTM extends \Symfony\Component\Console\Command\Command
{
protected function configure()
protected function configure(): void
{
$availableEllipsoids = Ellipsoid::getAvailableEllipsoidNames();

Expand Down
2 changes: 1 addition & 1 deletion src/CLI/Command/Distance/All.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*/
class All extends \Symfony\Component\Console\Command\Command
{
protected function configure()
protected function configure(): void
{
$availableEllipsoids = Ellipsoid::getAvailableEllipsoidNames();

Expand Down
2 changes: 1 addition & 1 deletion src/CLI/Command/Distance/Flat.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*/
class Flat extends \Symfony\Component\Console\Command\Command
{
protected function configure()
protected function configure(): void
{
$availableEllipsoids = Ellipsoid::getAvailableEllipsoidNames();

Expand Down
2 changes: 1 addition & 1 deletion src/CLI/Command/Distance/GreatCircle.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*/
class GreatCircle extends \Symfony\Component\Console\Command\Command
{
protected function configure()
protected function configure(): void
{
$availableEllipsoids = Ellipsoid::getAvailableEllipsoidNames();

Expand Down
2 changes: 1 addition & 1 deletion src/CLI/Command/Distance/Haversine.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*/
class Haversine extends \Symfony\Component\Console\Command\Command
{
protected function configure()
protected function configure(): void
{
$availableEllipsoids = Ellipsoid::getAvailableEllipsoidNames();

Expand Down
2 changes: 1 addition & 1 deletion src/CLI/Command/Distance/Vincenty.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*/
class Vincenty extends \Symfony\Component\Console\Command\Command
{
protected function configure()
protected function configure(): void
{
$availableEllipsoids = Ellipsoid::getAvailableEllipsoidNames();

Expand Down
2 changes: 1 addition & 1 deletion src/CLI/Command/Geocoder/Geocode.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*/
class Geocode extends Command
{
protected function configure()
protected function configure(): void
{
$this
->setName('geocoder:geocode')
Expand Down
2 changes: 1 addition & 1 deletion src/CLI/Command/Geocoder/Reverse.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
*/
class Reverse extends Command
{
protected function configure()
protected function configure(): void
{
$this
->setName('geocoder:reverse')
Expand Down
2 changes: 1 addition & 1 deletion src/CLI/Command/Geohash/Decode.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/
class Decode extends \Symfony\Component\Console\Command\Command
{
protected function configure()
protected function configure(): void
{
$this
->setName('geohash:decode')
Expand Down
2 changes: 1 addition & 1 deletion src/CLI/Command/Geohash/Encode.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*/
class Encode extends \Symfony\Component\Console\Command\Command
{
protected function configure()
protected function configure(): void
{
$this
->setName('geohash:encode')
Expand Down
2 changes: 1 addition & 1 deletion src/CLI/Command/Vertex/Destination.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*/
class Destination extends \Symfony\Component\Console\Command\Command
{
protected function configure()
protected function configure(): void
{
$availableEllipsoids = Ellipsoid::getAvailableEllipsoidNames();

Expand Down
2 changes: 1 addition & 1 deletion src/CLI/Command/Vertex/FinalBearing.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*/
class FinalBearing extends \Symfony\Component\Console\Command\Command
{
protected function configure()
protected function configure(): void
{
$availableEllipsoids = Ellipsoid::getAvailableEllipsoidNames();

Expand Down
2 changes: 1 addition & 1 deletion src/CLI/Command/Vertex/FinalCardinal.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*/
class FinalCardinal extends \Symfony\Component\Console\Command\Command
{
protected function configure()
protected function configure(): void
{
$availableEllipsoids = Ellipsoid::getAvailableEllipsoidNames();

Expand Down
2 changes: 1 addition & 1 deletion src/CLI/Command/Vertex/InitialBearing.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*/
class InitialBearing extends \Symfony\Component\Console\Command\Command
{
protected function configure()
protected function configure(): void
{
$availableEllipsoids = Ellipsoid::getAvailableEllipsoidNames();

Expand Down
2 changes: 1 addition & 1 deletion src/CLI/Command/Vertex/InitialCardinal.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*/
class InitialCardinal extends \Symfony\Component\Console\Command\Command
{
protected function configure()
protected function configure(): void
{
$availableEllipsoids = Ellipsoid::getAvailableEllipsoidNames();

Expand Down
Loading