Repository navigation
Install a missing storage driver from the manager or artisan - #5
Merged
Merged
Conversation
Administrators get an Install button next to a missing driver. The page queues an `amount.driver_install` system task through the core's SystemTaskService (its permission, super-administrator gate, exclusive lock and scheduler checks); system:task-worker runs it with the core's ConsoleInstallFlowService, so Composer never runs in a web request and a failed install is rolled back. Requests name a driver, never a package. `amount:drivers --install=s3,sftp,webdav` installs from a shell, one package:installrequire run per missing package, and is now the install hint shown for a missing driver. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 #4 (base
optional-drivers). Once #4 merges, GitHub retargets this tomain.#4 made every storage driver except the local one an optional package. This PR lets you install a missing driver without writing the Composer commands yourself.
From the manager (administrators)
A missing driver in the "connect storage" picker now has an Install button. The button doesn't run Composer in the web request:
amount.driver_installtask through the core'sSystemTaskService::createTaskFromStoreRequest(). The core's own checks run first: thesystem_tasks.manage_packagespermission, the super-administrator gate, the exclusive lock shared with site updates and other installs, and the scheduler's health.system:task-workerruns the task using the core'sConsoleInstallFlowService, the same flow the Extras module uses. That meanspackage:installrequire(which checks the site still boots and rolls back if it doesn't), thenpackage:discover,vendor:publishandmigrate.bootstrap.driver_installs).From artisan
This runs
package:installrequireonce per missing package.package:installrequirerolls back only its own package, so this PR doesn't use the "record without running Composer" shortcut. It is now also the install hint everywhere, instead of the rawpackage:installrequireline. The README drops the three-command block from #4.Also
Driver::missingPackages()asks Composer which packages are installed. A driver whose package is installed but still can't start (FTP withoutext-ftp) gets a clear message instead of an install that would change nothing.routes.phpnow importsComputerControllerlike every other controller./computersanswered 200 in the demo without the import, so this is only for consistency.Tests
tests/Unit/DriverInstallTest.php(15 tests). It covers task-type registration, who may install, queueing through the core service, an install that is already under way, a refusal from the core's real lock, the creator ignoring package names in the request, the handler installing only the driver's packages, polling, the controller and bootstrap flags, andamount:drivers --install.installed: true.exec_moduleandsystem_tasks.manage_packagesbut not administrator was refused, checked in PHP.amount:drivers --install=zip,s3installed ZIP and skipped S3, and an unknown id exits 1.🤖 Generated with Claude Code