Skip to content

Commit

Permalink
API Add deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Oct 15, 2024
1 parent 6b6fcbc commit fda3b9d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Storage/DBFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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();
}
Expand Down

0 comments on commit fda3b9d

Please sign in to comment.