Manual installation

This page describes how to install the Invoicing Plugin in older Sylius or Symfony projects that do not use Symfony Flex and cannot rely on automatic recipe configuration.

1. Require the Package

composer require sylius/invoicing-plugin

2. Register Bundles (if not auto-registered)

In your kernel (e.g. config/bundles.php or equivalent), register:

return [
    // ...
    Knp\Bundle\SnappyBundle\KnpSnappyBundle::class => ['all' => true],
    Sylius\InvoicingPlugin\SyliusInvoicingPlugin::class => ['all' => true],
];

Or if using Flex‑less configuration: register the bundle in your AppKernel.

3. Configuration

Import configuration:

In config/packages/_sylius.yaml:

imports:
    - { resource: '@SyliusInvoicingPlugin/config/config.yaml' }

Make sure to load any routing configuration:

In config/routes/invoicing.yaml:

sylius_invoicing:
  resource: "@SyliusInvoicingPlugin/Resources/config/routing.yaml"
  prefix: /admin

Or adjust prefix as needed.

4. Doctrine & Migrations

bin/console doctrine:migrations:migrate

Ensure your migrations path includes the plugin migrations.

5. Publish Assets & Templates (if needed)

If the plugin has assets or template resources, copy or override them:

php bin/console assets:install

6. (Optional) Generate Invoices for Existing Orders

bin/console sylius-invoicing:generate-invoices

7. Clear Cache & Warmup

bin/console cache:clear
bin/console cache:warmup

Notes & Caveats

  • Since you’re bypassing Symfony Flex, ensure that service definitions, autoconfiguration, and autowiring are properly loaded (e.g. via services.yaml includes).

  • Be careful to match paths, bundle namespaces, and resource loading setups.

  • Test invoice generation, file creation, and download UI after setup to confirm that configuration and wiring are correct.

Last updated

Was this helpful?