A skeleton to start a new Symfony 4 project

Installs: 26

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 3

Forks: 0

Open Issues: 3




This is a skeleton for a Symfony 4 project.

--- ✂ --------------------------------------------------------------------------

Skeleton installation (delete this section when done)

composer create-project itk-dev/symfony-4-skeleton my-itk-dev-project

Post skeleton installation

  • Edit .env and define the COMPOSE_PROJECT_NAME variable.
  • Edit $header in .php_cs.dist.
  • Edit (Remove optional sections and describe your actual project).

Suggested packages


composer require symfony/orm-pack
composer require --dev symfony/maker-bundle




composer require admin

EasyAdmin Extension:

composer require alterphp/easyadmin-extension-bundle

API Platform:

composer require api


composer require encore

Add tools for linting assets:

yarn add --dev eslint eslint-config-standard eslint-plugin-import eslint-plugin-node eslint-plugin-promise eslint-plugin-standard
yarn add --dev stylelint stylelint-config-recommended-scss stylelint-scss

Add these lines to scripts in package.json:

        "check-coding-standards/stylelint": "stylelint --config=.stylelintrc.js 'assets/**/*.scss'",
        "check-coding-standards/scss": "yarn run check-coding-standards/stylelint",
        "check-coding-standards/eslint": "eslint --config .eslintrc.js 'assets/**/*.js'",
        "check-coding-standards/js": "yarn run check-coding-standards/eslint",
        "check-coding-standards": "yarn run check-coding-standards/scss; yarn run check-coding-standards/js",
        "apply-coding-standards/stylelint": "stylelint --config=.stylelintrc.js 'assets/**/*.scss' --fix",
        "apply-coding-standards/scss": "yarn run apply-coding-standards/stylelint",
        "apply-coding-standards/eslint": "eslint --config .eslintrc.js 'assets/**/*.js' --fix",
        "apply-coding-standards/js": "yarn run apply-coding-standards/eslint",
        "apply-coding-standards": "yarn run apply-coding-standards/scss; yarn run apply-coding-standards/js"

See also:

--- ✂ --------------------------------------------------------------------------

Starting the show

docker-compose pull
docker-compose up -d

Open the site in your default browser:

open http://$(docker-compose port nginx 80)

Coding standards

Check Symfony coding standards using PHP Coding Standards Fixer and PHP_CodeSniffer:

composer check-coding-standards

Apply Symfony coding standards:

composer apply-coding-standards

Twig (experimental)

Check Twig templates using Twigcs:

composer check-coding-standards/twigcs

--- ✂ --- (remove this section if not using encore) ----------------------------

Assets (SCSS and JavaScript)

Check coding standards in all assets:

yarn check-coding-standards

Check coding standards in SCSS files:

yarn check-coding-standards/scss

Check coding standards in JavaScript files:

yarn check-coding-standards/js

Apply coding standards to all assets:

yarn apply-coding-standards

Apply coding standards to SCSS files:

yarn apply-coding-standards/scss

Apply coding standards to JavaScript files:

yarn apply-coding-standards/js

--- ✂ --------------------------------------------------------------------------