mirror of
https://github.com/shlinkio/shlink.git
synced 2024-12-23 15:40:33 -06:00
Merge pull request #1552 from acelaya-forks/feature/visit-geolocation-namespace
Feature/visit geolocation namespace
This commit is contained in:
commit
1e3ccba503
17
CHANGELOG.md
17
CHANGELOG.md
@ -4,6 +4,23 @@ All notable changes to this project will be documented in this file.
|
|||||||
|
|
||||||
The format is based on [Keep a Changelog](https://keepachangelog.com), and this project adheres to [Semantic Versioning](https://semver.org).
|
The format is based on [Keep a Changelog](https://keepachangelog.com), and this project adheres to [Semantic Versioning](https://semver.org).
|
||||||
|
|
||||||
|
## [Unreleased]
|
||||||
|
### Added
|
||||||
|
* *Nothing*
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
* [#1551](https://github.com/shlinkio/shlink/issues/1551) Moved services related to geolocating visits to the `Visit\Geolocation` namespace.
|
||||||
|
|
||||||
|
### Deprecated
|
||||||
|
* *Nothing*
|
||||||
|
|
||||||
|
### Removed
|
||||||
|
* *Nothing*
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
* *Nothing*
|
||||||
|
|
||||||
|
|
||||||
## [3.3.0] - 2022-09-18
|
## [3.3.0] - 2022-09-18
|
||||||
### Added
|
### Added
|
||||||
* [#1221](https://github.com/shlinkio/shlink/issues/1221) Added experimental support to run Shlink with [RoadRunner](https://roadrunner.dev) instead of openswoole.
|
* [#1221](https://github.com/shlinkio/shlink/issues/1221) Added experimental support to run Shlink with [RoadRunner](https://roadrunner.dev) instead of openswoole.
|
||||||
|
@ -93,8 +93,8 @@ return [
|
|||||||
|
|
||||||
Command\Visit\DownloadGeoLiteDbCommand::class => [GeoLite\GeolocationDbUpdater::class],
|
Command\Visit\DownloadGeoLiteDbCommand::class => [GeoLite\GeolocationDbUpdater::class],
|
||||||
Command\Visit\LocateVisitsCommand::class => [
|
Command\Visit\LocateVisitsCommand::class => [
|
||||||
Visit\VisitLocator::class,
|
Visit\Geolocation\VisitLocator::class,
|
||||||
Visit\VisitToLocationHelper::class,
|
Visit\Geolocation\VisitToLocationHelper::class,
|
||||||
LockFactory::class,
|
LockFactory::class,
|
||||||
],
|
],
|
||||||
Command\Visit\GetOrphanVisitsCommand::class => [Visit\VisitsStatsHelper::class],
|
Command\Visit\GetOrphanVisitsCommand::class => [Visit\VisitsStatsHelper::class],
|
||||||
|
@ -11,10 +11,10 @@ use Shlinkio\Shlink\Common\Util\IpAddress;
|
|||||||
use Shlinkio\Shlink\Core\Entity\Visit;
|
use Shlinkio\Shlink\Core\Entity\Visit;
|
||||||
use Shlinkio\Shlink\Core\Entity\VisitLocation;
|
use Shlinkio\Shlink\Core\Entity\VisitLocation;
|
||||||
use Shlinkio\Shlink\Core\Exception\IpCannotBeLocatedException;
|
use Shlinkio\Shlink\Core\Exception\IpCannotBeLocatedException;
|
||||||
|
use Shlinkio\Shlink\Core\Visit\Geolocation\VisitGeolocationHelperInterface;
|
||||||
|
use Shlinkio\Shlink\Core\Visit\Geolocation\VisitLocatorInterface;
|
||||||
|
use Shlinkio\Shlink\Core\Visit\Geolocation\VisitToLocationHelperInterface;
|
||||||
use Shlinkio\Shlink\Core\Visit\Model\UnlocatableIpType;
|
use Shlinkio\Shlink\Core\Visit\Model\UnlocatableIpType;
|
||||||
use Shlinkio\Shlink\Core\Visit\VisitGeolocationHelperInterface;
|
|
||||||
use Shlinkio\Shlink\Core\Visit\VisitLocatorInterface;
|
|
||||||
use Shlinkio\Shlink\Core\Visit\VisitToLocationHelperInterface;
|
|
||||||
use Shlinkio\Shlink\IpGeolocation\Model\Location;
|
use Shlinkio\Shlink\IpGeolocation\Model\Location;
|
||||||
use Symfony\Component\Console\Exception\RuntimeException;
|
use Symfony\Component\Console\Exception\RuntimeException;
|
||||||
use Symfony\Component\Console\Input\ArrayInput;
|
use Symfony\Component\Console\Input\ArrayInput;
|
||||||
|
@ -15,9 +15,9 @@ use Shlinkio\Shlink\Core\Entity\Visit;
|
|||||||
use Shlinkio\Shlink\Core\Entity\VisitLocation;
|
use Shlinkio\Shlink\Core\Entity\VisitLocation;
|
||||||
use Shlinkio\Shlink\Core\Exception\IpCannotBeLocatedException;
|
use Shlinkio\Shlink\Core\Exception\IpCannotBeLocatedException;
|
||||||
use Shlinkio\Shlink\Core\Model\Visitor;
|
use Shlinkio\Shlink\Core\Model\Visitor;
|
||||||
use Shlinkio\Shlink\Core\Visit\VisitGeolocationHelperInterface;
|
use Shlinkio\Shlink\Core\Visit\Geolocation\VisitGeolocationHelperInterface;
|
||||||
use Shlinkio\Shlink\Core\Visit\VisitLocator;
|
use Shlinkio\Shlink\Core\Visit\Geolocation\VisitLocator;
|
||||||
use Shlinkio\Shlink\Core\Visit\VisitToLocationHelperInterface;
|
use Shlinkio\Shlink\Core\Visit\Geolocation\VisitToLocationHelperInterface;
|
||||||
use Shlinkio\Shlink\IpGeolocation\Exception\WrongIpException;
|
use Shlinkio\Shlink\IpGeolocation\Exception\WrongIpException;
|
||||||
use Shlinkio\Shlink\IpGeolocation\Model\Location;
|
use Shlinkio\Shlink\IpGeolocation\Model\Location;
|
||||||
use ShlinkioTest\Shlink\CLI\CliTestUtilsTrait;
|
use ShlinkioTest\Shlink\CLI\CliTestUtilsTrait;
|
||||||
|
@ -44,8 +44,8 @@ return [
|
|||||||
|
|
||||||
Visit\VisitsTracker::class => ConfigAbstractFactory::class,
|
Visit\VisitsTracker::class => ConfigAbstractFactory::class,
|
||||||
Visit\RequestTracker::class => ConfigAbstractFactory::class,
|
Visit\RequestTracker::class => ConfigAbstractFactory::class,
|
||||||
Visit\VisitLocator::class => ConfigAbstractFactory::class,
|
Visit\Geolocation\VisitLocator::class => ConfigAbstractFactory::class,
|
||||||
Visit\VisitToLocationHelper::class => ConfigAbstractFactory::class,
|
Visit\Geolocation\VisitToLocationHelper::class => ConfigAbstractFactory::class,
|
||||||
Visit\VisitsStatsHelper::class => ConfigAbstractFactory::class,
|
Visit\VisitsStatsHelper::class => ConfigAbstractFactory::class,
|
||||||
Visit\Transformer\OrphanVisitDataTransformer::class => InvokableFactory::class,
|
Visit\Transformer\OrphanVisitDataTransformer::class => InvokableFactory::class,
|
||||||
|
|
||||||
@ -109,8 +109,8 @@ return [
|
|||||||
ShortUrl\Helper\ShortUrlTitleResolutionHelper::class,
|
ShortUrl\Helper\ShortUrlTitleResolutionHelper::class,
|
||||||
ShortUrl\Resolver\PersistenceShortUrlRelationResolver::class,
|
ShortUrl\Resolver\PersistenceShortUrlRelationResolver::class,
|
||||||
],
|
],
|
||||||
Visit\VisitLocator::class => ['em'],
|
Visit\Geolocation\VisitLocator::class => ['em'],
|
||||||
Visit\VisitToLocationHelper::class => [IpLocationResolverInterface::class],
|
Visit\Geolocation\VisitToLocationHelper::class => [IpLocationResolverInterface::class],
|
||||||
Visit\VisitsStatsHelper::class => ['em'],
|
Visit\VisitsStatsHelper::class => ['em'],
|
||||||
Tag\TagService::class => ['em'],
|
Tag\TagService::class => ['em'],
|
||||||
Service\ShortUrl\DeleteShortUrlService::class => [
|
Service\ShortUrl\DeleteShortUrlService::class => [
|
||||||
|
@ -10,8 +10,8 @@ use Shlinkio\Shlink\CLI\GeoLite\GeolocationDbUpdater;
|
|||||||
use Shlinkio\Shlink\Common\Cache\RedisPublishingHelper;
|
use Shlinkio\Shlink\Common\Cache\RedisPublishingHelper;
|
||||||
use Shlinkio\Shlink\Common\Mercure\MercureHubPublishingHelper;
|
use Shlinkio\Shlink\Common\Mercure\MercureHubPublishingHelper;
|
||||||
use Shlinkio\Shlink\Common\RabbitMq\RabbitMqPublishingHelper;
|
use Shlinkio\Shlink\Common\RabbitMq\RabbitMqPublishingHelper;
|
||||||
use Shlinkio\Shlink\Core\Visit\VisitLocator;
|
use Shlinkio\Shlink\Core\Visit\Geolocation\VisitLocator;
|
||||||
use Shlinkio\Shlink\Core\Visit\VisitToLocationHelper;
|
use Shlinkio\Shlink\Core\Visit\Geolocation\VisitToLocationHelper;
|
||||||
use Shlinkio\Shlink\IpGeolocation\GeoLite2\DbUpdater;
|
use Shlinkio\Shlink\IpGeolocation\GeoLite2\DbUpdater;
|
||||||
use Shlinkio\Shlink\IpGeolocation\Resolver\IpLocationResolverInterface;
|
use Shlinkio\Shlink\IpGeolocation\Resolver\IpLocationResolverInterface;
|
||||||
|
|
||||||
|
@ -8,9 +8,9 @@ use Shlinkio\Shlink\Core\Entity\Visit;
|
|||||||
use Shlinkio\Shlink\Core\Entity\VisitLocation;
|
use Shlinkio\Shlink\Core\Entity\VisitLocation;
|
||||||
use Shlinkio\Shlink\Core\EventDispatcher\Event\GeoLiteDbCreated;
|
use Shlinkio\Shlink\Core\EventDispatcher\Event\GeoLiteDbCreated;
|
||||||
use Shlinkio\Shlink\Core\Exception\IpCannotBeLocatedException;
|
use Shlinkio\Shlink\Core\Exception\IpCannotBeLocatedException;
|
||||||
use Shlinkio\Shlink\Core\Visit\VisitGeolocationHelperInterface;
|
use Shlinkio\Shlink\Core\Visit\Geolocation\VisitGeolocationHelperInterface;
|
||||||
use Shlinkio\Shlink\Core\Visit\VisitLocatorInterface;
|
use Shlinkio\Shlink\Core\Visit\Geolocation\VisitLocatorInterface;
|
||||||
use Shlinkio\Shlink\Core\Visit\VisitToLocationHelperInterface;
|
use Shlinkio\Shlink\Core\Visit\Geolocation\VisitToLocationHelperInterface;
|
||||||
use Shlinkio\Shlink\IpGeolocation\Model\Location;
|
use Shlinkio\Shlink\IpGeolocation\Model\Location;
|
||||||
|
|
||||||
class LocateUnlocatedVisits implements VisitGeolocationHelperInterface
|
class LocateUnlocatedVisits implements VisitGeolocationHelperInterface
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Shlinkio\Shlink\Core\Visit;
|
namespace Shlinkio\Shlink\Core\Visit\Geolocation;
|
||||||
|
|
||||||
use Shlinkio\Shlink\Core\Entity\Visit;
|
use Shlinkio\Shlink\Core\Entity\Visit;
|
||||||
use Shlinkio\Shlink\Core\Entity\VisitLocation;
|
use Shlinkio\Shlink\Core\Entity\VisitLocation;
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Shlinkio\Shlink\Core\Visit;
|
namespace Shlinkio\Shlink\Core\Visit\Geolocation;
|
||||||
|
|
||||||
use Doctrine\ORM\EntityManagerInterface;
|
use Doctrine\ORM\EntityManagerInterface;
|
||||||
use Shlinkio\Shlink\Core\Entity\Visit;
|
use Shlinkio\Shlink\Core\Entity\Visit;
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Shlinkio\Shlink\Core\Visit;
|
namespace Shlinkio\Shlink\Core\Visit\Geolocation;
|
||||||
|
|
||||||
interface VisitLocatorInterface
|
interface VisitLocatorInterface
|
||||||
{
|
{
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Shlinkio\Shlink\Core\Visit;
|
namespace Shlinkio\Shlink\Core\Visit\Geolocation;
|
||||||
|
|
||||||
use Shlinkio\Shlink\Common\Util\IpAddress;
|
use Shlinkio\Shlink\Common\Util\IpAddress;
|
||||||
use Shlinkio\Shlink\Core\Entity\Visit;
|
use Shlinkio\Shlink\Core\Entity\Visit;
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Shlinkio\Shlink\Core\Visit;
|
namespace Shlinkio\Shlink\Core\Visit\Geolocation;
|
||||||
|
|
||||||
use Shlinkio\Shlink\Core\Entity\Visit;
|
use Shlinkio\Shlink\Core\Entity\Visit;
|
||||||
use Shlinkio\Shlink\Core\Exception\IpCannotBeLocatedException;
|
use Shlinkio\Shlink\Core\Exception\IpCannotBeLocatedException;
|
@ -11,8 +11,8 @@ use Shlinkio\Shlink\Core\Entity\Visit;
|
|||||||
use Shlinkio\Shlink\Core\EventDispatcher\Event\GeoLiteDbCreated;
|
use Shlinkio\Shlink\Core\EventDispatcher\Event\GeoLiteDbCreated;
|
||||||
use Shlinkio\Shlink\Core\EventDispatcher\LocateUnlocatedVisits;
|
use Shlinkio\Shlink\Core\EventDispatcher\LocateUnlocatedVisits;
|
||||||
use Shlinkio\Shlink\Core\Model\Visitor;
|
use Shlinkio\Shlink\Core\Model\Visitor;
|
||||||
use Shlinkio\Shlink\Core\Visit\VisitLocatorInterface;
|
use Shlinkio\Shlink\Core\Visit\Geolocation\VisitLocatorInterface;
|
||||||
use Shlinkio\Shlink\Core\Visit\VisitToLocationHelperInterface;
|
use Shlinkio\Shlink\Core\Visit\Geolocation\VisitToLocationHelperInterface;
|
||||||
use Shlinkio\Shlink\IpGeolocation\Model\Location;
|
use Shlinkio\Shlink\IpGeolocation\Model\Location;
|
||||||
|
|
||||||
class LocateUnlocatedVisitsTest extends TestCase
|
class LocateUnlocatedVisitsTest extends TestCase
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace ShlinkioTest\Shlink\Core\Visit;
|
namespace ShlinkioTest\Shlink\Core\Visit\Geolocation;
|
||||||
|
|
||||||
use Doctrine\ORM\EntityManager;
|
use Doctrine\ORM\EntityManager;
|
||||||
use Exception;
|
use Exception;
|
||||||
@ -18,8 +18,8 @@ use Shlinkio\Shlink\Core\Entity\VisitLocation;
|
|||||||
use Shlinkio\Shlink\Core\Exception\IpCannotBeLocatedException;
|
use Shlinkio\Shlink\Core\Exception\IpCannotBeLocatedException;
|
||||||
use Shlinkio\Shlink\Core\Model\Visitor;
|
use Shlinkio\Shlink\Core\Model\Visitor;
|
||||||
use Shlinkio\Shlink\Core\Repository\VisitRepositoryInterface;
|
use Shlinkio\Shlink\Core\Repository\VisitRepositoryInterface;
|
||||||
use Shlinkio\Shlink\Core\Visit\VisitGeolocationHelperInterface;
|
use Shlinkio\Shlink\Core\Visit\Geolocation\VisitGeolocationHelperInterface;
|
||||||
use Shlinkio\Shlink\Core\Visit\VisitLocator;
|
use Shlinkio\Shlink\Core\Visit\Geolocation\VisitLocator;
|
||||||
use Shlinkio\Shlink\IpGeolocation\Model\Location;
|
use Shlinkio\Shlink\IpGeolocation\Model\Location;
|
||||||
|
|
||||||
use function array_shift;
|
use function array_shift;
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace ShlinkioTest\Shlink\Core\Visit;
|
namespace ShlinkioTest\Shlink\Core\Visit\Geolocation;
|
||||||
|
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
use Prophecy\Argument;
|
use Prophecy\Argument;
|
||||||
@ -12,7 +12,7 @@ use Shlinkio\Shlink\Common\Util\IpAddress;
|
|||||||
use Shlinkio\Shlink\Core\Entity\Visit;
|
use Shlinkio\Shlink\Core\Entity\Visit;
|
||||||
use Shlinkio\Shlink\Core\Exception\IpCannotBeLocatedException;
|
use Shlinkio\Shlink\Core\Exception\IpCannotBeLocatedException;
|
||||||
use Shlinkio\Shlink\Core\Model\Visitor;
|
use Shlinkio\Shlink\Core\Model\Visitor;
|
||||||
use Shlinkio\Shlink\Core\Visit\VisitToLocationHelper;
|
use Shlinkio\Shlink\Core\Visit\Geolocation\VisitToLocationHelper;
|
||||||
use Shlinkio\Shlink\IpGeolocation\Exception\WrongIpException;
|
use Shlinkio\Shlink\IpGeolocation\Exception\WrongIpException;
|
||||||
use Shlinkio\Shlink\IpGeolocation\Resolver\IpLocationResolverInterface;
|
use Shlinkio\Shlink\IpGeolocation\Resolver\IpLocationResolverInterface;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user