From fda3b9da8c799318606a47eb10a77d75a539a77b Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Wed, 16 Oct 2024 10:40:48 +1300 Subject: [PATCH] API Add deprecation --- src/Storage/DBFile.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Storage/DBFile.php b/src/Storage/DBFile.php index d75e61ec..1a2802d3 100644 --- a/src/Storage/DBFile.php +++ b/src/Storage/DBFile.php @@ -7,6 +7,7 @@ use SilverStripe\Assets\Thumbnail; use SilverStripe\Control\Director; use SilverStripe\Core\Injector\Injector; +use SilverStripe\Dev\Deprecation; use SilverStripe\ORM\FieldType\DBComposite; use SilverStripe\ORM\ValidationException; use SilverStripe\ORM\ValidationResult; @@ -510,9 +511,13 @@ protected function assertFilenameValid($filename) * @param ValidationResult $result * @param string $filename Optional filename to validate. If omitted, the current value is validated. * @return bool Valid flag + * @deprecated 2.4.0 Will be renamed to validateFilename() */ public function validate(ValidationResult $result, $filename = null) { + Deprecation::withSuppressedNotice(function () { + Deprecation::notice('2.4.0', 'Will be renamed to validateFilename()'); + }); if (empty($filename)) { $filename = $this->getFilename(); }