Handy Commands - MiguelFieira/AMO-HANDBOEK GitHub Wiki

Symfony is a PHP framework for web applications and a set of reusable PHP components. Symfony is used by thousands of web applications (including BlaBlaCar.com and Spotify.com) and most of the popular PHP projects (including Drupal and Magento).

Handy Commands

This is a summary of the commands you can find on the other pages.

Startup Commands.

  1. To create your local project:
    composer create-project symfony/website-skeleton:4.3.* my-project

  2. To add your local dev server:
    composer require symfony/web-server-bundle --dev


List of basic commands you can use during your project.

  1. To start your local server use the command:
    php bin/console server:run

  2. To create your Database use the command:
    php bin/console doctrine:database:create

  3. To force a Database update use the command:
    php bin/console doctrine:schema:update --force

  4. To make a Controller use the command:
    php bin/console make:controller

  5. To make a Entity use the command:
    php bin/console make:entity

  6. To make a Crud use the command:
    php bin/console make:crud

  7. To clear your Cache use the command:
    php bin/console cache:clear

  8. To get a list of all your routes en paths:
    php bin/console debug:router


FOSUserBundle Commands

  1. To make a Super-Admin User use the command:
    php bin/console fos:user:create adminusername --super-admin

  2. To make a User use the command:
    php bin/console fos:user:create username


Git Commands

  1. To initialize your new Git Repository use the command:
    git init

  2. To link your new Repository use the command:
    git remote add origin Your_Repository_URL

  3. To add files to a commit use the command:
    git add .

  4. To add a message to your commit use the command:
    git commit -m "Commit Message"

  5. To push your files use the command:
    First time: git push origin master after that git push

*Note You might have to add --force while pushing the first time!

More git commands can be found here!

⚠️ **GitHub.com Fallback** ⚠️