From 256bd53557f737fcb47e4871239451f84ff27d69 Mon Sep 17 00:00:00 2001 From: Garion Herman Date: Thu, 8 Oct 2020 14:14:11 +1300 Subject: [PATCH 1/2] DEP Remove unused league/flysystem requirement This has been shifted to silverstripe/assets instead. --- composer.json | 1 - src/View/Shortcodes/EmbedShortcodeProvider.php | 1 - 2 files changed, 2 deletions(-) diff --git a/composer.json b/composer.json index 746624526..f3ceb9894 100644 --- a/composer.json +++ b/composer.json @@ -26,7 +26,6 @@ "composer/installers": "~1.0", "embed/embed": "^3.0", "league/csv": "^8 || ^9", - "league/flysystem": "~1.0.12", "m1/env": "^2.1", "monolog/monolog": "~1.16", "nikic/php-parser": "^3 || ^4", diff --git a/src/View/Shortcodes/EmbedShortcodeProvider.php b/src/View/Shortcodes/EmbedShortcodeProvider.php index 8f1cf1929..031538b31 100644 --- a/src/View/Shortcodes/EmbedShortcodeProvider.php +++ b/src/View/Shortcodes/EmbedShortcodeProvider.php @@ -3,7 +3,6 @@ namespace SilverStripe\View\Shortcodes; use Embed\Http\DispatcherInterface; -use League\Flysystem\Exception; use Psr\SimpleCache\CacheInterface; use Psr\SimpleCache\InvalidArgumentException; use SilverStripe\Core\Convert; From 79a03b2b0532839970c0cfa6026279c74bf28108 Mon Sep 17 00:00:00 2001 From: Garion Herman Date: Tue, 13 Oct 2020 12:23:44 +1300 Subject: [PATCH 2/2] DOC Add upgrade note about Flysystem dependency shift --- docs/en/04_Changelogs/4.7.0.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/en/04_Changelogs/4.7.0.md b/docs/en/04_Changelogs/4.7.0.md index dc481f208..050180cc7 100644 --- a/docs/en/04_Changelogs/4.7.0.md +++ b/docs/en/04_Changelogs/4.7.0.md @@ -5,6 +5,7 @@ - [Experimental support for PHP 8](#experimental-support-for-php-8) - [Support for Symfony 4 Components](#support-for-symfony-4-components) - [Default MySQL collation updated](#default-mysql-collation-updated) +- [Flysystem dependency shifted](#flysystem-dependency-shifted) ## New features @@ -57,3 +58,17 @@ exceeding the maximum indexable size: You can rectify this by upgrading MySQL, enabling the `innodb_large_prefix` setting if present, or reducing the size of affected fields. If none of these solutions are currently suitable, you can remove the new collation configuration to default back to the previous default collation. + +### Flysystem dependency shifted + +Previously the Flysystem package was pulled in via the `silverstripe/framework` module, but only +used in the `silverstripe/assets` module. To make this dependency clearer, it has been added to +the `silverstripe/assets` module and removed from `silverstripe/framework`. Most developers should +not notice any issues, but if you depend on Flysystem in your own project code, you should ensure +that you have it specified in your `composer.json`. + +An edgecase exists where a project can update to `silverstripe/framework 4.7.0` but remain on +`silverstripe/assets 1.6.x`, and lose the Flysystem dependency entirely. The best way to avoid this +is by ensuring you update all core modules to the new minor release at once, ideally through a core +recipe like `silverstripe/recipe-core`. +