softspring / symfonic
A powerful Symfony CMS
Installs: 24
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 1
Language:SCSS
Requires
- php: >=8.1
- softspring/cms-bundle: ^5.3
- softspring/cms-module-collection: ^5.3
- softspring/cms-translation-plugin: ^5.3
- symfony/http-kernel: ^5.4|^6.0|^7.0
Requires (Dev)
- friendsofphp/php-cs-fixer: 3.64.*
- phpstan/phpstan: ^1.10.49
- 5.4.x-dev
- 5.3.x-dev
- v5.3.4
- v5.3.3
- v5.3.2
- v5.3.1
- v5.3.0
- v5.3.0-rc9
- v5.3.0-rc8
- v5.3.0-rc7
- v5.3.0-rc6
- v5.3.0-rc5
- v5.3.0-rc4
- v5.3.0-rc3
- v5.3.0-rc2
- v5.3.0-rc1
- v5.3.0-beta4
- v5.3.0-beta3
- v5.3.0-beta2
- v5.3.0-beta1
- 5.2.x-dev
- v5.2.7
- v5.2.6
- v5.2.5
- v5.2.4
- v5.2.3
- v5.2.2
- v5.2.1
- v5.2.0
- v5.2.0-rc10
- v5.2.0-rc9
- v5.2.0-rc8
- v5.2.0-rc7
- v5.2.0-rc6
- v5.2.0-rc5
- v5.2.0-rc4
- v5.2.0-rc1
- 5.1.x-dev
- v5.1.25
- v5.1.24
- v5.1.23
- v5.1.22
- v5.1.21
- v5.1.20
- v5.1.19
- v5.1.18
- v5.1.17
- v5.1.16
- v5.1.15
- v5.1.14
- v5.1.13
- v5.1.12
- v5.1.11
- v5.1.10
- v5.1.9
- v5.1.8
- v5.1.7
- v5.1.6
- v5.1.5
- v5.1.2
- v5.1.1
- v5.1.0
- dev-dependabot/composer/phpstan/phpstan-tw-1.10.49or-tw-2.0.0
This package is auto-updated.
Last update: 2024-11-21 13:41:36 UTC
README
Symfonic
A Powerful Symfony CMS.
Index
- Why Symfonic
- How to Install and Use Symfonic
- Using Symfonic in a Clean Symfony Project
- Using Symfonic with a Sylius Project
- Adding more components to it
1. Why Symfonic
- 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 Symfonic
2.1 Using Symfonic in a Clean Symfony Project
Installing Symfony
Install Symfony following current instructions in https://symfony.com/doc/current/setup.html
symfony new my-symfonic-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' services: ###> doctrine/doctrine-bundle ### database: image: "mysql:8.0" environment: MYSQL_ROOT_PASSWORD: nopassword MYSQL_DATABASE: cms MYSQL_USER: test MYSQL_PASSWORD: nopassword ports: - 3306:3306 volumes: - database_data:/var/lib/mysql ###< doctrine/doctrine-bundle ### volumes: ###> doctrine/doctrine-bundle ### database_data: ###< 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 ### DATABASE_URL="mysql://test:nopassword@127.0.0.1:3306/cms?serverVersion=8.0&charset=utf8mb4" ###< 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": ["https://api.github.com/repos/softspring/recipes/contents/index.json", "flex://defaults"] } } }
TEMPORARY
Until we release version 5.4 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
Encore // ... // add admin.js .addEntry('admin', './assets/admin.js') // ... // uncomment sass loader .enableSassLoader() // ...
Install symfonic
composer require softspring/symfonic:^5.4@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.4
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 framework: 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 https://127.0.0.1:8000/ .
If we go to https://127.0.0.1:8000/admin/cms/pages we will be able to configure our first page.