Deprecated validateUrl option on short URL creation/edition

This commit is contained in:
Alejandro Celaya
2023-01-23 20:30:12 +01:00
parent 06583a0bc1
commit 4ee0032c2a
12 changed files with 23 additions and 7 deletions

View File

@@ -22,6 +22,7 @@ use function trim;
use const Shlinkio\Shlink\TITLE_TAG_VALUE;
/** @deprecated */
class UrlValidator implements UrlValidatorInterface, RequestMethodInterface
{
private const MAX_REDIRECTS = 15;
@@ -33,6 +34,7 @@ class UrlValidator implements UrlValidatorInterface, RequestMethodInterface
}
/**
* @deprecated
* @throws InvalidUrlException
*/
public function validateUrl(string $url, bool $doValidate): void
@@ -44,6 +46,10 @@ class UrlValidator implements UrlValidatorInterface, RequestMethodInterface
$this->validateUrlAndGetResponse($url);
}
/**
* @deprecated
* @throws InvalidUrlException
*/
public function validateUrlWithTitle(string $url, bool $doValidate): ?string
{
if (! $doValidate && ! $this->options->autoResolveTitles) {

View File

@@ -6,14 +6,17 @@ namespace Shlinkio\Shlink\Core\Util;
use Shlinkio\Shlink\Core\Exception\InvalidUrlException;
/** @deprecated */
interface UrlValidatorInterface
{
/**
* @deprecated
* @throws InvalidUrlException
*/
public function validateUrl(string $url, bool $doValidate): void;
/**
* @deprecated
* @throws InvalidUrlException
*/
public function validateUrlWithTitle(string $url, bool $doValidate): ?string;