Sylius Digital Download: Installation
Installing the Sylius plugin Digital Download: Composer via Packeton, bundle, routes, setup command, update and uninstallation in the right order.
Sylius Digital Download: Installation
This documentation always describes the latest published version.
Installation
Private repositories are managed via Packeton (
https://packeton.markus-michalski.net). You receive credentials after purchasing a license or once access is granted.
Add Packeton as a repository in your composer.json:
{ "repositories": [{ "type": "composer", "url": "https://packeton.markus-michalski.net" }] }
composer require mmd/sylius-digital-download-plugin
Then, in this order:
-
Register the bundle in
config/bundles.php:Mmd\SyliusDigitalDownloadPlugin\MmdSyliusDigitalDownloadPlugin::class => ['all' => true], -
Import both route files in
config/routes/mmd_sylius_digital_download.yaml:mmd_sylius_digital_download_admin: resource: "@MmdSyliusDigitalDownloadPlugin/config/routes/admin.yaml" mmd_sylius_digital_download_shop: resource: "@MmdSyliusDigitalDownloadPlugin/config/routes/shop.yaml" -
Create the tables:
bin/console mmd:digital-download:setup
The plugin ships no JavaScript assets of its own, so assets:install is not needed. The bundle registers the Doctrine mapping, migrations, Twig hooks and the mail template itself.
Without the route import, you can reach neither the settings page in the admin nor the download links. The setup command checks this and prints the ready-made YAML snippet if something is missing.
The setup command
mmd:digital-download:setup replaces doctrine:migrations:migrate. It has no options of its own and does the following:
- runs only the pending migrations of this plugin, nothing from the app or from other plugins
- is idempotent: without a new migration nothing happens, so it is safe after every
composer update - checks whether the two routes of the plugin are registered, and otherwise prints the ready-made YAML snippet (it never writes to
config/) - aborts if migrations from Sylius itself are still pending, with a hint to run
doctrine:migrations:migratefirst - adopts the interactivity of the call: the Doctrine confirmation prompt before execution appears, in scripts you pass
--no-interaction
Run it as the same user as your other console commands.
Update
composer update mmd/sylius-digital-download-plugin
bin/console mmd:digital-download:setup
bin/console cache:clear
Uninstallation
The order matters, the migrations must be rolled back while the bundle is still registered:
-
Remove your own templates that call
mmd_download_grantsormmd_download_blocked_reason(otherwise rendering fails without the plugin) -
Roll back the migrations, newest first:
bin/console doctrine:migrations:execute --down 'Mmd\SyliusDigitalDownloadPlugin\Migrations\Version20261115100000' bin/console doctrine:migrations:execute --down 'Mmd\SyliusDigitalDownloadPlugin\Migrations\Version20261114180000' -
Remove the route import and the bundle entry
-
composer remove mmd/sylius-digital-download-plugin
Rolling back deletes all file entries, download links and the settings from the database. The uploaded files themselves stay in the storage, by default in
var/digital-downloads, and must be deleted by hand if needed.