Skip to content

Latest commit

 

History

History
81 lines (58 loc) · 2.95 KB

DEVELOPMENT.md

File metadata and controls

81 lines (58 loc) · 2.95 KB

What is this?

This document contains basic information how you should development this application.

Table of Contents

Development

IDE

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.

PHP Code Sniffer

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.

Database changes

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:

  1. Make your changes (create, delete, modify) to entities in /src/Entity/ folder
  2. Run diff command to create new migration file
  3. Run migrate command to make actual changes to your database
  4. 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.


Back to resources index - Back to main README.md