From 986c165815490c5267bd9c0768467796ae681895 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Sat, 10 Aug 2019 23:30:47 +0200 Subject: [PATCH] Moved RuntimeException to IpGeolocation module --- module/CLI/src/Command/Visit/UpdateDbCommand.php | 2 +- module/CLI/src/Util/GeolocationDbUpdater.php | 2 +- module/CLI/test/Command/Visit/UpdateDbCommandTest.php | 2 +- module/CLI/test/Util/GeolocationDbUpdaterTest.php | 2 +- module/Common/src/Exception/PreviewGenerationException.php | 2 ++ .../src/Exception/RuntimeException.php | 2 +- module/IpGeolocation/src/Exception/WrongIpException.php | 2 +- module/IpGeolocation/src/GeoLite2/DbUpdater.php | 2 +- module/IpGeolocation/src/GeoLite2/DbUpdaterInterface.php | 2 +- module/IpGeolocation/test/GeoLite2/DbUpdaterTest.php | 2 +- 10 files changed, 11 insertions(+), 9 deletions(-) rename module/{Common => IpGeolocation}/src/Exception/RuntimeException.php (76%) diff --git a/module/CLI/src/Command/Visit/UpdateDbCommand.php b/module/CLI/src/Command/Visit/UpdateDbCommand.php index 938c24b7..0e1cc223 100644 --- a/module/CLI/src/Command/Visit/UpdateDbCommand.php +++ b/module/CLI/src/Command/Visit/UpdateDbCommand.php @@ -4,7 +4,7 @@ declare(strict_types=1); namespace Shlinkio\Shlink\CLI\Command\Visit; use Shlinkio\Shlink\CLI\Util\ExitCodes; -use Shlinkio\Shlink\Common\Exception\RuntimeException; +use Shlinkio\Shlink\IpGeolocation\Exception\RuntimeException; use Shlinkio\Shlink\IpGeolocation\GeoLite2\DbUpdaterInterface; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Helper\ProgressBar; diff --git a/module/CLI/src/Util/GeolocationDbUpdater.php b/module/CLI/src/Util/GeolocationDbUpdater.php index 48f958ca..1a2c5715 100644 --- a/module/CLI/src/Util/GeolocationDbUpdater.php +++ b/module/CLI/src/Util/GeolocationDbUpdater.php @@ -6,7 +6,7 @@ namespace Shlinkio\Shlink\CLI\Util; use Cake\Chronos\Chronos; use GeoIp2\Database\Reader; use Shlinkio\Shlink\CLI\Exception\GeolocationDbUpdateFailedException; -use Shlinkio\Shlink\Common\Exception\RuntimeException; +use Shlinkio\Shlink\IpGeolocation\Exception\RuntimeException; use Shlinkio\Shlink\IpGeolocation\GeoLite2\DbUpdaterInterface; use Symfony\Component\Lock\Factory as Locker; use Throwable; diff --git a/module/CLI/test/Command/Visit/UpdateDbCommandTest.php b/module/CLI/test/Command/Visit/UpdateDbCommandTest.php index ea4e0861..2ebd6a38 100644 --- a/module/CLI/test/Command/Visit/UpdateDbCommandTest.php +++ b/module/CLI/test/Command/Visit/UpdateDbCommandTest.php @@ -8,7 +8,7 @@ use Prophecy\Argument; use Prophecy\Prophecy\ObjectProphecy; use Shlinkio\Shlink\CLI\Command\Visit\UpdateDbCommand; use Shlinkio\Shlink\CLI\Util\ExitCodes; -use Shlinkio\Shlink\Common\Exception\RuntimeException; +use Shlinkio\Shlink\IpGeolocation\Exception\RuntimeException; use Shlinkio\Shlink\IpGeolocation\GeoLite2\DbUpdaterInterface; use Symfony\Component\Console\Application; use Symfony\Component\Console\Tester\CommandTester; diff --git a/module/CLI/test/Util/GeolocationDbUpdaterTest.php b/module/CLI/test/Util/GeolocationDbUpdaterTest.php index 137e70de..6a8dcceb 100644 --- a/module/CLI/test/Util/GeolocationDbUpdaterTest.php +++ b/module/CLI/test/Util/GeolocationDbUpdaterTest.php @@ -11,7 +11,7 @@ use Prophecy\Argument; use Prophecy\Prophecy\ObjectProphecy; use Shlinkio\Shlink\CLI\Exception\GeolocationDbUpdateFailedException; use Shlinkio\Shlink\CLI\Util\GeolocationDbUpdater; -use Shlinkio\Shlink\Common\Exception\RuntimeException; +use Shlinkio\Shlink\IpGeolocation\Exception\RuntimeException; use Shlinkio\Shlink\IpGeolocation\GeoLite2\DbUpdaterInterface; use Symfony\Component\Lock; use Throwable; diff --git a/module/Common/src/Exception/PreviewGenerationException.php b/module/Common/src/Exception/PreviewGenerationException.php index 726e60fa..a889474a 100644 --- a/module/Common/src/Exception/PreviewGenerationException.php +++ b/module/Common/src/Exception/PreviewGenerationException.php @@ -3,6 +3,8 @@ declare(strict_types=1); namespace Shlinkio\Shlink\Common\Exception; +use RuntimeException; + use function sprintf; /** @deprecated */ diff --git a/module/Common/src/Exception/RuntimeException.php b/module/IpGeolocation/src/Exception/RuntimeException.php similarity index 76% rename from module/Common/src/Exception/RuntimeException.php rename to module/IpGeolocation/src/Exception/RuntimeException.php index 6fad16aa..d55a5af9 100644 --- a/module/Common/src/Exception/RuntimeException.php +++ b/module/IpGeolocation/src/Exception/RuntimeException.php @@ -1,7 +1,7 @@