This document contains basic information how you should development this application.
I highly recommend that you use "proper" IDE to development your application. Below is short list of some popular IDEs that you could use.
Just choose one which is the best for you.
Also note that project contains .idea
folder that holds default settings for
PHPStorm.
It's highly recommended that you use this tool while doing actual development
to application. PHP Code Sniffer is added to project dev
dependencies, so
all you need to do is just configure it to your favorite IDE. So the phpcs
command is available via following example command.
./vendor/bin/phpcs -i
If you're using PhpStorm this following link will help you to get things rolling.
Migration files contain all necessary database changes to get application running with its database structure. You can migrate these changes to your database with following command:
./bin/console doctrine:migrations:migrate
After that you can start to modify or delete existing entities or create your own ones. Easiest way to make this all work is to follow below workflow:
- Make your changes (create, delete, modify) to entities in
/src/Entity/
folder - Run
diff
command to create new migration file - Run
migrate
command to make actual changes to your database - Run
validate
command to validate your mappings and actual database structure
Those commands you can run with ./bin/console doctrine:migrations:<command>
.
With this workflow you get easy approach to generic database changes on your application. And you don't need to make any migrations files by hand (just let Doctrine handle those). Although remember to really take a closer look of those generated migration files to make sure that those doesn't contain anything that you really don't want.