Repository navigation
build: make the S3, SFTP and WebDAV drivers optional packages - #4
Merged
Merged
Conversation
Only the local folder driver is needed by every installation, yet the AWS SDK (77 MB), phpseclib and sabre/dav were installed on every site. Their adapters move from require to suggest, like the other drivers; Driver::available() already reports a missing one with its install command. "conflict" keeps the minimum versions when they are installed (SFTP <3.36 would break host-key pinning). league/flysystem-local, which the local driver needs and only the core's dependencies happened to bring, is now required. The builds keep these drivers: ci/plugin.env PLUGIN_EXTRAS is installed next to the plugin (tests, demo, zip, images; empty builds the bare plugin) and the smoke test checks it. amount:demo --s3 skips with the install command when S3 is missing. Upgrading sites lose the three drivers on composer update unless they install them; the README says so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #3, which sets the SFTP
^3.36minimum thatconflicttakes over here. Merge #3 first; GitHub then retargets this PR tomain.Only the local folder driver is needed by every installation, yet every site installed the AWS SDK (77 MB), phpseclib (3.2 MB) and sabre/dav (3.5 MB). Their Flysystem adapters were referenced only inside their own drivers, and
Driver::available()already reports a missing package with its install command, so they move fromrequiretosuggest, like the other drivers.composer.json
requirekeeps onlyleague/flysystem, which the core services use outside the drivers, and gainsleague/flysystem-local. The local driver needs it, but until now only the core's own dependencies happened to bring it in.suggest:league/flysystem-aws-s3-v3,league/flysystem-sftp-v3,league/flysystem-webdav.conflictkeeps the minimum versions when these packages are installed: S3<3.10, SFTP<3.36, WebDAV<3.6. Below 3.36, SFTP accepts neither several pinned keys nor theSHA256:form.Builds keep the three drivers
PLUGIN_EXTRASinci/plugin.envis installed next to the plugin bycompose-evo.sh, so the unit suite, the demo stack and the published zip and images still ship S3, SFTP and WebDAV. SettingPLUGIN_EXTRAS=builds the bare plugin. Both scripts are changed generically, with an empty default, so they can still be copied to the other plugin repositories.smoke.shchecks that the extras are present.amount:demo --s3skips with the install command when S3 is missing, instead of failing.Upgrade note (breaking for existing sites)
On
composer update, Composer removes the three packages if nothing else requires them. Mounts using them then report the install command instead of connecting. The README says how to install them, with onepackage:installrequirecall per package, because the command takes a single package.Tests
PackagesTest: it fails if any of the following drifts:requireholding more than flysystem and flysystem-local;conflictminimums;PLUGIN_EXTRASversussuggest.PLUGIN_EXTRAS=,--install): noaws,sabreorphpseclibin vendor. Migrations, tables and permissions are in place, and the site answers 200.amount:driverslists S3, SFTP and WebDAV as missing, with their install commands.🤖 Generated with Claude Code