Skip to main content
page last edited on 10 October 2022

A module as a Symfony Bundle

Version: 5.5.0

To declare a module as a Symfony bundle, create a class <XCart>/modules/{AuthorId}/{ModuleId}/src/{ModuleId}Bundle.php.

<?php

namespace XCExample\SampleModule;

use Symfony\Component\HttpKernel\Bundle\Bundle;

class SampleModuleBundle extends Bundle
{
}

The <XCart>/modules/{AuthorId}/{ModuleId}/config/services.yaml file is uploaded for such modules in addition to the regular bundle facilities. The upload takes place after completing the X-Cart configuration. This is required to allow the module to override the core behavior.