Browse Source

Project migrated from zend to laminas

Alejandro Celaya 4 years ago
parent
commit
2151b97bec
100 changed files with 187 additions and 192 deletions
  1. 1 1
      .phpstorm.meta.php
  2. 2 2
      README.md
  3. 8 0
      UPGRADE.md
  4. 3 3
      bin/test/run-api-tests.sh
  5. 15 15
      composer.json
  6. 1 1
      config/autoload/common.global.php
  7. 1 1
      config/autoload/common.local.php.dist
  8. 2 3
      config/autoload/dependencies.global.php
  9. 2 2
      config/autoload/error-handler.global.php
  10. 1 1
      config/autoload/locks.global.php
  11. 1 1
      config/autoload/logger.global.php
  12. 7 7
      config/autoload/middleware-pipeline.global.php
  13. 1 1
      config/autoload/router.global.php
  14. 1 1
      config/autoload/router.local.php.dist
  15. 1 1
      config/autoload/swoole.global.php
  16. 3 3
      config/autoload/swoole.local.php.dist
  17. 0 14
      config/autoload/wkhtmltopdf.global.php
  18. 1 1
      config/cli-config.php
  19. 11 9
      config/config.php
  20. 1 1
      config/container.php
  21. 1 1
      config/run.php
  22. 3 3
      config/test/test_config.global.php
  23. 1 1
      data/infra/examples/shlink-daemon.sh
  24. 1 1
      data/infra/swoole.Dockerfile
  25. 1 1
      docker/config/shlink_in_docker.local.php
  26. 1 1
      docker/docker-entrypoint.sh
  27. 2 2
      module/CLI/config/dependencies.config.php
  28. 1 1
      module/CLI/src/Command/ShortUrl/GenerateShortUrlCommand.php
  29. 1 1
      module/CLI/src/Command/ShortUrl/ListShortUrlsCommand.php
  30. 2 2
      module/CLI/test/Command/ShortUrl/GetVisitsCommandTest.php
  31. 2 2
      module/CLI/test/Command/ShortUrl/ListShortUrlsCommandTest.php
  32. 1 1
      module/CLI/test/Factory/ApplicationFactoryTest.php
  33. 3 3
      module/Core/config/dependencies.config.php
  34. 1 1
      module/Core/config/event_dispatcher.config.php
  35. 1 1
      module/Core/config/mezzio.config.php
  36. 1 1
      module/Core/src/Action/AbstractTrackingAction.php
  37. 2 2
      module/Core/src/Action/QrCodeAction.php
  38. 1 1
      module/Core/src/Action/RedirectAction.php
  39. 3 3
      module/Core/src/Config/SimplifiedConfigParser.php
  40. 1 1
      module/Core/src/Entity/ShortUrl.php
  41. 2 2
      module/Core/src/ErrorHandler/NotFoundRedirectHandler.php
  42. 3 3
      module/Core/src/ErrorHandler/NotFoundTemplateHandler.php
  43. 2 2
      module/Core/src/Exception/DeleteShortUrlException.php
  44. 2 2
      module/Core/src/Exception/InvalidUrlException.php
  45. 2 2
      module/Core/src/Exception/NonUniqueSlugException.php
  46. 2 2
      module/Core/src/Exception/ShortUrlNotFoundException.php
  47. 2 2
      module/Core/src/Exception/TagConflictException.php
  48. 2 2
      module/Core/src/Exception/TagNotFoundException.php
  49. 3 3
      module/Core/src/Exception/ValidationException.php
  50. 1 1
      module/Core/src/Middleware/QrCodeCacheMiddleware.php
  51. 1 1
      module/Core/src/Options/AppOptions.php
  52. 1 1
      module/Core/src/Options/DeleteShortUrlsOptions.php
  53. 1 1
      module/Core/src/Options/NotFoundRedirectOptions.php
  54. 1 1
      module/Core/src/Options/UrlShortenerOptions.php
  55. 1 1
      module/Core/src/Paginator/Adapter/ShortUrlRepositoryAdapter.php
  56. 1 1
      module/Core/src/Paginator/Adapter/VisitsPaginatorAdapter.php
  57. 1 1
      module/Core/src/Service/ShortUrlService.php
  58. 1 1
      module/Core/src/Service/ShortUrlServiceInterface.php
  59. 1 1
      module/Core/src/Service/VisitsTracker.php
  60. 1 1
      module/Core/src/Service/VisitsTrackerInterface.php
  61. 2 2
      module/Core/src/Validation/ShortUrlMetaInputFilter.php
  62. 1 1
      module/Core/test/Action/PixelActionTest.php
  63. 3 3
      module/Core/test/Action/QrCodeActionTest.php
  64. 2 2
      module/Core/test/Action/RedirectActionTest.php
  65. 1 1
      module/Core/test/Config/SimplifiedConfigParserTest.php
  66. 1 1
      module/Core/test/ConfigProviderTest.php
  67. 5 5
      module/Core/test/ErrorHandler/NotFoundRedirectHandlerTest.php
  68. 5 5
      module/Core/test/ErrorHandler/NotFoundTemplateHandlerTest.php
  69. 1 1
      module/Core/test/Exception/ValidationExceptionTest.php
  70. 3 3
      module/Core/test/Middleware/QrCodeCacheMiddlewareTest.php
  71. 1 1
      module/Core/test/Service/UrlShortenerTest.php
  72. 1 1
      module/Core/test/Service/VisitsTrackerTest.php
  73. 1 1
      module/Core/test/Util/UrlValidatorTest.php
  74. 1 1
      module/Rest/config/auth.config.php
  75. 3 3
      module/Rest/config/dependencies.config.php
  76. 1 1
      module/Rest/src/Action/HealthAction.php
  77. 1 1
      module/Rest/src/Action/ShortUrl/AbstractCreateShortUrlAction.php
  78. 1 1
      module/Rest/src/Action/ShortUrl/CreateShortUrlAction.php
  79. 1 1
      module/Rest/src/Action/ShortUrl/DeleteShortUrlAction.php
  80. 1 1
      module/Rest/src/Action/ShortUrl/EditShortUrlAction.php
  81. 1 1
      module/Rest/src/Action/ShortUrl/EditShortUrlTagsAction.php
  82. 1 1
      module/Rest/src/Action/ShortUrl/ListShortUrlsAction.php
  83. 1 1
      module/Rest/src/Action/ShortUrl/ResolveShortUrlAction.php
  84. 1 1
      module/Rest/src/Action/ShortUrl/SingleStepCreateShortUrlAction.php
  85. 1 1
      module/Rest/src/Action/Tag/CreateTagsAction.php
  86. 1 1
      module/Rest/src/Action/Tag/DeleteTagsAction.php
  87. 1 1
      module/Rest/src/Action/Tag/ListTagsAction.php
  88. 1 1
      module/Rest/src/Action/Tag/UpdateTagAction.php
  89. 1 1
      module/Rest/src/Action/Visit/GetVisitsAction.php
  90. 1 1
      module/Rest/src/Authentication/AuthenticationPluginManager.php
  91. 2 2
      module/Rest/src/Exception/MissingAuthenticationException.php
  92. 2 2
      module/Rest/src/Exception/VerifyAuthenticationException.php
  93. 1 1
      module/Rest/src/Middleware/AuthenticationMiddleware.php
  94. 1 1
      module/Rest/src/Middleware/CrossDomainMiddleware.php
  95. 2 2
      module/Rest/src/Middleware/EmptyResponseImplicitOptionsMiddlewareFactory.php
  96. 2 2
      module/Rest/src/Middleware/ShortUrl/CreateShortUrlContentNegotiationMiddleware.php
  97. 2 2
      module/Rest/test/Action/HealthActionTest.php
  98. 3 3
      module/Rest/test/Action/ShortUrl/CreateShortUrlActionTest.php
  99. 1 1
      module/Rest/test/Action/ShortUrl/DeleteShortUrlActionTest.php
  100. 1 1
      module/Rest/test/Action/ShortUrl/EditShortUrlActionTest.php

+ 1 - 1
.phpstorm.meta.php

@@ -2,7 +2,7 @@
 namespace PHPSTORM_META;
 
 use Psr\Container\ContainerInterface;
