Markus Michalski FAQ

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:

  1. Register the bundle in config/bundles.php:

    Mmd\SyliusDigitalDownloadPlugin\MmdSyliusDigitalDownloadPlugin::class => ['all' => true],
    
  2. 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"
    
  3. 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:

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:

  1. Remove your own templates that call mmd_download_grants or mmd_download_blocked_reason (otherwise rendering fails without the plugin)

  2. 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'
    
  3. Remove the route import and the bundle entry

  4. 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.