Skip to content

jul6art/symfony-skeleton

Repository files navigation

logo dev in the hood

Build Status Code Coverage License Version

jul6art/symfony-skeleton

Base sf4 admin project

⚠️ Work in progress so keep calm. The good news: this is maintained!

Requirements

  • php ^7.4 || ^8.0
  • mysql (for postgresql, sqlite or something else, you will need to update doctrine configuration)
  • composer
  • yarn

Includes

  • phpcs
  • phpcpd
  • phplint
  • twigcs
  • symfony security checker

Installation

git clone https://github.com/jul6art/symfony-skeleton.git

Then edit the root .env file

###> symfony/framework-bundle ###
APP_ENV=dev
APP_SECRET=2f64f0b539e90a15cd03d984d7bc4d56
#TRUSTED_PROXIES=127.0.0.1,127.0.0.2
#TRUSTED_HOSTS='^localhost|example\.com$'
###< symfony/framework-bundle ###

###> doctrine/doctrine-bundle ###
# Format described at http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
# For an SQLite database, use: "sqlite:///%kernel.project_dir%/var/data.db"
# Configure your db driver and server_version in config/packages/doctrine.yaml
DATABASE_URL=mysql://root:@127.0.0.1:3306/symfony_skeleton
DATABASE_HOST=127.0.0.1
DATABASE_PORT=3306
DATABASE_NAME=symfony_skeleton
DATABASE_USER=root
DATABASE_PASSWORD=
###< doctrine/doctrine-bundle ###

###> symfony/swiftmailer-bundle ###
# For Gmail as a transport, use: "gmail://username:password@localhost"
# For a generic SMTP server, use: "smtp://localhost:25?encryption=&auth_mode="
# Delivery is disabled by default via "null://localhost"
MAILER_URL=smtp://localhost:1025
MAILER_DEBUG_ADDRESS=
MAILER_FROM_ADDRESS=
MAILER_FROM_NAME='Symfony Skeleton'
###< symfony/swiftmailer-bundle ###

###> google/recaptcha ###
GOOGLE_RECAPTCHA_SITE_KEY=
GOOGLE_RECAPTCHA_SECRET=
###< google/recaptcha ###

###> domain ###
# Add your subdomains here. ex: admin.symfony-skeleton.localhost
# So you can select routes or controllers depending on the host
HTTP_PROTOCOL=http://
CURRENT_DOMAIN=symfony-skeleton.localhost
###< domain ###

###> symfony/messenger ###
MESSENGER_TRANSPORT_DSN=doctrine://default
###< symfony/messenger ###

Documentation

Testing

sh hook_local.sh
./vendor/bin/simple-phpunit

Start server

sh hook_local.sh
bin/console server:run

Then visit http://127.0.0.1:8000

License

The Symfony Skeleton is open-sourced software licensed under the MIT license.

© 2023 dev in the hood