Skip to content

Latest commit

 

History

History
50 lines (43 loc) · 1.23 KB

installation.md

File metadata and controls

50 lines (43 loc) · 1.23 KB

Installation

Note: It is not recommended to install the bundle in the production environment.

With Composer

  1. Using composer, install the package as a dev dependency:
composer require --dev "oro/twig-inspector:~1.1.0"
  1. Enable the bundle in the config/bundles.php file:
# config/bundles.php
<?php

return [
    # ...
    Oro\TwigInspector\Bundle\OroTwigInspectorBundle::class => ['dev' => true]
];
  1. Add twig_inspector firewall to the security.yaml file:
# config/packages/security.yaml
security:
    firewalls:
        twig_inspector:
            pattern:   ^/_template/
            security: false
  1. Create the twig_inspector.yaml routing file in the config/routes/dev:
# config/routes/dev/twig_inspector.yaml
oro_twig_inspector:
    resource: "@OroTwigInspectorBundle/Resources/config/oro/routing.yml"
  1. (Optional) Update the framework.ide configuration, for example:
# config/packages/framework.yaml
framework:
    ide: phpstorm # to open files in a PhpStorm IDE
  1. Warm up the cache
php bin/console cache:warmup --env=dev

Next Step

How to Use Twig Inspector?