-use Zend\ServiceManager\ServiceLocatorInterface;
+use Laminas\ServiceManager\ServiceLocatorInterface;
 
 /**
  * PhpStorm Container Interop code completion

+ 2 - 2
README.md

@@ -123,7 +123,7 @@ Once Shlink is configured, you need to expose it to the web, either by using a t
 
     First you need to install the swoole PHP extension with [pecl](https://pecl.php.net/package/swoole), `pecl install swoole`.
 
-    Once installed, it's actually pretty easy to get shlink up and running with swoole. Run `./vendor/bin/zend-expressive-swoole start -d` and you will get shlink running on port 8080.
+    Once installed, it's actually pretty easy to get shlink up and running with swoole. Run `./vendor/bin/mezzio-swoole start -d` and you will get shlink running on port 8080.
 
     However, by doing it this way, you are loosing all the access logs, and the service won't be automatically run if the server has to be restarted.
 
@@ -140,7 +140,7 @@ Once Shlink is configured, you need to expose it to the web, either by using a t
     # Description:       Shlink non-blocking server with swoole
     ### END INIT INFO
 
-    SCRIPT=/path/to/shlink/vendor/bin/zend-expressive-swoole\ start
+    SCRIPT=/path/to/shlink/vendor/bin/mezzio-swoole\ start
     RUNAS=root
 
     PIDFILE=/var/run/shlink_swoole.pid

+ 8 - 0
UPGRADE.md

@@ -60,3 +60,11 @@ Shlink can verify provided long URLs are valid before trying to shorten them. St
 The `not_found_redirect_to` config option and the `NOT_FOUND_REDIRECT_TO` env var are no longer taken into consideration for the docker image.
 
 Instead, use `invalid_short_url_redirect_to` and `INVALID_SHORT_URL_REDIRECT_TO` respectively.
+
+### Migrated to Laminas
+
+The project has been using Zend Framework components since the beginning. Since it has been re-branded as [Laminas](https://getlaminas.org/), this version updates to the new set of components.
+
+Updating to Laminas components has these implications:
+
+* If you were manually serving Shlink with swoole, the entry script has to be changed from `/path/to/shlink/vendor/bin/zend-expressive-swoole` to `/path/to/shlink/vendor/bin/mezzio-swoole`

+ 3 - 3
bin/test/run-api-tests.sh

@@ -3,16 +3,16 @@ export APP_ENV=test
 export DB_DRIVER=mysql
 
 # Try to stop server just in case it hanged in last execution
-vendor/bin/zend-expressive-swoole stop
+vendor/bin/mezzio-swoole stop
 
 echo 'Starting server...'
-vendor/bin/zend-expressive-swoole start -d
+vendor/bin/mezzio-swoole start -d
 sleep 2
 
 vendor/bin/phpunit --order-by=random -c phpunit-api.xml --testdox --colors=always $*
 testsExitCode=$?
 
-vendor/bin/zend-expressive-swoole stop
+vendor/bin/mezzio-swoole stop
 
 # Exit this script with the same code as the tests. If tests failed, this script has to fail
 exit $testsExitCode

+ 15 - 15
composer.json

@@ -26,8 +26,21 @@
         "firebase/php-jwt": "^4.0",
         "geoip2/geoip2": "^2.9",
         "guzzlehttp/guzzle": "^6.5.1",
+        "laminas/laminas-config": "^3.3",
+        "laminas/laminas-config-aggregator": "^1.1",
+        "laminas/laminas-dependency-plugin": "^0.2",
+        "laminas/laminas-diactoros": "^2.1.3",
+        "laminas/laminas-inputfilter": "^2.10",
+        "laminas/laminas-paginator": "^2.8",
+        "laminas/laminas-servicemanager": "^3.4",
+        "laminas/laminas-stdlib": "^3.2",
         "lstrojny/functional-php": "^1.9",
-        "mikehaertl/phpwkhtmltopdf": "^2.2",
+        "mezzio/mezzio": "^3.2",
+        "mezzio/mezzio-fastroute": "^3.0",
+        "mezzio/mezzio-helpers": "^5.3",
+        "mezzio/mezzio-platesrenderer": "^2.1",
+        "mezzio/mezzio-problem-details": "^1.1",
+        "mezzio/mezzio-swoole": "^2.4",
         "monolog/monolog": "^2.0",
         "nikolaposa/monolog-factory": "^3.0",
         "ocramius/proxy-manager": "^2.5.1",
@@ -41,20 +54,7 @@
         "symfony/console": "^5.0",
         "symfony/filesystem": "^5.0",
         "symfony/lock": "^5.0",
-        "symfony/process": "^5.0",
-        "zendframework/zend-config": "^3.3",
-        "zendframework/zend-config-aggregator": "^1.1",
-        "zendframework/zend-diactoros": "^2.1.3",
-        "zendframework/zend-expressive": "^3.2",
-        "zendframework/zend-expressive-fastroute": "^3.0",
-        "zendframework/zend-expressive-helpers": "^5.3",
-        "zendframework/zend-expressive-platesrenderer": "^2.1",
-        "zendframework/zend-expressive-swoole": "^2.4",
-        "zendframework/zend-inputfilter": "^2.10",
-        "zendframework/zend-paginator": "^2.8",
-        "zendframework/zend-problem-details": "^1.1",
-        "zendframework/zend-servicemanager": "^3.4",
-        "zendframework/zend-stdlib": "^3.2"
+        "symfony/process": "^5.0"
     },
     "require-dev": {
         "devster/ubench": "^2.0",

+ 1 - 1
config/autoload/common.global.php

@@ -2,7 +2,7 @@
 
 declare(strict_types=1);
 
-use Zend\ConfigAggregator\ConfigAggregator;
+use Laminas\ConfigAggregator\ConfigAggregator;
 
 return [
 

+ 1 - 1
config/autoload/common.local.php.dist

@@ -1,7 +1,7 @@
 <?php
 declare(strict_types=1);
 
-use Zend\ConfigAggregator\ConfigAggregator;
+use Laminas\ConfigAggregator\ConfigAggregator;
 
 return [
 

+ 2 - 3
config/autoload/dependencies.global.php

@@ -2,14 +2,13 @@
 
 declare(strict_types=1);
 
-use Zend\Expressive;
-use Zend\Expressive\Container;
+use Mezzio\Container;
 
 return [
 
     'dependencies' => [
         'delegators' => [
-            Expressive\Application::class => [
+            Mezzio\Application::class => [
                 Container\ApplicationConfigInjectionDelegator::class,
             ],
         ],

+ 2 - 2
config/autoload/error-handler.global.php

@@ -2,9 +2,9 @@
 
 declare(strict_types=1);
 
+use Laminas\Stratigility\Middleware\ErrorHandler;
+use Mezzio\ProblemDetails\ProblemDetailsMiddleware;
 use Shlinkio\Shlink\Common\Logger;
-use Zend\ProblemDetails\ProblemDetailsMiddleware;
-use Zend\Stratigility\Middleware\ErrorHandler;
 
 return [
 

+ 1 - 1
config/autoload/locks.global.php

@@ -2,11 +2,11 @@
 
 declare(strict_types=1);
 
+use Laminas\ServiceManager\AbstractFactory\ConfigAbstractFactory;
 use Shlinkio\Shlink\Common\Cache\RedisFactory;
 use Shlinkio\Shlink\Common\Lock\RetryLockStoreDelegatorFactory;
 use Shlinkio\Shlink\Common\Logger\LoggerAwareDelegatorFactory;
 use Symfony\Component\Lock;
-use Zend\ServiceManager\AbstractFactory\ConfigAbstractFactory;
 
 $localLockFactory = 'Shlinkio\Shlink\LocalLockFactory';
 

+ 1 - 1
config/autoload/logger.global.php

@@ -75,7 +75,7 @@ return [
         ],
     ],
 
-    'zend-expressive-swoole' => [
+    'mezzio-swoole' => [
         'swoole-http-server' => [
             'logger' => [
                 'logger-name' => 'Logger_Access',

+ 7 - 7
config/autoload/middleware-pipeline.global.php

@@ -4,16 +4,16 @@ declare(strict_types=1);
 
 namespace Shlinkio\Shlink;
 
-use Zend\Expressive;
-use Zend\ProblemDetails;
-use Zend\Stratigility\Middleware\ErrorHandler;
+use Laminas\Stratigility\Middleware\ErrorHandler;
+use Mezzio;
+use Mezzio\ProblemDetails;
 
 return [
 
     'middleware_pipeline' => [
         'error-handler' => [
             'middleware' => [
-                Expressive\Helper\ContentLengthMiddleware::class,
+                Mezzio\Helper\ContentLengthMiddleware::class,
                 ErrorHandler::class,
             ],
         ],
@@ -33,14 +33,14 @@ return [
 
         'routing' => [
             'middleware' => [
-                Expressive\Router\Middleware\RouteMiddleware::class,
+                Mezzio\Router\Middleware\RouteMiddleware::class,
             ],
         ],
 
         'rest' => [
             'path' => '/rest',
             'middleware' => [
-                Expressive\Router\Middleware\ImplicitOptionsMiddleware::class,
+                Mezzio\Router\Middleware\ImplicitOptionsMiddleware::class,
                 Rest\Middleware\BodyParserMiddleware::class,
                 Rest\Middleware\AuthenticationMiddleware::class,
             ],
@@ -48,7 +48,7 @@ return [
 
         'dispatch' => [
             'middleware' => [
-                Expressive\Router\Middleware\DispatchMiddleware::class,
+                Mezzio\Router\Middleware\DispatchMiddleware::class,
             ],
         ],
 

+ 1 - 1
config/autoload/router.global.php

@@ -2,7 +2,7 @@
 
 declare(strict_types=1);
 
-use Zend\Expressive\Router\FastRouteRouter;
+use Mezzio\Router\FastRouteRouter;
 
 return [
 

+ 1 - 1
config/autoload/router.local.php.dist

@@ -1,5 +1,5 @@
 <?php
-use Zend\Expressive\Router\FastRouteRouter;
+use Mezzio\Router\FastRouteRouter;
 
 return [
 

+ 1 - 1
config/autoload/swoole.global.php

@@ -4,7 +4,7 @@ declare(strict_types=1);
 
 return [
 
-    'zend-expressive-swoole' => [
+    'mezzio-swoole' => [
         'enable_coroutine' => true,
 
         'swoole-http-server' => [

+ 3 - 3
config/autoload/swoole.local.php.dist

@@ -1,12 +1,12 @@
 <?php
 declare(strict_types=1);
 
-use Zend\Expressive\Swoole\HotCodeReload\FileWatcher\InotifyFileWatcher;
-use Zend\ServiceManager\Factory\InvokableFactory;
+use Mezzio\Swoole\HotCodeReload\FileWatcher\InotifyFileWatcher;
+use Laminas\ServiceManager\Factory\InvokableFactory;
 
 return [
 
-    'zend-expressive-swoole' => [
+    'mezzio-swoole' => [
         'hot-code-reload' => [
             'enable' => true,
         ],

+ 0 - 14
config/autoload/wkhtmltopdf.global.php

@@ -1,14 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-return [
-
-    'wkhtmltopdf' => [
-        'images' => [
-            'binary' => __DIR__ . '/../../bin/wkhtmltoimage',
-            'type' => 'jpg',
-        ],
-    ],
-
-];

+ 1 - 1
config/cli-config.php

@@ -4,8 +4,8 @@ declare(strict_types=1);
 
 use Doctrine\ORM\EntityManager;
 use Doctrine\ORM\Tools\Console\ConsoleRunner;
+use Laminas\ServiceManager\ServiceManager;
 use Psr\Container\ContainerInterface;
-use Zend\ServiceManager\ServiceManager;
 
 return (function () {
     /** @var ContainerInterface|ServiceManager $container */

+ 11 - 9
config/config.php

@@ -4,18 +4,19 @@ declare(strict_types=1);
 
 namespace Shlinkio\Shlink;
 
