From 38bee115edc6de2a0538ff2297fd25625f17ec3e Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Fri, 6 Dec 2024 12:13:14 +1300 Subject: [PATCH 1/2] DEP Update minimum composer versions --- composer.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 3b3b0e64..5b01747a 100644 --- a/composer.json +++ b/composer.json @@ -24,9 +24,9 @@ "silverstripe/template-engine": "^1", "silverstripe/vendor-plugin": "^2", "symfony/filesystem": "^7.0", - "intervention/image": "^3.7", - "league/flysystem": "^3.22", - "league/flysystem-local": "^3.22" + "intervention/image": "^3.9", + "league/flysystem": "^3.29", + "league/flysystem-local": "^3.29" }, "require-dev": { "silverstripe/recipe-testing": "^4", From 8ae974dc0f9e4aaf065821d99a394aceb6225292 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli <36352093+GuySartorelli@users.noreply.github.com> Date: Thu, 12 Dec 2024 17:28:11 +1300 Subject: [PATCH 2/2] API Update code to reflect changes in silverstripe/cms (#667) --- src/File.php | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/src/File.php b/src/File.php index f899aee1..1d14ea23 100644 --- a/src/File.php +++ b/src/File.php @@ -31,6 +31,7 @@ use SilverStripe\Security\InheritedPermissionsExtension; use SilverStripe\Security\Member; use SilverStripe\Security\Permission; +use SilverStripe\Security\PermissionCheckable; use SilverStripe\Security\PermissionChecker; use SilverStripe\Security\PermissionProvider; use SilverStripe\Security\Security; @@ -99,7 +100,7 @@ * @method Member Owner() * @method File Parent() */ -class File extends DataObject implements AssetContainer, Thumbnail, CMSPreviewable, PermissionProvider, Resettable +class File extends DataObject implements AssetContainer, Thumbnail, CMSPreviewable, PermissionProvider, Resettable, PermissionCheckable { use ImageManipulation; @@ -351,14 +352,6 @@ public function AbsoluteLink() return $this->getAbsoluteURL(); } - /** - * @return string - */ - public function getTreeTitle() - { - return Convert::raw2xml($this->Title); - } - /** * @param Member $member * @return bool @@ -1435,10 +1428,7 @@ public function PreviewLink($action = null) return $link; } - /** - * @return PermissionChecker - */ - public function getPermissionChecker() + public function getPermissionChecker(): PermissionChecker { return Injector::inst()->get(PermissionChecker::class.'.file'); } @@ -1518,13 +1508,12 @@ protected function filterFilename($name) }, $parts ?? [])); } - public function flushCache($persistent = true): static + public function flushCache(bool $persistent = true): static { - parent::flushCache($persistent); static::reset(); ImageShortcodeProvider::flush(); FileShortcodeProvider::flush(); - return $this; + return parent::flushCache($persistent); } public static function reset()