Giter Club home page Giter Club logo

sf4.4-website-skeleton-starter's Introduction

sf4.4-website-skeleton-starter

This repository is useful for beginners. I created a starter kit for Symfony 4.4 (LTS), based on the website-skeleton project provided by Symfony itself. This one is more complete to start a real project.

It shows how to use WebpackEncore, TimeContinuum, User Auth and other stuffs (such as a Makefile, fixtures with Faker, Unit and Functional tests, Behat, Guard, Events, Entity traits, Q&A tools, translations, commands...) following the recommended SensioLabs best practices.

Software License

Author

Installation instructions

Project requirements

Project view

Alt text

Installation

1 . Clone the current repository:

$ git clone 'https://github.com/GaetanRole/sf4.4-website-skeleton-starter'

2 . Move in and create few .env.{environment}.local files, according to your environments with your default configuration or only one global .env.local. This one is not committed to the shared repository.

.env equals to the last .env.dist file before november 2018.

3.a . Execute commands below into your working folder to install the project:

$ composer install
$ yarn install
$ yarn run dev
$ bin/console doctrine:database:create # (d:d:c)
$ bin/console doctrine:migration:migrate # (d:m:m)
$ bin/console doctrine:fixtures:load # (d:f:l)
$ bin/console doctrine:migration:secure # (d:m:s)

3.b . Or just set your DATABASE_URL and call the Makefile's install rule:

$ make install

The project's Makefile has few rules which could be very useful. In fact, you have some rules for Q&A tools and unit/functional tests. Take a look on it !

Usage

$ cd sf4.4-website-skeleton-starter
$ symfony serve --no-tls

The web server bundle is no longer used anymore. Use the Symfony binary now.

For loading User's fixture (fixture based on default locale):

$ bin/console doctrine:fixture:load

For translation to XLIFF files (app_locales: ['fr', '%locale%']):

$ bin/console translation:update --output-format xlf --dump-messages --force en
$ bin/console translation:update --output-format xlf --dump-messages --force fr

To use PHP CodeSniffer (for more PHPDocumentor usage, see official [https://docs.phpdoc.org/]):

$ ./vendor/bin/phpcbf src/[FILE]
$ ./vendor/bin/phpcs src/[FILE]

To see all available routes:

$ bin/console debug:router

To see all services:

$ bin/console debug:container

User

Current User entity has some fields that are required or not. Feel free to change it according to your logic, such as adding canonical fields, salt and others:

$ bin/console make:entity User

And do not forget to update your User's fixture:

$ bin/console doctrine:fixture:load

Personal commands

To use a personal command (displaying all users from DB):

$ bin/console app:list-users --help
$ bin/console app:list-users

Feel free to create other commands such as a promotion command or a user creation...

Tests

Execute this command to run PHPUnit and Behat tests:

$ make tests

Contributing

Do not hesitate to improve this repository, by creating your PR on GitHub with a description which explains it.

Ask your question on [email protected].

sf4.4-website-skeleton-starter's People

Contributors

gaetanrole avatar xelysion avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.