itk-dev / symfony-4-skeleton
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
Language:JavaScript
Type:project
Requires
- php: ^7.1.3
- ext-ctype: *
- ext-iconv: *
- sensio/framework-extra-bundle: ^5.1
- symfony/asset: 4.2.*
- symfony/console: 4.2.*
- symfony/dotenv: 4.2.*
- symfony/expression-language: 4.2.*
- symfony/flex: ^1.1
- symfony/form: 4.2.*
- symfony/framework-bundle: 4.2.*
- symfony/monolog-bundle: ^3.1
- symfony/orm-pack: *
- symfony/process: 4.2.*
- symfony/security-bundle: 4.2.*
- symfony/serializer-pack: *
- symfony/swiftmailer-bundle: ^3.1
- symfony/translation: 4.2.*
- symfony/twig-bundle: 4.2.*
- symfony/validator: 4.2.*
- symfony/web-link: 4.2.*
- symfony/yaml: 4.2.*
Requires (Dev)
Conflicts
This package is auto-updated.
Last update: 2024-11-29 00:50:23 UTC
README
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 theCOMPOSE_PROJECT_NAME
variable. - Edit
$header
in.php_cs.dist
. - Edit
README.md
(Remove optional sections and describe your actual project).
Suggested packages
composer require symfony/orm-pack composer require --dev symfony/maker-bundle
Set DATABASE_URL
in .env.dev
:
DATABASE_URL=mysql://db:db@mariadb:3306/db
composer require admin
composer require alterphp/easyadmin-extension-bundle
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
--- ✂ --------------------------------------------------------------------------