mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-10 01:03:13 +08:00
Deprecated validateUrl option on short URL creation/edition
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user