Development

ref/TaskGenerateApp

You must first sign up to be able to contribute.

Version 1 (modified by bshirley, 9 years ago)
--

generate:app

symfony generate:app [--escaping-strategy="..."] [--csrf-secret="..."] application

This is one of the base symfony tasks. It will generate an application within an existing project. Typical applications might include frontend or backend, but are not limited in their name.

Symfony contains a collection of generation tasks that assist in generating code and standard directory structure automatically. In addition to this task, they include generate:project?, generate:module?, and generate:task?.

Arguments

  • application - the name of the application you wish to generate

optional:

  • --escaping-strategy=on - you can have code included that will prevent cross-site scripting (XSS) attacks; this enables output escaping; if you are developing a site that will be publicly accessible, and are in doubt, you should include this option.
  • --csrf-secret=SomethingP4ssw0rdLike - this will cause a secret session token to be used to try to prevent Cross-Site Request Forgery (CSRF)

Both of the optional arguments can me adjusted at any time during development by changing configuration values in the settings.yml? file.

See also, the list of options? available to all symfony tasks.

Examples

From Jobeet, Chapter 12:

    $ php symfony generate:app --escaping-strategy=on --csrf-secret=UniqueSecret1 backend

References