Symfony

Installation steps

linotype for symfony is under development

1. Create new symfony project:

composer create-project symfony/website-skeleton:"5.2.*" my-linotype-project
cd my-linotype-project

2. Install linotype:

latest
v1.x-dev
Require linotype bundle with composer from the packagist.org repository:
composer require linotype/symfony
Add a linotype starter project from repository (default starter bellow, choose another one here):
composer require linotype/starter
Install from v1.x-dev branch:
composer require linotype/symfony:v1.x-dev \
linotype/linotype:v1.x-dev \
linotype/installers:v1.x-dev \
linotype/starter:v1.x-dev \
--no-cache

3. Configure symfony (flex recipe comming soon)

Change default twig path to linotype:

[edit] config/packages/twig.yaml
twig:
default_path: '%kernel.project_dir%/linotype'

Create linotype route config:

[create] config/routes/linotype.yaml
linotype:
resource: '@LinotypeBundle/Resources/config/routes.yaml'

4. Setup the database provider

Choose and configure a database provider in doctrine:

[edit] .env
###> doctrine/doctrine-bundle ###
# Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
# IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml
#
DATABASE_URL="sqlite:///%kernel.project_dir%/var/data.db"
# DATABASE_URL="mysql://db_user:[email protected]:3306/db_name?serverVersion=5.7"
# DATABASE_URL="postgresql://db_user:[email protected]:5432/db_name?serverVersion=13&charset=utf8"
###< doctrine/doctrine-bundle ###

Execute common symfony command:

php bin/console make:migration
php bin/console doctrine:migrations:migrate
php bin/console cache:clear

5. Run local environement

Serve and build assets:

symfony serve
yarn --cwd linotype/Theme/Default/webpack install
yarn --cwd linotype/Theme/Default/webpack build
- or -
yarn --cwd linotype/Theme/Default/webpack watch
Done! You are ready to create your first linotype powered website
Learn more about using linotype in the symfony environment.
Last modified 1yr ago