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:
@@ -14,6 +14,8 @@ class ShortUrlTitleResolutionHelper implements ShortUrlTitleResolutionHelperInte
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated TODO Rename to processTitle once URL validation is removed with Shlink 4.0.0
|
||||
* Move relevant logic from URL validator here.
|
||||
* @template T of TitleResolutionModelInterface
|
||||
* @param T $data
|
||||
* @return T
|
||||
|
||||
@@ -9,6 +9,7 @@ use Shlinkio\Shlink\Core\Exception\InvalidUrlException;
|
||||
interface ShortUrlTitleResolutionHelperInterface
|
||||
{
|
||||
/**
|
||||
* @deprecated TODO Rename to processTitle once URL validation is removed with Shlink 4.0.0
|
||||
* @template T of TitleResolutionModelInterface
|
||||
* @param T $data
|
||||
* @return T
|
||||
|
||||
@@ -10,6 +10,7 @@ interface TitleResolutionModelInterface
|
||||
|
||||
public function getLongUrl(): string;
|
||||
|
||||
/** @deprecated */
|
||||
public function doValidateUrl(): bool;
|
||||
|
||||
public function withResolvedTitle(string $title): static;
|
||||
|
||||
@@ -33,6 +33,7 @@ final class ShortUrlCreation implements TitleResolutionModelInterface
|
||||
public readonly bool $findIfExists = false,
|
||||
public readonly ?string $domain = null,
|
||||
public readonly int $shortCodeLength = 5,
|
||||
/** @deprecated */
|
||||
public readonly bool $validateUrl = false,
|
||||
public readonly ?ApiKey $apiKey = null,
|
||||
public readonly array $tags = [],
|
||||
@@ -131,6 +132,7 @@ final class ShortUrlCreation implements TitleResolutionModelInterface
|
||||
return $this->domain !== null;
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
public function doValidateUrl(): bool
|
||||
{
|
||||
return $this->validateUrl;
|
||||
|
||||
@@ -38,6 +38,7 @@ final class ShortUrlEdition implements TitleResolutionModelInterface
|
||||
private readonly bool $titlePropWasProvided = false,
|
||||
public readonly ?string $title = null,
|
||||
public readonly bool $titleWasAutoResolved = false,
|
||||
/** @deprecated */
|
||||
public readonly bool $validateUrl = false,
|
||||
private readonly bool $crawlablePropWasProvided = false,
|
||||
public readonly bool $crawlable = false,
|
||||
@@ -154,6 +155,7 @@ final class ShortUrlEdition implements TitleResolutionModelInterface
|
||||
return $this->titleWasAutoResolved;
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
public function doValidateUrl(): bool
|
||||
{
|
||||
return $this->validateUrl;
|
||||
|
||||
@@ -32,6 +32,7 @@ class ShortUrlInputFilter extends InputFilter
|
||||
public const SHORT_CODE_LENGTH = 'shortCodeLength';
|
||||
public const LONG_URL = 'longUrl';
|
||||
public const DEVICE_LONG_URLS = 'deviceLongUrls';
|
||||
/** @deprecated */
|
||||
public const VALIDATE_URL = 'validateUrl';
|
||||
public const API_KEY = 'apiKey';
|
||||
public const TAGS = 'tags';
|
||||
|
||||
Reference in New Issue
Block a user