Note: It is not recommended to install the bundle in the production environment.
- Using composer, install the package as a
dev
dependency:
composer require --dev "oro/twig-inspector:~1.1.0"
- Enable the bundle in the
config/bundles.php
file:
# config/bundles.php
<?php
return [
# ...
Oro\TwigInspector\Bundle\OroTwigInspectorBundle::class => ['dev' => true]
];
- Add
twig_inspector
firewall to thesecurity.yaml
file:
# config/packages/security.yaml
security:
firewalls:
twig_inspector:
pattern: ^/_template/
security: false
- Create the
twig_inspector.yaml
routing file in theconfig/routes/dev
:
# config/routes/dev/twig_inspector.yaml
oro_twig_inspector:
resource: "@OroTwigInspectorBundle/Resources/config/oro/routing.yml"
- (Optional) Update the framework.ide configuration, for example:
# config/packages/framework.yaml
framework:
ide: phpstorm # to open files in a PhpStorm IDE
- Warm up the cache
php bin/console cache:warmup --env=dev