-use Zend\ConfigAggregator;
-use Zend\Expressive;
-use Zend\ProblemDetails;
+use Laminas\ConfigAggregator;
+use Laminas\ZendFrameworkBridge;
+use Mezzio;
+use Mezzio\ProblemDetails;
 
 use function Shlinkio\Shlink\Common\env;
 
 return (new ConfigAggregator\ConfigAggregator([
-    Expressive\ConfigProvider::class,
-    Expressive\Router\ConfigProvider::class,
-    Expressive\Router\FastRouteRouter\ConfigProvider::class,
-    Expressive\Plates\ConfigProvider::class,
-    Expressive\Swoole\ConfigProvider::class,
+    Mezzio\ConfigProvider::class,
+    Mezzio\Router\ConfigProvider::class,
+    Mezzio\Router\FastRouteRouter\ConfigProvider::class,
+    Mezzio\Plates\ConfigProvider::class,
+    Mezzio\Swoole\ConfigProvider::class,
     ProblemDetails\ConfigProvider::class,
     Common\ConfigProvider::class,
     IpGeolocation\ConfigProvider::class,
@@ -26,8 +27,9 @@ return (new ConfigAggregator\ConfigAggregator([
     new ConfigAggregator\PhpFileProvider('config/autoload/{{,*.}global,{,*.}local}.php'),
     env('APP_ENV') === 'test'
         ? new ConfigAggregator\PhpFileProvider('config/test/*.global.php')
-        : new ConfigAggregator\ZendConfigProvider('config/params/{generated_config.php,*.config.{php,json}}'),
+        : new ConfigAggregator\LaminasConfigProvider('config/params/{generated_config.php,*.config.{php,json}}'),
 ], 'data/cache/app_config.php', [
+    ZendFrameworkBridge\ConfigPostProcessor::class,
     Core\Config\SimplifiedConfigParser::class,
     Core\Config\BasePathPrefixer::class,
     Core\Config\DeprecatedConfigParser::class,

+ 1 - 1
config/container.php

@@ -2,8 +2,8 @@
 
 declare(strict_types=1);
 
+use Laminas\ServiceManager\ServiceManager;
 use Symfony\Component\Lock;
-use Zend\ServiceManager\ServiceManager;
 
 chdir(dirname(__DIR__));
 

+ 1 - 1
config/run.php

@@ -2,9 +2,9 @@
 
 declare(strict_types=1);
 
+use Mezzio\Application;
 use Psr\Container\ContainerInterface;
 use Symfony\Component\Console\Application as CliApp;
-use Zend\Expressive\Application;
 
 return function (bool $isCli = false): void {
     /** @var ContainerInterface $container */

+ 3 - 3
config/test/test_config.global.php

@@ -5,9 +5,9 @@ declare(strict_types=1);
 namespace Shlinkio\Shlink;
 
 use GuzzleHttp\Client;
+use Laminas\ConfigAggregator\ConfigAggregator;
+use Laminas\ServiceManager\Factory\InvokableFactory;
 use PDO;
-use Zend\ConfigAggregator\ConfigAggregator;
-use Zend\ServiceManager\Factory\InvokableFactory;
 
 use function Shlinkio\Shlink\Common\env;
 use function sprintf;
@@ -64,7 +64,7 @@ return [
         'validate_url' => true,
     ],
 
-    'zend-expressive-swoole' => [
+    'mezzio-swoole' => [
         'enable_coroutine' => false,
         'swoole-http-server' => [
             'host' => $swooleTestingHost,

+ 1 - 1
data/infra/examples/shlink-daemon.sh

@@ -8,7 +8,7 @@
 # Description:       Shlink non-blocking server with swoole
 ### END INIT INFO
 
-SCRIPT=/path/to/shlink/vendor/bin/zend-expressive-swoole\ start
+SCRIPT=/path/to/shlink/vendor/bin/mezzio-swoole\ start
 RUNAS=root
 
 PIDFILE=/var/run/shlink_swoole.pid

+ 1 - 1
data/infra/swoole.Dockerfile

@@ -92,4 +92,4 @@ CMD \
     if [[ ! -d "./vendor" ]]; then /usr/local/bin/composer install ; fi && \
     # When restarting the container, swoole might think it is already in execution
     # This forces the app to be started every second until the exit code is 0
-    until php ./vendor/bin/zend-expressive-swoole start; do sleep 1 ; done
+    until php ./vendor/bin/mezzio-swoole start; do sleep 1 ; done

+ 1 - 1
docker/config/shlink_in_docker.local.php

@@ -120,7 +120,7 @@ return [
         'base_path' => env('BASE_PATH', ''),
     ],
 
-    'zend-expressive-swoole' => [
+    'mezzio-swoole' => [
         'swoole-http-server' => [
             'options' => [
                 'worker_num' => (int) env('WEB_WORKER_NUM', 16),

+ 1 - 1
docker/docker-entrypoint.sh

@@ -14,4 +14,4 @@ php vendor/doctrine/orm/bin/doctrine.php orm:generate-proxies -n -q
 
 # When restarting the container, swoole might think it is already in execution
 # This forces the app to be started every second until the exit code is 0
-until php vendor/zendframework/zend-expressive-swoole/bin/zend-expressive-swoole start; do sleep 1 ; done
+until php vendor/mezzio/mezzio-swoole/bin/mezzio-swoole start; do sleep 1 ; done

+ 2 - 2
module/CLI/config/dependencies.config.php

@@ -6,6 +6,8 @@ namespace Shlinkio\Shlink\CLI;
 
 use Doctrine\DBAL\Connection;
 use GeoIp2\Database\Reader;
+use Laminas\ServiceManager\AbstractFactory\ConfigAbstractFactory;
+use Laminas\ServiceManager\Factory\InvokableFactory;
 use Shlinkio\Shlink\CLI\Util\GeolocationDbUpdater;
 use Shlinkio\Shlink\Common\Doctrine\NoDbNameConnectionFactory;
 use Shlinkio\Shlink\Core\Service;
@@ -16,8 +18,6 @@ use Shlinkio\Shlink\Rest\Service\ApiKeyService;
 use Symfony\Component\Console as SymfonyCli;
 use Symfony\Component\Lock\LockFactory;
 use Symfony\Component\Process\PhpExecutableFinder;
-use Zend\ServiceManager\AbstractFactory\ConfigAbstractFactory;
-use Zend\ServiceManager\Factory\InvokableFactory;
 
 return [
 

+ 1 - 1
module/CLI/src/Command/ShortUrl/GenerateShortUrlCommand.php

@@ -4,6 +4,7 @@ declare(strict_types=1);
 
 namespace Shlinkio\Shlink\CLI\Command\ShortUrl;
 
+use Laminas\Diactoros\Uri;
 use Shlinkio\Shlink\CLI\Util\ExitCodes;
 use Shlinkio\Shlink\Core\Exception\InvalidUrlException;
 use Shlinkio\Shlink\Core\Exception\NonUniqueSlugException;
@@ -15,7 +16,6 @@ use Symfony\Component\Console\Input\InputInterface;
 use Symfony\Component\Console\Input\InputOption;
 use Symfony\Component\Console\Output\OutputInterface;
 use Symfony\Component\Console\Style\SymfonyStyle;
-use Zend\Diactoros\Uri;
 
 use function array_map;
 use function Functional\curry;

+ 1 - 1
module/CLI/src/Command/ShortUrl/ListShortUrlsCommand.php

@@ -5,6 +5,7 @@ declare(strict_types=1);
 namespace Shlinkio\Shlink\CLI\Command\ShortUrl;
 
 use Cake\Chronos\Chronos;
+use Laminas\Paginator\Paginator;
 use Shlinkio\Shlink\CLI\Command\Util\AbstractWithDateRangeCommand;
 use Shlinkio\Shlink\CLI\Util\ExitCodes;
 use Shlinkio\Shlink\CLI\Util\ShlinkTable;
@@ -17,7 +18,6 @@ use Symfony\Component\Console\Input\InputInterface;
 use Symfony\Component\Console\Input\InputOption;
 use Symfony\Component\Console\Output\OutputInterface;
 use Symfony\Component\Console\Style\SymfonyStyle;
-use Zend\Paginator\Paginator;
 
 use function array_flip;
 use function array_intersect_key;

+ 2 - 2
module/CLI/test/Command/ShortUrl/GetVisitsCommandTest.php

@@ -5,6 +5,8 @@ declare(strict_types=1);
 namespace ShlinkioTest\Shlink\CLI\Command\ShortUrl;
 
 use Cake\Chronos\Chronos;
+use Laminas\Paginator\Adapter\ArrayAdapter;
+use Laminas\Paginator\Paginator;
 use PHPUnit\Framework\TestCase;
 use Prophecy\Argument;
 use Prophecy\Prophecy\ObjectProphecy;
@@ -19,8 +21,6 @@ use Shlinkio\Shlink\Core\Service\VisitsTrackerInterface;
 use Shlinkio\Shlink\IpGeolocation\Model\Location;
 use Symfony\Component\Console\Application;
 use Symfony\Component\Console\Tester\CommandTester;
-use Zend\Paginator\Adapter\ArrayAdapter;
-use Zend\Paginator\Paginator;
 
 use function sprintf;
 

+ 2 - 2
module/CLI/test/Command/ShortUrl/ListShortUrlsCommandTest.php

@@ -5,6 +5,8 @@ declare(strict_types=1);
 namespace ShlinkioTest\Shlink\CLI\Command\ShortUrl;
 
 use Cake\Chronos\Chronos;
+use Laminas\Paginator\Adapter\ArrayAdapter;
+use Laminas\Paginator\Paginator;
 use PHPUnit\Framework\TestCase;
 use Prophecy\Argument;
 use Prophecy\Prophecy\ObjectProphecy;
@@ -14,8 +16,6 @@ use Shlinkio\Shlink\Core\Entity\ShortUrl;
 use Shlinkio\Shlink\Core\Service\ShortUrlServiceInterface;
 use Symfony\Component\Console\Application;
 use Symfony\Component\Console\Tester\CommandTester;
-use Zend\Paginator\Adapter\ArrayAdapter;
-use Zend\Paginator\Paginator;
 
 use function explode;
 

+ 1 - 1
module/CLI/test/Factory/ApplicationFactoryTest.php

@@ -4,6 +4,7 @@ declare(strict_types=1);
 
 namespace ShlinkioTest\Shlink\CLI\Factory;
 
+use Laminas\ServiceManager\ServiceManager;
 use PHPUnit\Framework\TestCase;
 use Prophecy\Argument;
 use Prophecy\Prophecy\ObjectProphecy;
@@ -11,7 +12,6 @@ use Shlinkio\Shlink\CLI\Factory\ApplicationFactory;
 use Shlinkio\Shlink\Core\Options\AppOptions;
 use Symfony\Component\Console\Application;
 use Symfony\Component\Console\Command\Command;
-use Zend\ServiceManager\ServiceManager;
 
 class ApplicationFactoryTest extends TestCase
 {

+ 3 - 3
module/Core/config/dependencies.config.php

@@ -5,12 +5,12 @@ declare(strict_types=1);
 namespace Shlinkio\Shlink\Core;
 
 use Doctrine\Common\Cache\Cache;
+use Laminas\ServiceManager\AbstractFactory\ConfigAbstractFactory;
+use Mezzio\Router\RouterInterface;
+use Mezzio\Template\TemplateRendererInterface;
 use Psr\EventDispatcher\EventDispatcherInterface;
 use Shlinkio\Shlink\Core\ErrorHandler;
 use Shlinkio\Shlink\Core\Options\NotFoundRedirectOptions;
-use Zend\Expressive\Router\RouterInterface;
-use Zend\Expressive\Template\TemplateRendererInterface;
-use Zend\ServiceManager\AbstractFactory\ConfigAbstractFactory;
 
 return [
 

+ 1 - 1
module/Core/config/event_dispatcher.config.php

@@ -4,10 +4,10 @@ declare(strict_types=1);
 
 namespace Shlinkio\Shlink\Core;
 
+use Laminas\ServiceManager\AbstractFactory\ConfigAbstractFactory;
 use Psr\EventDispatcher\EventDispatcherInterface;
 use Shlinkio\Shlink\CLI\Util\GeolocationDbUpdater;
 use Shlinkio\Shlink\IpGeolocation\Resolver\IpLocationResolverInterface;
-use Zend\ServiceManager\AbstractFactory\ConfigAbstractFactory;
 
 return [
 

+ 1 - 1
module/Core/config/zend-expressive.config.php → module/Core/config/mezzio.config.php

@@ -4,7 +4,7 @@ declare(strict_types=1);
 
 return [
 
-    'zend-expressive' => [
+    'mezzio' => [
         'error_handler' => [
             'template_404'   => 'ShlinkCore::error/404',
             'template_error' => 'ShlinkCore::error/error',

+ 1 - 1
module/Core/src/Action/AbstractTrackingAction.php

@@ -4,6 +4,7 @@ declare(strict_types=1);
 
 namespace Shlinkio\Shlink\Core\Action;
 
+use Laminas\Diactoros\Uri;
 use Psr\Http\Message\ResponseInterface;
 use Psr\Http\Message\ServerRequestInterface;
 use Psr\Http\Server\MiddlewareInterface;
@@ -16,7 +17,6 @@ use Shlinkio\Shlink\Core\Model\Visitor;
 use Shlinkio\Shlink\Core\Options\AppOptions;
 use Shlinkio\Shlink\Core\Service\UrlShortenerInterface;
 use Shlinkio\Shlink\Core\Service\VisitsTrackerInterface;
-use Zend\Diactoros\Uri;
 
 use function array_key_exists;
 use function array_merge;

+ 2 - 2
module/Core/src/Action/QrCodeAction.php

@@ -5,6 +5,8 @@ declare(strict_types=1);
 namespace Shlinkio\Shlink\Core\Action;
 
 use Endroid\QrCode\QrCode;
+use Mezzio\Router\Exception\RuntimeException;
+use Mezzio\Router\RouterInterface;
 use Psr\Http\Message\ResponseInterface as Response;
 use Psr\Http\Message\ServerRequestInterface as Request;
 use Psr\Http\Server\MiddlewareInterface;
@@ -14,8 +16,6 @@ use Psr\Log\NullLogger;
 use Shlinkio\Shlink\Common\Response\QrCodeResponse;
 use Shlinkio\Shlink\Core\Exception\ShortUrlNotFoundException;
 use Shlinkio\Shlink\Core\Service\UrlShortenerInterface;
-use Zend\Expressive\Router\Exception\RuntimeException;
-use Zend\Expressive\Router\RouterInterface;
 
 class QrCodeAction implements MiddlewareInterface
 {

+ 1 - 1
module/Core/src/Action/RedirectAction.php

@@ -4,10 +4,10 @@ declare(strict_types=1);
 
 namespace Shlinkio\Shlink\Core\Action;
 
+use Laminas\Diactoros\Response\RedirectResponse;
 use Psr\Http\Message\ResponseInterface as Response;
 use Psr\Http\Message\ServerRequestInterface;
 use Psr\Http\Server\RequestHandlerInterface;
-use Zend\Diactoros\Response\RedirectResponse;
 
 class RedirectAction extends AbstractTrackingAction
 {

+ 3 - 3
module/Core/src/Config/SimplifiedConfigParser.php

@@ -4,8 +4,8 @@ declare(strict_types=1);
 
 namespace Shlinkio\Shlink\Core\Config;
 
+use Laminas\Stdlib\ArrayUtils;
 use Shlinkio\Shlink\Installer\Util\PathCollection;
-use Zend\Stdlib\ArrayUtils;
 
 use function array_flip;
 use function array_intersect_key;
@@ -29,8 +29,8 @@ class SimplifiedConfigParser
         'delete_short_url_threshold' => ['delete_short_urls', 'visits_threshold'],
         'redis_servers' => ['redis', 'servers'],
         'base_path' => ['router', 'base_path'],
-        'web_worker_num' => ['zend-expressive-swoole', 'swoole-http-server', 'options', 'worker_num'],
-        'task_worker_num' => ['zend-expressive-swoole', 'swoole-http-server', 'options', 'task_worker_num'],
+        'web_worker_num' => ['mezzio-swoole', 'swoole-http-server', 'options', 'worker_num'],
+        'task_worker_num' => ['mezzio-swoole', 'swoole-http-server', 'options', 'task_worker_num'],
         'visits_webhooks' => ['url_shortener', 'visits_webhooks'],
     ];
     private const SIMPLIFIED_CONFIG_SIDE_EFFECTS = [

+ 1 - 1
module/Core/src/Entity/ShortUrl.php

@@ -7,12 +7,12 @@ namespace Shlinkio\Shlink\Core\Entity;
 use Cake\Chronos\Chronos;
 use Doctrine\Common\Collections\ArrayCollection;
 use Doctrine\Common\Collections\Collection;
+use Laminas\Diactoros\Uri;
 use Shlinkio\Shlink\Common\Entity\AbstractEntity;
 use Shlinkio\Shlink\Core\Domain\Resolver\DomainResolverInterface;
 use Shlinkio\Shlink\Core\Domain\Resolver\SimpleDomainResolver;
 use Shlinkio\Shlink\Core\Exception\ShortCodeCannotBeRegeneratedException;
 use Shlinkio\Shlink\Core\Model\ShortUrlMeta;
-use Zend\Diactoros\Uri;
 
 use function array_reduce;
 use function count;

+ 2 - 2
module/Core/src/ErrorHandler/NotFoundRedirectHandler.php

@@ -4,6 +4,8 @@ declare(strict_types=1);
 
 namespace Shlinkio\Shlink\Core\ErrorHandler;
 
+use Laminas\Diactoros\Response;
+use Mezzio\Router\RouteResult;
 use Psr\Http\Message\ResponseInterface;
 use Psr\Http\Message\ServerRequestInterface;
 use Psr\Http\Message\UriInterface;
@@ -11,8 +13,6 @@ use Psr\Http\Server\MiddlewareInterface;
 use Psr\Http\Server\RequestHandlerInterface;
 use Shlinkio\Shlink\Core\Action\RedirectAction;
 use Shlinkio\Shlink\Core\Options\NotFoundRedirectOptions;
-use Zend\Diactoros\Response;
-use Zend\Expressive\Router\RouteResult;
 
 use function rtrim;
 

+ 3 - 3
module/Core/src/ErrorHandler/NotFoundTemplateHandler.php

@@ -6,12 +6,12 @@ namespace Shlinkio\Shlink\Core\ErrorHandler;
 
 use Fig\Http\Message\StatusCodeInterface;
 use InvalidArgumentException;
+use Laminas\Diactoros\Response;
+use Mezzio\Router\RouteResult;
+use Mezzio\Template\TemplateRendererInterface;
 use Psr\Http\Message\ResponseInterface;
 use Psr\Http\Message\ServerRequestInterface;
 use Psr\Http\Server\RequestHandlerInterface;
-use Zend\Diactoros\Response;
-use Zend\Expressive\Router\RouteResult;
-use Zend\Expressive\Template\TemplateRendererInterface;
 
 class NotFoundTemplateHandler implements RequestHandlerInterface
 {

+ 2 - 2
module/Core/src/Exception/DeleteShortUrlException.php

@@ -5,8 +5,8 @@ declare(strict_types=1);
 namespace Shlinkio\Shlink\Core\Exception;
 
 use Fig\Http\Message\StatusCodeInterface;
-use Zend\ProblemDetails\Exception\CommonProblemDetailsExceptionTrait;
-use Zend\ProblemDetails\Exception\ProblemDetailsExceptionInterface;
+use Mezzio\ProblemDetails\Exception\CommonProblemDetailsExceptionTrait;
+use Mezzio\ProblemDetails\Exception\ProblemDetailsExceptionInterface;
 
 use function sprintf;
 

+ 2 - 2
module/Core/src/Exception/InvalidUrlException.php

@@ -5,9 +5,9 @@ declare(strict_types=1);
 namespace Shlinkio\Shlink\Core\Exception;
 
 use Fig\Http\Message\StatusCodeInterface;
+use Mezzio\ProblemDetails\Exception\CommonProblemDetailsExceptionTrait;
+use Mezzio\ProblemDetails\Exception\ProblemDetailsExceptionInterface;
 use Throwable;
-use Zend\ProblemDetails\Exception\CommonProblemDetailsExceptionTrait;
-use Zend\ProblemDetails\Exception\ProblemDetailsExceptionInterface;
 
 use function sprintf;
 

+ 2 - 2
module/Core/src/Exception/NonUniqueSlugException.php

@@ -5,8 +5,8 @@ declare(strict_types=1);
 namespace Shlinkio\Shlink\Core\Exception;
 
 use Fig\Http\Message\StatusCodeInterface;
-use Zend\ProblemDetails\Exception\CommonProblemDetailsExceptionTrait;
-use Zend\ProblemDetails\Exception\ProblemDetailsExceptionInterface;
+use Mezzio\ProblemDetails\Exception\CommonProblemDetailsExceptionTrait;
+use Mezzio\ProblemDetails\Exception\ProblemDetailsExceptionInterface;
 
 use function sprintf;
 

+ 2 - 2
module/Core/src/Exception/ShortUrlNotFoundException.php

@@ -5,8 +5,8 @@ declare(strict_types=1);
 namespace Shlinkio\Shlink\Core\Exception;
 
 use Fig\Http\Message\StatusCodeInterface;
-use Zend\ProblemDetails\Exception\CommonProblemDetailsExceptionTrait;
-use Zend\ProblemDetails\Exception\ProblemDetailsExceptionInterface;
+use Mezzio\ProblemDetails\Exception\CommonProblemDetailsExceptionTrait;
+use Mezzio\ProblemDetails\Exception\ProblemDetailsExceptionInterface;
 
 use function sprintf;
 

+ 2 - 2
module/Core/src/Exception/TagConflictException.php

@@ -5,8 +5,8 @@ declare(strict_types=1);
 namespace Shlinkio\Shlink\Core\Exception;
 
 use Fig\Http\Message\StatusCodeInterface;
-use Zend\ProblemDetails\Exception\CommonProblemDetailsExceptionTrait;
-use Zend\ProblemDetails\Exception\ProblemDetailsExceptionInterface;
+use Mezzio\ProblemDetails\Exception\CommonProblemDetailsExceptionTrait;
+use Mezzio\ProblemDetails\Exception\ProblemDetailsExceptionInterface;
 
 use function sprintf;
 

+ 2 - 2
module/Core/src/Exception/TagNotFoundException.php

@@ -5,8 +5,8 @@ declare(strict_types=1);
 namespace Shlinkio\Shlink\Core\Exception;
 
 use Fig\Http\Message\StatusCodeInterface;
-use Zend\ProblemDetails\Exception\CommonProblemDetailsExceptionTrait;
-use Zend\ProblemDetails\Exception\ProblemDetailsExceptionInterface;
+use Mezzio\ProblemDetails\Exception\CommonProblemDetailsExceptionTrait;
+use Mezzio\ProblemDetails\Exception\ProblemDetailsExceptionInterface;
 
 use function sprintf;
 

+ 3 - 3
module/Core/src/Exception/ValidationException.php

@@ -5,10 +5,10 @@ declare(strict_types=1);
 namespace Shlinkio\Shlink\Core\Exception;
 
 use Fig\Http\Message\StatusCodeInterface;
+use Laminas\InputFilter\InputFilterInterface;
+use Mezzio\ProblemDetails\Exception\CommonProblemDetailsExceptionTrait;
+use Mezzio\ProblemDetails\Exception\ProblemDetailsExceptionInterface;
 use Throwable;
-use Zend\InputFilter\InputFilterInterface;
-use Zend\ProblemDetails\Exception\CommonProblemDetailsExceptionTrait;
-use Zend\ProblemDetails\Exception\ProblemDetailsExceptionInterface;
 
 use function array_keys;
 use function Functional\reduce_left;

+ 1 - 1
module/Core/src/Middleware/QrCodeCacheMiddleware.php

@@ -5,11 +5,11 @@ declare(strict_types=1);
 namespace Shlinkio\Shlink\Core\Middleware;
 
 use Doctrine\Common\Cache\Cache;
+use Laminas\Diactoros\Response as DiactResp;
 use Psr\Http\Message\ResponseInterface as Response;
 use Psr\Http\Message\ServerRequestInterface as Request;
 use Psr\Http\Server\MiddlewareInterface;
 use Psr\Http\Server\RequestHandlerInterface;
-use Zend\Diactoros\Response as DiactResp;
 
 class QrCodeCacheMiddleware implements MiddlewareInterface
 {

+ 1 - 1
module/Core/src/Options/AppOptions.php

@@ -4,8 +4,8 @@ declare(strict_types=1);
 
 namespace Shlinkio\Shlink\Core\Options;
 
+use Laminas\Stdlib\AbstractOptions;
 use Shlinkio\Shlink\Common\Util\StringUtilsTrait;
-use Zend\Stdlib\AbstractOptions;
 
 use function sprintf;
 

+ 1 - 1
module/Core/src/Options/DeleteShortUrlsOptions.php

@@ -4,7 +4,7 @@ declare(strict_types=1);
 
 namespace Shlinkio\Shlink\Core\Options;
 
-use Zend\Stdlib\AbstractOptions;
+use Laminas\Stdlib\AbstractOptions;
 
 class DeleteShortUrlsOptions extends AbstractOptions
 {

+ 1 - 1
module/Core/src/Options/NotFoundRedirectOptions.php

@@ -4,7 +4,7 @@ declare(strict_types=1);
 
 namespace Shlinkio\Shlink\Core\Options;
 
-use Zend\Stdlib\AbstractOptions;
+use Laminas\Stdlib\AbstractOptions;
 
 class NotFoundRedirectOptions extends AbstractOptions
 {

+ 1 - 1
module/Core/src/Options/UrlShortenerOptions.php

@@ -4,7 +4,7 @@ declare(strict_types=1);
 
 namespace Shlinkio\Shlink\Core\Options;
 
-use Zend\Stdlib\AbstractOptions;
+use Laminas\Stdlib\AbstractOptions;
 
 class UrlShortenerOptions extends AbstractOptions
 {

+ 1 - 1
module/Core/src/Paginator/Adapter/ShortUrlRepositoryAdapter.php

@@ -4,9 +4,9 @@ declare(strict_types=1);
 
 namespace Shlinkio\Shlink\Core\Paginator\Adapter;
 
+use Laminas\Paginator\Adapter\AdapterInterface;
 use Shlinkio\Shlink\Common\Util\DateRange;
 use Shlinkio\Shlink\Core\Repository\ShortUrlRepositoryInterface;
-use Zend\Paginator\Adapter\AdapterInterface;
 
 use function strip_tags;
 use function trim;

+ 1 - 1
module/Core/src/Paginator/Adapter/VisitsPaginatorAdapter.php

@@ -4,9 +4,9 @@ declare(strict_types=1);
 
 namespace Shlinkio\Shlink\Core\Paginator\Adapter;
 
+use Laminas\Paginator\Adapter\AdapterInterface;
 use Shlinkio\Shlink\Core\Model\VisitsParams;
 use Shlinkio\Shlink\Core\Repository\VisitRepositoryInterface;
-use Zend\Paginator\Adapter\AdapterInterface;
 
 class VisitsPaginatorAdapter implements AdapterInterface
 {

+ 1 - 1
module/Core/src/Service/ShortUrlService.php

@@ -5,6 +5,7 @@ declare(strict_types=1);
 namespace Shlinkio\Shlink\Core\Service;
 
 use Doctrine\ORM;
+use Laminas\Paginator\Paginator;
 use Shlinkio\Shlink\Common\Util\DateRange;
 use Shlinkio\Shlink\Core\Entity\ShortUrl;
 use Shlinkio\Shlink\Core\Exception\ShortUrlNotFoundException;
@@ -13,7 +14,6 @@ use Shlinkio\Shlink\Core\Paginator\Adapter\ShortUrlRepositoryAdapter;
 use Shlinkio\Shlink\Core\Repository\ShortUrlRepository;
 use Shlinkio\Shlink\Core\Service\ShortUrl\FindShortCodeTrait;
 use Shlinkio\Shlink\Core\Util\TagManagerTrait;
-use Zend\Paginator\Paginator;
 
 class ShortUrlService implements ShortUrlServiceInterface
 {

+ 1 - 1
module/Core/src/Service/ShortUrlServiceInterface.php

@@ -4,11 +4,11 @@ declare(strict_types=1);
 
 namespace Shlinkio\Shlink\Core\Service;
 
+use Laminas\Paginator\Paginator;
 use Shlinkio\Shlink\Common\Util\DateRange;
 use Shlinkio\Shlink\Core\Entity\ShortUrl;
 use Shlinkio\Shlink\Core\Exception\ShortUrlNotFoundException;
 use Shlinkio\Shlink\Core\Model\ShortUrlMeta;
-use Zend\Paginator\Paginator;
 
 interface ShortUrlServiceInterface
 {

+ 1 - 1
module/Core/src/Service/VisitsTracker.php

@@ -5,6 +5,7 @@ declare(strict_types=1);
 namespace Shlinkio\Shlink\Core\Service;
 
 use Doctrine\ORM;
+use Laminas\Paginator\Paginator;
 use Psr\EventDispatcher\EventDispatcherInterface;
 use Shlinkio\Shlink\Core\Entity\ShortUrl;
 use Shlinkio\Shlink\Core\Entity\Visit;
@@ -14,7 +15,6 @@ use Shlinkio\Shlink\Core\Model\Visitor;
 use Shlinkio\Shlink\Core\Model\VisitsParams;
 use Shlinkio\Shlink\Core\Paginator\Adapter\VisitsPaginatorAdapter;
 use Shlinkio\Shlink\Core\Repository\VisitRepository;
-use Zend\Paginator\Paginator;
 
 class VisitsTracker implements VisitsTrackerInterface
 {

+ 1 - 1
module/Core/src/Service/VisitsTrackerInterface.php

@@ -4,11 +4,11 @@ declare(strict_types=1);
 
 namespace Shlinkio\Shlink\Core\Service;
 
+use Laminas\Paginator\Paginator;
 use Shlinkio\Shlink\Core\Entity\Visit;
 use Shlinkio\Shlink\Core\Exception\ShortUrlNotFoundException;
 use Shlinkio\Shlink\Core\Model\Visitor;
 use Shlinkio\Shlink\Core\Model\VisitsParams;
-use Zend\Paginator\Paginator;
 
 interface VisitsTrackerInterface
 {

+ 2 - 2
module/Core/src/Validation/ShortUrlMetaInputFilter.php

@@ -5,9 +5,9 @@ declare(strict_types=1);
 namespace Shlinkio\Shlink\Core\Validation;
 
 use DateTime;
+use Laminas\InputFilter\InputFilter;
+use Laminas\Validator;
 use Shlinkio\Shlink\Common\Validation;
-use Zend\InputFilter\InputFilter;
-use Zend\Validator;
 
 class ShortUrlMetaInputFilter extends InputFilter
 {

+ 1 - 1
module/Core/test/Action/PixelActionTest.php

@@ -4,6 +4,7 @@ declare(strict_types=1);
 
 namespace ShlinkioTest\Shlink\Core\Action;
 
+use Laminas\Diactoros\ServerRequest;
 use PHPUnit\Framework\TestCase;
 use Prophecy\Argument;
 use Prophecy\Prophecy\ObjectProphecy;
@@ -14,7 +15,6 @@ use Shlinkio\Shlink\Core\Entity\ShortUrl;
 use Shlinkio\Shlink\Core\Options\AppOptions;
 use Shlinkio\Shlink\Core\Service\UrlShortener;
 use Shlinkio\Shlink\Core\Service\VisitsTracker;
-use Zend\Diactoros\ServerRequest;
 
 class PixelActionTest extends TestCase
 {

+ 3 - 3
module/Core/test/Action/QrCodeActionTest.php

@@ -4,6 +4,9 @@ declare(strict_types=1);
 
 namespace ShlinkioTest\Shlink\Core\Action;
 
+use Laminas\Diactoros\Response;
+use Laminas\Diactoros\ServerRequest;
+use Mezzio\Router\RouterInterface;
 use PHPUnit\Framework\TestCase;
 use Prophecy\Argument;
 use Prophecy\Prophecy\ObjectProphecy;
@@ -13,9 +16,6 @@ use Shlinkio\Shlink\Core\Action\QrCodeAction;
 use Shlinkio\Shlink\Core\Entity\ShortUrl;
 use Shlinkio\Shlink\Core\Exception\ShortUrlNotFoundException;
 use Shlinkio\Shlink\Core\Service\UrlShortener;
-use Zend\Diactoros\Response;
-use Zend\Diactoros\ServerRequest;
-use Zend\Expressive\Router\RouterInterface;
 
 class QrCodeActionTest extends TestCase
 {

+ 2 - 2
module/Core/test/Action/RedirectActionTest.php

@@ -4,6 +4,8 @@ declare(strict_types=1);
 
 namespace ShlinkioTest\Shlink\Core\Action;
 
+use Laminas\Diactoros\Response;
+use Laminas\Diactoros\ServerRequest;
 use PHPUnit\Framework\TestCase;
 use Prophecy\Argument;
 use Prophecy\Prophecy\ObjectProphecy;
@@ -14,8 +16,6 @@ use Shlinkio\Shlink\Core\Exception\ShortUrlNotFoundException;
 use Shlinkio\Shlink\Core\Options;
 use Shlinkio\Shlink\Core\Service\UrlShortener;
 use Shlinkio\Shlink\Core\Service\VisitsTracker;
-use Zend\Diactoros\Response;
-use Zend\Diactoros\ServerRequest;
 
 use function array_key_exists;
 

+ 1 - 1
module/Core/test/Config/SimplifiedConfigParserTest.php

@@ -112,7 +112,7 @@ class SimplifiedConfigParserTest extends TestCase
                 'invalid_short_url' => 'foobar.com',
             ],
 
-            'zend-expressive-swoole' => [
+            'mezzio-swoole' => [
                 'swoole-http-server' => [
                     'options' => [
                         'task_worker_num' => 50,

+ 1 - 1
module/Core/test/ConfigProviderTest.php

@@ -24,6 +24,6 @@ class ConfigProviderTest extends TestCase
         $this->assertArrayHasKey('routes', $config);
         $this->assertArrayHasKey('dependencies', $config);
         $this->assertArrayHasKey('templates', $config);
-        $this->assertArrayHasKey('zend-expressive', $config);
+        $this->assertArrayHasKey('mezzio', $config);
     }
 }

+ 5 - 5
module/Core/test/ErrorHandler/NotFoundRedirectHandlerTest.php

@@ -4,6 +4,11 @@ declare(strict_types=1);
 
 namespace ShlinkioTest\Shlink\Core\ErrorHandler;
 
+use Laminas\Diactoros\Response;
+use Laminas\Diactoros\ServerRequestFactory;
+use Laminas\Diactoros\Uri;
+use Mezzio\Router\Route;
+use Mezzio\Router\RouteResult;
 use PHPUnit\Framework\TestCase;
 use Psr\Http\Message\ServerRequestInterface;
 use Psr\Http\Server\MiddlewareInterface;
@@ -11,11 +16,6 @@ use Psr\Http\Server\RequestHandlerInterface;
 use Shlinkio\Shlink\Core\Action\RedirectAction;
 use Shlinkio\Shlink\Core\ErrorHandler\NotFoundRedirectHandler;
 use Shlinkio\Shlink\Core\Options\NotFoundRedirectOptions;
-use Zend\Diactoros\Response;
-use Zend\Diactoros\ServerRequestFactory;
-use Zend\Diactoros\Uri;
-use Zend\Expressive\Router\Route;
-use Zend\Expressive\Router\RouteResult;
 
 class NotFoundRedirectHandlerTest extends TestCase
 {

+ 5 - 5
module/Core/test/ErrorHandler/NotFoundTemplateHandlerTest.php

@@ -4,16 +4,16 @@ declare(strict_types=1);
 
 namespace ShlinkioTest\Shlink\Core\ErrorHandler;
 
+use Laminas\Diactoros\Response;
+use Laminas\Diactoros\ServerRequestFactory;
+use Mezzio\Router\Route;
+use Mezzio\Router\RouteResult;
+use Mezzio\Template\TemplateRendererInterface;
 use PHPUnit\Framework\TestCase;
 use Prophecy\Prophecy\ObjectProphecy;
 use Psr\Http\Message\ServerRequestInterface;
 use Psr\Http\Server\MiddlewareInterface;
 use Shlinkio\Shlink\Core\ErrorHandler\NotFoundTemplateHandler;
-use Zend\Diactoros\Response;
-use Zend\Diactoros\ServerRequestFactory;
-use Zend\Expressive\Router\Route;
-use Zend\Expressive\Router\RouteResult;
-use Zend\Expressive\Template\TemplateRendererInterface;
 
 class NotFoundTemplateHandlerTest extends TestCase
 {

+ 1 - 1
module/Core/test/Exception/ValidationExceptionTest.php

@@ -5,12 +5,12 @@ declare(strict_types=1);
 namespace ShlinkioTest\Shlink\Core\Exception;
 
 use Fig\Http\Message\StatusCodeInterface;
+use Laminas\InputFilter\InputFilterInterface;
 use LogicException;
 use PHPUnit\Framework\TestCase;
 use RuntimeException;
 use Shlinkio\Shlink\Core\Exception\ValidationException;
 use Throwable;
-use Zend\InputFilter\InputFilterInterface;
 
 use function array_keys;
 use function print_r;

+ 3 - 3
module/Core/test/Middleware/QrCodeCacheMiddlewareTest.php

@@ -6,13 +6,13 @@ namespace ShlinkioTest\Shlink\Core\Middleware;
 
 use Doctrine\Common\Cache\ArrayCache;
 use Doctrine\Common\Cache\Cache;
+use Laminas\Diactoros\Response;
+use Laminas\Diactoros\ServerRequest;
+use Laminas\Diactoros\Uri;
 use PHPUnit\Framework\TestCase;
 use Prophecy\Argument;
 use Psr\Http\Server\RequestHandlerInterface;
 use Shlinkio\Shlink\Core\Middleware\QrCodeCacheMiddleware;
-use Zend\Diactoros\Response;
-use Zend\Diactoros\ServerRequest;
-use Zend\Diactoros\Uri;
 
 class QrCodeCacheMiddlewareTest extends TestCase
 {

+ 1 - 1
module/Core/test/Service/UrlShortenerTest.php

@@ -9,6 +9,7 @@ use Doctrine\Common\Collections\ArrayCollection;
 use Doctrine\DBAL\Connection;
 use Doctrine\ORM\EntityManagerInterface;
 use Doctrine\ORM\ORMException;
+use Laminas\Diactoros\Uri;
 use PHPUnit\Framework\TestCase;
 use Prophecy\Argument;
 use Prophecy\Prophecy\ObjectProphecy;
@@ -21,7 +22,6 @@ use Shlinkio\Shlink\Core\Repository\ShortUrlRepository;
 use Shlinkio\Shlink\Core\Repository\ShortUrlRepositoryInterface;
 use Shlinkio\Shlink\Core\Service\UrlShortener;
 use Shlinkio\Shlink\Core\Util\UrlValidatorInterface;
-use Zend\Diactoros\Uri;
 
 use function array_map;
 

+ 1 - 1
module/Core/test/Service/VisitsTrackerTest.php

@@ -6,6 +6,7 @@ namespace ShlinkioTest\Shlink\Core\Service;
 
 use Doctrine\ORM\EntityManager;
 use Doctrine\ORM\EntityRepository;
+use Laminas\Stdlib\ArrayUtils;
 use PHPUnit\Framework\Assert;
 use PHPUnit\Framework\TestCase;
 use Prophecy\Argument;
@@ -19,7 +20,6 @@ use Shlinkio\Shlink\Core\Model\Visitor;
 use Shlinkio\Shlink\Core\Model\VisitsParams;
 use Shlinkio\Shlink\Core\Repository\VisitRepository;
 use Shlinkio\Shlink\Core\Service\VisitsTracker;
-use Zend\Stdlib\ArrayUtils;
 
 class VisitsTrackerTest extends TestCase
 {

+ 1 - 1
module/Core/test/Util/UrlValidatorTest.php

@@ -8,12 +8,12 @@ use Fig\Http\Message\RequestMethodInterface;
 use GuzzleHttp\ClientInterface;
 use GuzzleHttp\Exception\ClientException;
 use GuzzleHttp\RequestOptions;
+use Laminas\Diactoros\Response;
 use PHPUnit\Framework\TestCase;
 use Prophecy\Argument;
 use Prophecy\Prophecy\ObjectProphecy;
 use Shlinkio\Shlink\Core\Exception\InvalidUrlException;
 use Shlinkio\Shlink\Core\Util\UrlValidator;
-use Zend\Diactoros\Response;
 
 class UrlValidatorTest extends TestCase
 {

+ 1 - 1
module/Rest/config/auth.config.php

@@ -4,7 +4,7 @@ declare(strict_types=1);
 
 namespace Shlinkio\Shlink\Rest;
 
-use Zend\ServiceManager\AbstractFactory\ConfigAbstractFactory;
+use Laminas\ServiceManager\AbstractFactory\ConfigAbstractFactory;
 
 return [
 

+ 3 - 3
module/Rest/config/dependencies.config.php

@@ -5,13 +5,13 @@ declare(strict_types=1);
 namespace Shlinkio\Shlink\Rest;
 
 use Doctrine\DBAL\Connection;
+use Laminas\ServiceManager\AbstractFactory\ConfigAbstractFactory;
+use Laminas\ServiceManager\Factory\InvokableFactory;
+use Mezzio\Router\Middleware\ImplicitOptionsMiddleware;
 use Psr\Log\LoggerInterface;
 use Shlinkio\Shlink\Core\Options\AppOptions;
 use Shlinkio\Shlink\Core\Service;
 use Shlinkio\Shlink\Rest\Service\ApiKeyService;
-use Zend\Expressive\Router\Middleware\ImplicitOptionsMiddleware;
-use Zend\ServiceManager\AbstractFactory\ConfigAbstractFactory;
-use Zend\ServiceManager\Factory\InvokableFactory;
 
 return [
 

+ 1 - 1
module/Rest/src/Action/HealthAction.php

@@ -5,12 +5,12 @@ declare(strict_types=1);
 namespace Shlinkio\Shlink\Rest\Action;
 
 use Doctrine\DBAL\Connection;
+use Laminas\Diactoros\Response\JsonResponse;
 use Psr\Http\Message\ResponseInterface;
 use Psr\Http\Message\ServerRequestInterface;
 use Psr\Log\LoggerInterface;
 use Shlinkio\Shlink\Core\Options\AppOptions;
 use Throwable;
-use Zend\Diactoros\Response\JsonResponse;
 
 class HealthAction extends AbstractRestAction
 {

+ 1 - 1
module/Rest/src/Action/ShortUrl/AbstractCreateShortUrlAction.php

@@ -4,6 +4,7 @@ declare(strict_types=1);
 
 namespace Shlinkio\Shlink\Rest\Action\ShortUrl;
 
+use Laminas\Diactoros\Response\JsonResponse;
 use Psr\Http\Message\ResponseInterface as Response;
 use Psr\Http\Message\ServerRequestInterface as Request;
 use Psr\Log\LoggerInterface;
@@ -12,7 +13,6 @@ use Shlinkio\Shlink\Core\Model\CreateShortUrlData;
 use Shlinkio\Shlink\Core\Service\UrlShortenerInterface;
 use Shlinkio\Shlink\Core\Transformer\ShortUrlDataTransformer;
 use Shlinkio\Shlink\Rest\Action\AbstractRestAction;
-use Zend\Diactoros\Response\JsonResponse;
 
 abstract class AbstractCreateShortUrlAction extends AbstractRestAction
 {

+ 1 - 1
module/Rest/src/Action/ShortUrl/CreateShortUrlAction.php

@@ -4,11 +4,11 @@ declare(strict_types=1);
 
 namespace Shlinkio\Shlink\Rest\Action\ShortUrl;
 
+use Laminas\Diactoros\Uri;
 use Psr\Http\Message\ServerRequestInterface as Request;
 use Shlinkio\Shlink\Core\Exception\ValidationException;
 use Shlinkio\Shlink\Core\Model\CreateShortUrlData;
 use Shlinkio\Shlink\Core\Model\ShortUrlMeta;
-use Zend\Diactoros\Uri;
 
 class CreateShortUrlAction extends AbstractCreateShortUrlAction
 {

+ 1 - 1
module/Rest/src/Action/ShortUrl/DeleteShortUrlAction.php

@@ -4,12 +4,12 @@ declare(strict_types=1);
 
 namespace Shlinkio\Shlink\Rest\Action\ShortUrl;
 
+use Laminas\Diactoros\Response\EmptyResponse;
 use Psr\Http\Message\ResponseInterface;
 use Psr\Http\Message\ServerRequestInterface;
 use Psr\Log\LoggerInterface;
 use Shlinkio\Shlink\Core\Service\ShortUrl\DeleteShortUrlServiceInterface;
 use Shlinkio\Shlink\Rest\Action\AbstractRestAction;
-use Zend\Diactoros\Response\EmptyResponse;
 
 class DeleteShortUrlAction extends AbstractRestAction
 {

+ 1 - 1
module/Rest/src/Action/ShortUrl/EditShortUrlAction.php

@@ -4,13 +4,13 @@ declare(strict_types=1);
 
 namespace Shlinkio\Shlink\Rest\Action\ShortUrl;
 
+use Laminas\Diactoros\Response\EmptyResponse;
 use Psr\Http\Message\ResponseInterface;
 use Psr\Http\Message\ServerRequestInterface;
 use Psr\Log\LoggerInterface;
 use Shlinkio\Shlink\Core\Model\ShortUrlMeta;
 use Shlinkio\Shlink\Core\Service\ShortUrlServiceInterface;
 use Shlinkio\Shlink\Rest\Action\AbstractRestAction;
-use Zend\Diactoros\Response\EmptyResponse;
 
 class EditShortUrlAction extends AbstractRestAction
 {

+ 1 - 1
module/Rest/src/Action/ShortUrl/EditShortUrlTagsAction.php

@@ -4,13 +4,13 @@ declare(strict_types=1);
 
 namespace Shlinkio\Shlink\Rest\Action\ShortUrl;
 
+use Laminas\Diactoros\Response\JsonResponse;
 use Psr\Http\Message\ResponseInterface as Response;
 use Psr\Http\Message\ServerRequestInterface as Request;
 use Psr\Log\LoggerInterface;
 use Shlinkio\Shlink\Core\Exception\ValidationException;
 use Shlinkio\Shlink\Core\Service\ShortUrlServiceInterface;
 use Shlinkio\Shlink\Rest\Action\AbstractRestAction;
-use Zend\Diactoros\Response\JsonResponse;
 
 class EditShortUrlTagsAction extends AbstractRestAction
 {

+ 1 - 1
module/Rest/src/Action/ShortUrl/ListShortUrlsAction.php

@@ -6,6 +6,7 @@ namespace Shlinkio\Shlink\Rest\Action\ShortUrl;
 
 use Cake\Chronos\Chronos;
 use InvalidArgumentException;
+use Laminas\Diactoros\Response\JsonResponse;
 use Psr\Http\Message\ResponseInterface as Response;
 use Psr\Http\Message\ServerRequestInterface as Request;
 use Psr\Log\LoggerInterface;
@@ -14,7 +15,6 @@ use Shlinkio\Shlink\Common\Util\DateRange;
 use Shlinkio\Shlink\Core\Service\ShortUrlServiceInterface;
 use Shlinkio\Shlink\Core\Transformer\ShortUrlDataTransformer;
 use Shlinkio\Shlink\Rest\Action\AbstractRestAction;
-use Zend\Diactoros\Response\JsonResponse;
 
 class ListShortUrlsAction extends AbstractRestAction
 {

+ 1 - 1
module/Rest/src/Action/ShortUrl/ResolveShortUrlAction.php

@@ -5,13 +5,13 @@ declare(strict_types=1);
 namespace Shlinkio\Shlink\Rest\Action\ShortUrl;
 
 use InvalidArgumentException;
+use Laminas\Diactoros\Response\JsonResponse;
 use Psr\Http\Message\ResponseInterface as Response;
 use Psr\Http\Message\ServerRequestInterface as Request;
 use Psr\Log\LoggerInterface;
 use Shlinkio\Shlink\Core\Service\UrlShortenerInterface;
 use Shlinkio\Shlink\Core\Transformer\ShortUrlDataTransformer;
 use Shlinkio\Shlink\Rest\Action\AbstractRestAction;
-use Zend\Diactoros\Response\JsonResponse;
 
 class ResolveShortUrlAction extends AbstractRestAction
 {

+ 1 - 1
module/Rest/src/Action/ShortUrl/SingleStepCreateShortUrlAction.php

@@ -4,13 +4,13 @@ declare(strict_types=1);
 
 namespace Shlinkio\Shlink\Rest\Action\ShortUrl;
 
+use Laminas\Diactoros\Uri;
 use Psr\Http\Message\ServerRequestInterface as Request;
 use Psr\Log\LoggerInterface;
 use Shlinkio\Shlink\Core\Exception\ValidationException;
 use Shlinkio\Shlink\Core\Model\CreateShortUrlData;
 use Shlinkio\Shlink\Core\Service\UrlShortenerInterface;
 use Shlinkio\Shlink\Rest\Service\ApiKeyServiceInterface;
-use Zend\Diactoros\Uri;
 
 class SingleStepCreateShortUrlAction extends AbstractCreateShortUrlAction
 {

+ 1 - 1
module/Rest/src/Action/Tag/CreateTagsAction.php

@@ -4,12 +4,12 @@ declare(strict_types=1);
 
 namespace Shlinkio\Shlink\Rest\Action\Tag;
 
+use Laminas\Diactoros\Response\JsonResponse;
 use Psr\Http\Message\ResponseInterface;
 use Psr\Http\Message\ServerRequestInterface;
 use Psr\Log\LoggerInterface;
 use Shlinkio\Shlink\Core\Service\Tag\TagServiceInterface;
 use Shlinkio\Shlink\Rest\Action\AbstractRestAction;
-use Zend\Diactoros\Response\JsonResponse;
 
 class CreateTagsAction extends AbstractRestAction
 {

+ 1 - 1
module/Rest/src/Action/Tag/DeleteTagsAction.php

@@ -4,12 +4,12 @@ declare(strict_types=1);
 
 namespace Shlinkio\Shlink\Rest\Action\Tag;
 
+use Laminas\Diactoros\Response\EmptyResponse;
 use Psr\Http\Message\ResponseInterface;
 use Psr\Http\Message\ServerRequestInterface;
 use Psr\Log\LoggerInterface;
 use Shlinkio\Shlink\Core\Service\Tag\TagServiceInterface;
 use Shlinkio\Shlink\Rest\Action\AbstractRestAction;
-use Zend\Diactoros\Response\EmptyResponse;
 
 class DeleteTagsAction extends AbstractRestAction
 {

+ 1 - 1
module/Rest/src/Action/Tag/ListTagsAction.php

@@ -4,12 +4,12 @@ declare(strict_types=1);
 
 namespace Shlinkio\Shlink\Rest\Action\Tag;
 
+use Laminas\Diactoros\Response\JsonResponse;
 use Psr\Http\Message\ResponseInterface;
 use Psr\Http\Message\ServerRequestInterface;
 use Psr\Log\LoggerInterface;
 use Shlinkio\Shlink\Core\Service\Tag\TagServiceInterface;
 use Shlinkio\Shlink\Rest\Action\AbstractRestAction;
-use Zend\Diactoros\Response\JsonResponse;
 
 class ListTagsAction extends AbstractRestAction
 {

+ 1 - 1
module/Rest/src/Action/Tag/UpdateTagAction.php

@@ -4,13 +4,13 @@ declare(strict_types=1);
 
 namespace Shlinkio\Shlink\Rest\Action\Tag;
 
+use Laminas\Diactoros\Response\EmptyResponse;
 use Psr\Http\Message\ResponseInterface;
 use Psr\Http\Message\ServerRequestInterface;
 use Psr\Log\LoggerInterface;
 use Shlinkio\Shlink\Core\Exception\ValidationException;
 use Shlinkio\Shlink\Core\Service\Tag\TagServiceInterface;
 use Shlinkio\Shlink\Rest\Action\AbstractRestAction;
-use Zend\Diactoros\Response\EmptyResponse;
 
 class UpdateTagAction extends AbstractRestAction
 {

+ 1 - 1
module/Rest/src/Action/Visit/GetVisitsAction.php

@@ -4,6 +4,7 @@ declare(strict_types=1);
 
 namespace Shlinkio\Shlink\Rest\Action\Visit;
 
+use Laminas\Diactoros\Response\JsonResponse;
 use Psr\Http\Message\ResponseInterface as Response;
 use Psr\Http\Message\ServerRequestInterface as Request;
 use Psr\Log\LoggerInterface;
@@ -11,7 +12,6 @@ use Shlinkio\Shlink\Common\Paginator\Util\PaginatorUtilsTrait;
 use Shlinkio\Shlink\Core\Model\VisitsParams;
 use Shlinkio\Shlink\Core\Service\VisitsTrackerInterface;
 use Shlinkio\Shlink\Rest\Action\AbstractRestAction;
-use Zend\Diactoros\Response\JsonResponse;
 
 class GetVisitsAction extends AbstractRestAction
 {

+ 1 - 1
module/Rest/src/Authentication/AuthenticationPluginManager.php

@@ -4,7 +4,7 @@ declare(strict_types=1);
 
 namespace Shlinkio\Shlink\Rest\Authentication;
 
-use Zend\ServiceManager\AbstractPluginManager;
+use Laminas\ServiceManager\AbstractPluginManager;
 
 class AuthenticationPluginManager extends AbstractPluginManager implements AuthenticationPluginManagerInterface
 {

+ 2 - 2
module/Rest/src/Exception/MissingAuthenticationException.php

@@ -5,8 +5,8 @@ declare(strict_types=1);
 namespace Shlinkio\Shlink\Rest\Exception;
 
 use Fig\Http\Message\StatusCodeInterface;
-use Zend\ProblemDetails\Exception\CommonProblemDetailsExceptionTrait;
-use Zend\ProblemDetails\Exception\ProblemDetailsExceptionInterface;
+use Mezzio\ProblemDetails\Exception\CommonProblemDetailsExceptionTrait;
+use Mezzio\ProblemDetails\Exception\ProblemDetailsExceptionInterface;
 
 use function implode;
 use function sprintf;

+ 2 - 2
module/Rest/src/Exception/VerifyAuthenticationException.php

@@ -5,8 +5,8 @@ declare(strict_types=1);
 namespace Shlinkio\Shlink\Rest\Exception;
 
 use Fig\Http\Message\StatusCodeInterface;
-use Zend\ProblemDetails\Exception\CommonProblemDetailsExceptionTrait;
-use Zend\ProblemDetails\Exception\ProblemDetailsExceptionInterface;
+use Mezzio\ProblemDetails\Exception\CommonProblemDetailsExceptionTrait;
+use Mezzio\ProblemDetails\Exception\ProblemDetailsExceptionInterface;
 
 class VerifyAuthenticationException extends RuntimeException implements ProblemDetailsExceptionInterface
 {

+ 1 - 1
module/Rest/src/Middleware/AuthenticationMiddleware.php

@@ -6,12 +6,12 @@ namespace Shlinkio\Shlink\Rest\Middleware;
 
 use Fig\Http\Message\RequestMethodInterface;
 use Fig\Http\Message\StatusCodeInterface;
+use Mezzio\Router\RouteResult;
 use Psr\Http\Message\ResponseInterface as Response;
 use Psr\Http\Message\ServerRequestInterface as Request;
 use Psr\Http\Server\MiddlewareInterface;
 use Psr\Http\Server\RequestHandlerInterface;
 use Shlinkio\Shlink\Rest\Authentication\RequestToHttpAuthPluginInterface;
-use Zend\Expressive\Router\RouteResult;
 
 use function Functional\contains;
 

+ 1 - 1
module/Rest/src/Middleware/CrossDomainMiddleware.php

@@ -5,12 +5,12 @@ declare(strict_types=1);
 namespace Shlinkio\Shlink\Rest\Middleware;
 
 use Fig\Http\Message\RequestMethodInterface;
+use Mezzio\Router\RouteResult;
 use Psr\Http\Message\ResponseInterface;
 use Psr\Http\Message\ServerRequestInterface;
 use Psr\Http\Server\MiddlewareInterface;
 use Psr\Http\Server\RequestHandlerInterface;
 use Shlinkio\Shlink\Rest\Authentication;
-use Zend\Expressive\Router\RouteResult;
 
 use function implode;
 

+ 2 - 2
module/Rest/src/Middleware/EmptyResponseImplicitOptionsMiddlewareFactory.php

@@ -4,8 +4,8 @@ declare(strict_types=1);
 
 namespace Shlinkio\Shlink\Rest\Middleware;
 
-use Zend\Diactoros\Response\EmptyResponse;
-use Zend\Expressive\Router\Middleware\ImplicitOptionsMiddleware;
+use Laminas\Diactoros\Response\EmptyResponse;
+use Mezzio\Router\Middleware\ImplicitOptionsMiddleware;
 
 class EmptyResponseImplicitOptionsMiddlewareFactory
 {

+ 2 - 2
module/Rest/src/Middleware/ShortUrl/CreateShortUrlContentNegotiationMiddleware.php

@@ -4,12 +4,12 @@ declare(strict_types=1);
 
 namespace Shlinkio\Shlink\Rest\Middleware\ShortUrl;
 
+use Laminas\Diactoros\Response;
+use Laminas\Diactoros\Response\JsonResponse;
 use Psr\Http\Message\ResponseInterface;
 use Psr\Http\Message\ServerRequestInterface;
 use Psr\Http\Server\MiddlewareInterface;
 use Psr\Http\Server\RequestHandlerInterface;
-use Zend\Diactoros\Response;
-use Zend\Diactoros\Response\JsonResponse;
 
 use function array_shift;
 use function explode;

+ 2 - 2
module/Rest/test/Action/HealthActionTest.php

@@ -6,12 +6,12 @@ namespace ShlinkioTest\Shlink\Rest\Action;
 
 use Doctrine\DBAL\Connection;
 use Exception;
+use Laminas\Diactoros\Response\JsonResponse;
+use Laminas\Diactoros\ServerRequest;
 use PHPUnit\Framework\TestCase;
 use Prophecy\Prophecy\ObjectProphecy;
 use Shlinkio\Shlink\Core\Options\AppOptions;
 use Shlinkio\Shlink\Rest\Action\HealthAction;
-use Zend\Diactoros\Response\JsonResponse;
-use Zend\Diactoros\ServerRequest;
 
 class HealthActionTest extends TestCase
 {

+ 3 - 3
module/Rest/test/Action/ShortUrl/CreateShortUrlActionTest.php

@@ -5,6 +5,9 @@ declare(strict_types=1);
 namespace ShlinkioTest\Shlink\Rest\Action\ShortUrl;
 
 use Cake\Chronos\Chronos;
+use Laminas\Diactoros\ServerRequest;
+use Laminas\Diactoros\ServerRequestFactory;
+use Laminas\Diactoros\Uri;
 use PHPUnit\Framework\TestCase;
 use Prophecy\Argument;
 use Prophecy\Prophecy\ObjectProphecy;
@@ -13,9 +16,6 @@ use Shlinkio\Shlink\Core\Exception\ValidationException;
 use Shlinkio\Shlink\Core\Model\ShortUrlMeta;
 use Shlinkio\Shlink\Core\Service\UrlShortener;
 use Shlinkio\Shlink\Rest\Action\ShortUrl\CreateShortUrlAction;
-use Zend\Diactoros\ServerRequest;
-use Zend\Diactoros\ServerRequestFactory;
-use Zend\Diactoros\Uri;
 
 use function strpos;
 

+ 1 - 1
module/Rest/test/Action/ShortUrl/DeleteShortUrlActionTest.php

@@ -4,12 +4,12 @@ declare(strict_types=1);
 
 namespace ShlinkioTest\Shlink\Rest\Action\ShortUrl;
 
+use Laminas\Diactoros\ServerRequest;
 use PHPUnit\Framework\TestCase;
 use Prophecy\Argument;
 use Prophecy\Prophecy\ObjectProphecy;
 use Shlinkio\Shlink\Core\Service\ShortUrl\DeleteShortUrlServiceInterface;
 use Shlinkio\Shlink\Rest\Action\ShortUrl\DeleteShortUrlAction;
-use Zend\Diactoros\ServerRequest;
 
 class DeleteShortUrlActionTest extends TestCase
 {

+ 1 - 1
module/Rest/test/Action/ShortUrl/EditShortUrlActionTest.php

@@ -4,6 +4,7 @@ declare(strict_types=1);
 
 namespace ShlinkioTest\Shlink\Rest\Action\ShortUrl;
 
+use Laminas\Diactoros\ServerRequest;
 use PHPUnit\Framework\TestCase;
 use Prophecy\Argument;
 use Prophecy\Prophecy\ObjectProphecy;
@@ -11,7 +12,6 @@ use Shlinkio\Shlink\Core\Entity\ShortUrl;
 use Shlinkio\Shlink\Core\Exception\ValidationException;
 use Shlinkio\Shlink\Core\Service\ShortUrlServiceInterface;
 use Shlinkio\Shlink\Rest\Action\ShortUrl\EditShortUrlAction;
-use Zend\Diactoros\ServerRequest;
 
 class EditShortUrlActionTest extends TestCase
 {

Some files were not shown because too many files changed in this diff