Markus Michalski FAQ

Product Custom Inputs: Installation

Install the Sylius plugin Product Custom Inputs via Composer and Packeton: bundle, routes, setup command, update and uninstall in the right order.

Deutsche Version

Back to overview

Product Custom Inputs: Installation

This documentation always describes the latest published version.

Prerequisites

A running Sylius 2.2 application (or newer) with PHP 8.3 and Symfony 7.4. The plugin ships its own tables, so the database must be writable.

Installation

Composer (Packeton)

Private repositories are managed through Packeton (https://packeton.markus-michalski.net). Credentials are provided after purchasing a license or being granted access.

Add the repository to the composer.json of your shop application:

{ "repositories": [{ "type": "composer", "url": "https://packeton.markus-michalski.net" }] }
composer require mmd/sylius-product-custom-inputs-plugin

Then, in this order:

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

    Mmd\SyliusProductCustomInputsPlugin\MmdSyliusProductCustomInputsPlugin::class => ['all' => true],
    
  2. Import the admin routes in config/routes.yaml:

    mmd_sylius_product_custom_inputs_plugin_admin:
        resource: "@MmdSyliusProductCustomInputsPlugin/config/routes/admin.yaml"
    
  3. Run the setup command:

    php bin/console mmd:product-custom-inputs:setup
    

The route import is mandatory. Symfony does not discover a bundle's routes automatically. Without this step the "Product Custom Input Fields" menu entry is missing in the admin, and you cannot manage the fields.

The plugin registers the admin grid and the field picker in the product form itself, no configuration needed. It has no config keys of its own under config/packages/. Translations for de_DE and en_US are included.

Setup command

mmd:product-custom-inputs:setup runs only the still-open migrations of this plugin, nothing from the application or from other plugins. The global doctrine:migrations:migrate remains usable as an alternative.

Update

composer update mmd/sylius-product-custom-inputs-plugin
php bin/console mmd:product-custom-inputs:setup
php bin/console cache:clear

Uninstall

Keep this order so the bundle is still registered while rolling back:

  1. Remove your own template overrides of the plugin.

  2. Roll back the migrations one version at a time, newest first:

    php bin/console doctrine:migrations:execute --down 'Mmd\SyliusProductCustomInputsPlugin\Migrations\Version20260917150000'
    php bin/console doctrine:migrations:execute --down 'Mmd\SyliusProductCustomInputsPlugin\Migrations\Version20260917120000'
    php bin/console doctrine:migrations:execute --down 'Mmd\SyliusProductCustomInputsPlugin\Migrations\Version20260915165859'
    
  3. Remove the route import and the bundle entry.

  4. composer remove mmd/sylius-product-custom-inputs-plugin

Rolling back is partly lossy: for a field attached to several products, the newest migration keeps only the attachment to the lowest product ID, and the oldest drops the tables together with all collected customer inputs.