Support Form: Installation and Operation
Support Form for Sylius - installation via Composer (Packeton), setup command, update, deleting old requests with a cron job, uninstall in the correct order
Support Form: Installation and Operation
Live Demo: Try this and other plugins live — no installation, no risk: demo.markus-michalski.net
Installation
The repository is private and provided through Packeton (
https://packeton.markus-michalski.net). You receive the credentials after purchasing the license or once access is granted.
{ "repositories": [{ "type": "composer", "url": "https://packeton.markus-michalski.net" }] }
composer require mmd/sylius-support-form-plugin
-
Register the bundle in
config/bundles.php:Mmd\SyliusSupportFormPlugin\MmdSyliusSupportFormPlugin::class => ['all' => true], -
Import the routes, for example in
config/routes/mmd_support_form.yaml:mmd_sylius_support_form_admin: resource: "@MmdSyliusSupportFormPlugin/config/routes/admin.yaml" mmd_sylius_support_form_shop: resource: "@MmdSyliusSupportFormPlugin/config/routes/shop.yaml" -
Run the setup command:
bin/console mmd:support-form:setupmmd:support-form:setupruns only this plugin's open migrations, never migrations of your application or other plugins. The command is idempotent: if there is no new migration, nothing happens, even after acomposer update. If Sylius' own migrations are still open, it aborts and tells you to rundoctrine:migrations:migratefirst. It also checks that the routes from step 2 are imported and prints the matching snippet if they are not. It never writes into yourconfig/directory. It asks for confirmation before running, in scripts add--no-interaction. The usualdoctrine:migrations:migratestill works as an alternative. Run the command as the same user as your other console commands.
Grids, Twig hooks and the menu entry register themselves, so there is nothing else to import. The plugin ships no assets of its own, so assets:install is not needed.
Afterwards you find the settings under Admin sidebar → MMKreativ Plugins → Support form (see Configuration). The form is available at /support.
The form has no spam protection of its own. Read the known limitations before going live.
Update
composer update mmd/sylius-support-form-plugin
bin/console mmd:support-form:setup --no-interaction
bin/console cache:clear
You can safely run the setup command again after every update: without a new migration nothing happens.
Deleting old requests regularly
Stored requests contain personal data: everything customers type into the fields you defined, plus the e-mail address. They are never deleted automatically. Set up your own cron job for that:
| Command | Recommended interval | Description |
|---|---|---|
bin/console mmd:support-requests:purge --older-than=90 |
weekly or daily | Permanently deletes all requests older than the given number of days (default: 90) |
--older-than must be a positive whole number, otherwise the command aborts with an error message.
Example for the crontab of the user your other console commands run as (adjust the path):
# every Monday at 03:00: delete requests older than 90 days
0 3 * * 1 cd /var/www/shop && bin/console mmd:support-requests:purge --older-than=90 --no-interaction
There is no recycle bin and no restore. A deleted request is gone for good.
Uninstall
The order matters because Doctrine only knows the migrations while the bundle is still registered:
-
Remove the cron job for
mmd:support-requests:purge. -
While the bundle is still registered, roll back the three migrations, one version at a time and the newest first:
bin/console doctrine:migrations:execute --down 'Mmd\SyliusSupportFormPlugin\Migrations\Version20260929140000' bin/console doctrine:migrations:execute --down 'Mmd\SyliusSupportFormPlugin\Migrations\Version20260929120000' bin/console doctrine:migrations:execute --down 'Mmd\SyliusSupportFormPlugin\Migrations\Version20260928095114' -
Remove the route import and the bundle entry in
config/bundles.php, then runcomposer remove mmd/sylius-support-form-plugin.
Rolling back deletes all stored requests, field definitions and channel configurations. Back up the data first if you still need it.