Skip to content

Instantly share code, notes, and snippets.

@alexbonhomme
Last active June 20, 2016 09:15
Show Gist options
  • Save alexbonhomme/61f4c37fded4c26ae987bb58c7f50da7 to your computer and use it in GitHub Desktop.
Save alexbonhomme/61f4c37fded4c26ae987bb58c7f50da7 to your computer and use it in GitHub Desktop.

Local server

php app/console server:run

php app/console server:stop

Routes list

php app/console debug:router

Send spool emails (SwiftMailer)

php app/console swiftmailer:spool:send --message-limit=10 --env=prod

Doctrine

Entity generation

php app/console doctrine:generate:entities

Entity getter/setter generation

php app/console doctrine:generate:entities AppBundle:EntityName

Schema update

php app/console doctrine:schema:update --force

DoctrineMigrationsBundle

Generate migration

php app/console doctrine:migrations:diff

Apply migration

php app/console doctrine:migrations:migrate

FOSUserBundle

User role update

php app/console fos:user:promote username ROLE_NAME

User create

php app/console fos:user:create testuser test@example.com p@ssword

More

http://symfony.com/doc/current/bundles/FOSUserBundle/command_line_tools.html

FOSOAuthServerBundle

Token cleaning

php app/console fos:oauth-server:clean

Grant access client generation (cf. CreateClientCommand.php)

php app/console acme:oauth-server:client:create --grant-type="password" --grant-type="http://my.custom/grants/access"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment