Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

en es

SFS Builder

A Powerful Symfony CMS.


  1. Why SFS Builder
  2. How to Install and Use SFS Builder
    1. Using SFS Builder in a Clean Symfony Project
    2. Using SFS Builder with a Sylius Project
  3. Adding more components to it

1. Why SFS Builder

  • Design layouts with simple or complex block structures and reuse them on different pages or sections.
  • Create pages by combining modules you create yourself or using the ones we provide.
  • For common sections on different pages, simplify creation with our reusable block concept.
  • Manage multiple versions of the same page and preview the changes without fear of making mistakes, publish the final version when you are happy with it!
  • All this with a semantic website from the first block, responsive, multi-site, multi-language and SEO ready.

2. How to Install and Use SFS Builder

2.1 Using SFS Builder in a Clean Symfony Project

Installing Symfony

Install Symfony following current instructions in

symfony new my-sfs-builder-project --version="6.2.*" --webapp

Previous configuration

To work with the CMS we need a MySQL database (PostgreSQL should also be compatible).

Configuring the Database in Docker

We will use the file docker-compose.yaml that comes with the project:

Note This are development values, not ready for Production.

version: '3'

###> doctrine/doctrine-bundle ###
    image: "mysql:8.0"
      MYSQL_ROOT_PASSWORD: nopassword
      MYSQL_USER: test
      MYSQL_PASSWORD: nopassword
      - 3306:3306
      - database_data:/var/lib/mysql
###< doctrine/doctrine-bundle ###

###> doctrine/doctrine-bundle ###
###< doctrine/doctrine-bundle ###

and we can already start the container:

docker-compose up -d
Configuring the environment value

In .env change the values of the MySQL database:

###> doctrine/doctrine-bundle ###
###< doctrine/doctrine-bundle ###

Configuring Symfony Flex de Softspring (for Development)

Note This step will not be needed when Softspring' Symfony Flex recipes are integrated in the contrib repository

In composer.json, we add the endpoints and we establish allow-contrib to true:

    "extra": {
        "symfony": {
            "allow-contrib": true,
            "require": "6.2.*",
            "endpoint": ["", "flex://defaults"]


Until we release version 5.2 of the bundles we have to include (in composer.json):

    "minimum-stability": "dev"

Configure webpack

Note If we don't have yarn installed, we need to install it before. In Ubuntu < 18.04 there are some issues between the packages yarnpkg and cmdtest

composer require webpack
yarn install
yarn add @popperjs/core bootstrap bootstrap-icons underscore.string sass-loader@^13.0.0 sass --dev
Configure admin in webpack

In the file webpack.config.js

    // ...

    // add admin.js
    .addEntry('admin', './assets/admin.js')

    // ...
    // uncomment sass loader
    // ...

Install sfs-builder

composer require softspring/sfs-builder:^5.2@dev
bin/console doctrine:migrations:migrate -n

Note If we have a Driver error, we will need to install php-mysql in the php version we are using.

We install additional modules:

composer require softspring/cms-module-collection:^5.2

And we compile the assets

yarn build

Symfony flex should have done all the work and we will have the project ready so we can visualize it.

Some adjustments (by now)

For the app to work properly we have to include framework.enabled_locales:

# config/packages/translation.yaml
    enabled_locales: ['en', 'es']

We have been unable to overwrite templates/base.html.twig with Symfony Flex recipes, so you have to change it by hand (until we fin another solution). By now:

{# templates/base.html.twig #}
{% extends '@SfsComponents/base.html.twig' %}

We can start the application

We are going to use the Symfony CLI command to serve the app:

symfony server:start

Once we have done this, we will have a Not Found in .

If we go to we will be able to configure our first page.