sylius/store-assembler

Sylius Store Assembler – tool to assemble Sylius stores from a set of configuration files.

Fund package maintenance!
sylius

Installs: 2

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 1

Open Issues: 0

Type:symfony-bundle

v0.1.0 2025-06-17 11:47 UTC

This package is auto-updated.

Last update: 2025-06-17 13:07:51 UTC


README

Sylius Store Assembler is a Symfony bundle that streamlines creating and configuring Sylius-based e-commerce stores using store presets.

Installation

Install the package via Composer:

composer require sylius/store-assembler

Enable the Bundle

If your application does not auto-register bundles, add the following entry to config/bundles.php:

<?php
return [
    // ...
    Sylius\StoreAssemblerBundle\SyliusStoreAssemblerBundle::class => ['all' => true],
];

Store Preset Structure

Create a store preset directory with this structure:

store-preset/
├── fixtures/
│   ├── fixtures.yaml
│   └── images/
│       └── <your_image_files>
├── store-preset.json
└── themes/
    └── shop/
        ├── banner.png
        └── logo.png

You can find example presets in the Sylius StorePreset repository.

Usage

Add the following targets to your Makefile for common tasks:

sylius-store-assembler:
    vendor/bin/sylius-store-assembler

sylius-store-assembler-fixtures:
    bin/console sylius:store-assembler:fixture:prepare
    bin/console cache:clear
    bin/console cache:warmup
    bin/console sylius:store-assembler:fixture:load

sylius-store-assembler-theme:
    bin/console sylius:store-assembler:theme:prepare
    bin/console cache:clear
    bin/console cache:warmup

Run all steps with:

make sylius-store-assembler

For granular control, use individual console commands:

php bin/console sylius:store-assembler:plugin:prepare
php bin/console sylius:store-assembler:plugin:install
php bin/console sylius:store-assembler:fixture:prepare
php bin/console sylius:store-assembler:fixture:load
php bin/console sylius:store-assembler:theme:prepare

Configuration

  • Plugin Manifests: Place JSON manifests in config/plugins/{vendor}/{plugin-name}/{major.minor}/manifest.json.

Manifests support:

  • Steps: List of shell commands (e.g., composer require).
  • Configurators: Implementations of Sylius\StoreAssemblerBundle\Configurator\ConfiguratorInterface.

Example manifest:

{
  "steps": [
    "yarn add some/package"
  ],
  "configurators": [
    {
      "class": "Sylius\\\\StoreAssemblerBundle\\\\Configurator\\\\YamlNodeConfigurator",
      "file": "config/packages/my_package.yaml",
      "key": "my_package.some_configuration_key.enabled",
      "value": true
    }
  ]
}

Contributing

Contributions are welcome! By submitting a pull request, you agree to license your changes under the MIT License. Please follow the existing project conventions and tests.

License

This project is released under the MIT License.