Skip to content
Merged
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
1 change: 1 addition & 0 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
- "8.2"
- "8.3"
- "8.4"
- "8.5"

steps:
- name: Checkout
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
- "8.2"
- "8.3"
- "8.4"
- "8.5"

steps:
- name: Checkout
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Documentation is available at: https://docs.dotkernel.org/dot-geoip/.
## Badges

![OSS Lifecycle](https://img.shields.io/osslifecycle/dotkernel/dot-geoip)
![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/dot-geoip/3.9.0)
![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/dot-geoip/3.10.0)

[![GitHub issues](https://img.shields.io/github/issues/dotkernel/dot-geoip)](https://github.com/dotkernel/dot-geoip/issues)
[![GitHub forks](https://img.shields.io/github/forks/dotkernel/dot-geoip)](https://github.com/dotkernel/dot-geoip/network)
Expand All @@ -31,7 +31,7 @@ composer require dotkernel/dot-geoip
```

If your application didn't already use it, the above command also installed [dotkernel/dot-cli](https://github.com/dotkernel/dot-cli).
In this case, see it's [README](https://github.com/dotkernel/dot-cli/blob/3.0/README.md) file on how to use it.
In this case, see its [README](https://github.com/dotkernel/dot-cli/blob/3.0/README.md) file on how to use it.

Copy config file `vendor/dotkernel/dot-geoip/config/autoload/geoip.global.php` into your application's `config/autoload` directory.

Expand All @@ -49,15 +49,15 @@ Dot\GeoIP\Command\GeoIpCommand::getDefaultName() => Dot\GeoIP\Command\GeoIpComma

## Manage GeoLite2 database

You can download/update a specific GeoLite2 database, by running the following command:
You can download/update a specific GeoLite2 database by running the following command:

```shell
php ./bin/cli.php geoip:synchronize -d {DATABASE}
```

Where _{DATABASE}_ takes one of the following values: `asn`, `city`, `country`.

You can download/update all GeoLite2 databases at once, by running the following command:
You can download/update all GeoLite2 databases at once by running the following command:

```shell
php ./bin/cli.php geoip:synchronize
Expand Down Expand Up @@ -115,16 +115,16 @@ class ExampleService
try {
// You can use any of the below methods:

// Get CountryData which includes isEuMember, isoCode and name
// Get CountryData, which includes isEuMember, isoCode and name
return $this->locationService->getCountry($ipAddress);

// Get ContinentData which includes code and name
// Get ContinentData, which includes code and name
return $this->locationService->getContinent($ipAddress);

// Get OrganizationData which includes asn and name
// Get OrganizationData, which includes asn and name
return $this->locationService->getOrganization($ipAddress);

// Get LocationData which includes all of the above + estimated coordinates + timezone
// Get LocationData, which includes all the above + estimated coordinates and timezone
return $this->locationService->getLocation($ipAddress);
} catch (Throwable $exception) {
// handle errors
Expand Down
10 changes: 4 additions & 6 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@

## Supported Versions


| Version | Supported | PHP Version |
|---------|--------------------|------------------------------------------------------------------------------------------------------------------------|
| 3.x | :white_check_mark: | ![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/dot-geoip/3.6.0) |
| <= 2.x | :x: | |

| Version | Supported | PHP Version |
|---------|--------------------|------------------------------------------------------------------------------------------------------------|
| 3.x | :white_check_mark: | ![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/dot-geoip/3.10.0) |
| <= 2.x | :x: | |

## Reporting Potential Security Issues

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
}
},
"require": {
"php": "~8.2.0 || ~8.3.0 || ~8.4.0",
"php": "~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0",
"dotkernel/dot-cli": "^3.5",
"geoip2/geoip2": "^3.0",
"guzzlehttp/guzzle": "^7.8",
Expand Down
4 changes: 2 additions & 2 deletions docs/book/v3/manage-geolite2-database.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Manage GeoLite2 database

You can download/update a specific GeoLite2 database, by running the following command:
You can download/update a specific GeoLite2 database by running the following command:

```shell
php ./bin/cli.php geoip:synchronize -d {DATABASE}
```

Where _{DATABASE}_ takes one of the following values: `asn`, `city`, `country`.

You can download/update all GeoLite2 databases at once, by running the following command:
You can download/update all GeoLite2 databases at once by running the following command:

```shell
php ./bin/cli.php geoip:synchronize
Expand Down
4 changes: 2 additions & 2 deletions docs/book/v3/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ Dotkernel component to provide geographical details about an IP address.
## Badges

![OSS Lifecycle](https://img.shields.io/osslifecycle/dotkernel/dot-geoip)
![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/dot-geoip/3.9.0)
![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/dot-geoip/3.10.0)

[![GitHub issues](https://img.shields.io/github/issues/dotkernel/dot-geoip)](https://github.com/dotkernel/dot-geoip/issues)
[![GitHub forks](https://img.shields.io/github/forks/dotkernel/dot-geoip)](https://github.com/dotkernel/dot-geoip/network)
[![GitHub stars](https://img.shields.io/github/stars/dotkernel/dot-geoip)](https://github.com/dotkernel/dot-geoip/stargazers)
[![GitHub license](https://img.shields.io/github/license/dotkernel/dot-geoip)](https://github.com/dotkernel/dot-geoip/blob/3.0/LICENSE)

[![Build Static](https://github.com/dotkernel/dot-geoip/actions/workflows/continuous-integration.yml/badge.svg?branch=3.0)](https://github.com/dotkernel/dot-geoip/actions/workflows/continuous-integration.yml)
[![codecov](https://codecov.io/gh/dotkernel/dot-geoip/graph/badge.svg?token=HZKFRQWDSV)](https://codecov.io/gh/dotkernel/dot-geoip)
[![codecov](https://codecov.io/gh/dotkernel/dot-geoip/graph/badge.svg?token=K473P7MDZ4)](https://codecov.io/gh/dotkernel/dot-geoip)
[![PHPStan](https://github.com/dotkernel/dot-geoip/actions/workflows/static-analysis.yml/badge.svg?branch=3.0)](https://github.com/dotkernel/dot-geoip/actions/workflows/static-analysis.yml)
8 changes: 4 additions & 4 deletions docs/book/v3/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ class ExampleService
*/
public function myMethod(string $ipAddress): object
{
return $this->locationService->getCountry($ipAddress); // Returns instance of Dot\GeoIP\Data\CountryData
return $this->locationService->getCountry($ipAddress); // Returns an instance of Dot\GeoIP\Data\CountryData

return $this->locationService->getCity($ipAddress); // Return instance of Dot\GeoIP\Data\CityData

return $this->locationService->getContinent($ipAddress) // Returns instance of Dot\GeoIP\Data\ContinentData
return $this->locationService->getContinent($ipAddress) // Returns an instance of Dot\GeoIP\Data\ContinentData

return $this->locationService->getOrganization($ipAddress) // Returns instance of Dot\GeoIP\Data\OrganizationData
return $this->locationService->getOrganization($ipAddress) // Returns an instance of Dot\GeoIP\Data\OrganizationData

return $this->locationService->getLocation($ipAddress) // Returns instance of Dot\GeoIP\Data\LocationData
return $this->locationService->getLocation($ipAddress) // Returns an instance of Dot\GeoIP\Data\LocationData
}
}
```