Moved check for URL validation config option to the UrlValidator itself

This commit is contained in:
Alejandro Celaya
2020-03-22 16:58:28 +01:00
parent d29ebb706e
commit 682a0768b7
5 changed files with 34 additions and 43 deletions

View File

@@ -51,7 +51,7 @@ return [
Options\NotFoundRedirectOptions::class => ['config.not_found_redirects'],
Options\UrlShortenerOptions::class => ['config.url_shortener'],
Service\UrlShortener::class => [Util\UrlValidator::class, 'em', Options\UrlShortenerOptions::class],
Service\UrlShortener::class => [Util\UrlValidator::class, 'em'],
Service\VisitsTracker::class => ['em', EventDispatcherInterface::class],
Service\ShortUrlService::class => ['em', Service\ShortUrl\ShortUrlResolver::class],
Service\VisitService::class => ['em'],
@@ -63,7 +63,7 @@ return [
],
Service\ShortUrl\ShortUrlResolver::class => ['em'],
Util\UrlValidator::class => ['httpClient'],
Util\UrlValidator::class => ['httpClient', Options\UrlShortenerOptions::class],
Action\RedirectAction::class => [
Service\ShortUrl\ShortUrlResolver::class,