Skip to main content
The bundle ships one console command for setting up configuration when the Symfony Flex recipe is not available.

nowo:twig-inspector:install

Creates the Twig Inspector Bundle configuration file and ensures routes are set up.

What it does

Running this command performs two actions:
  1. Creates config/packages/{env}/nowo_twig_inspector.yaml with all available options pre-filled and commented.
  2. Creates or updates config/routes.yaml to include the bundle’s route import under when@dev: and when@test:.
If config/routes.yaml already contains an import for NowoTwigInspectorBundle or nowo_twig_inspector, the command skips the route update to avoid duplicates.

When to use it

If you installed the bundle from Packagist and the Symfony Flex recipe ran successfully, you do not need this command — the config and routes files are created automatically during composer require.
Use the install command when:
  • Installing from a private Git repository (Flex recipes do not apply to private sources).
  • The Flex recipe did not run for any reason and config/routes files are missing.
  • You want to regenerate the config file with the full annotated template.

Options

string
Environment name for which to create the configuration file. Determines the subdirectory: config/packages/{env}/nowo_twig_inspector.yaml.Default: dev
boolean
Overwrite the configuration file if it already exists, without prompting for confirmation. Short alias: -f.

Interactive behaviour

If the configuration file already exists and --force is not set, the command prompts:
Answer no (or press Enter) to cancel without changes. Answer yes to overwrite.

Examples

1

Basic setup for dev

Creates config/packages/dev/nowo_twig_inspector.yaml and updates config/routes.yaml.
2

Setup for test environment

Creates config/packages/test/nowo_twig_inspector.yaml.
3

Force overwrite an existing config

Overwrites config/packages/dev/nowo_twig_inspector.yaml without prompting.

Generated config file

The command writes the following fully annotated configuration:

Generated routes entry

The command appends the following to config/routes.yaml if the import is not already present:
The bundle works with default values if you later delete the configuration file. The routes file is required for the “open in IDE” links to work.