Skip to content

feat: Improve Flysystem bundle DX with push/pull console commands#204

Merged
maxhelias merged 12 commits intothephpleague:3.xfrom
Nitram1123:feat/push-pull-console-command
Mar 25, 2026
Merged

feat: Improve Flysystem bundle DX with push/pull console commands#204
maxhelias merged 12 commits intothephpleague:3.xfrom
Nitram1123:feat/push-pull-console-command

Conversation

@Nitram1123
Copy link
Copy Markdown
Contributor

Summary:
This PR adds two native console commands to transfer files between the local filesystem and configured Flysystem storages:
flysystem:push
flysystem:pull
The commands support interactive prompts for missing arguments.

Motivation:
Applications already configure Flysystem storages through the bundle, but transferring files to or from those storages currently requires ad hoc application code or one-off scripts.
Providing built-in console commands makes common operational tasks easier:
manually pushing files to a configured storage
retrieving files from a storage during development or support operations
scripting simple import/export workflows around existing storage definitions
This keeps the workflow close to the bundle itself and avoids duplicating the same logic in userland code.

What is included:
New console commands
This PR introduces two commands:
flysystem:push to upload a local file to a configured storage
flysystem:pull to download a file from a configured storage to the local filesystem
Both commands rely on the existing configured storage names, so they work directly with the storages already declared in bundle configuration.
Conditional command registration
The commands are only registered when Symfony Console is available.

Copy link
Copy Markdown
Collaborator

@maxhelias maxhelias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Just a few quick comments — otherwise I'm ok to merge this after.

Comment thread src/Command/PullCommand.php
Comment thread src/Command/PullCommand.php Outdated
Comment thread src/Command/PullCommand.php Outdated
Comment thread tests/Command/TransferCommandTest.php Outdated
Comment thread tests/Command/TransferCommandTest.php Outdated
Comment thread tests/Command/TransferCommandTest.php
@maxhelias
Copy link
Copy Markdown
Collaborator

Thanks !

@maxhelias maxhelias changed the title Improve Flysystem bundle DX with push/pull console commands feat: Improve Flysystem bundle DX with push/pull console commands Mar 25, 2026
@maxhelias maxhelias merged commit 6f8043f into thephpleague:3.x Mar 25, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants