Skip to content

Commit 1d17b55

Browse files
committed
- Updated the documentation to match the symfony flex application structure
- Increased the version to 1.1
1 parent 926bf43 commit 1d17b55

File tree

2 files changed

+13
-17
lines changed

2 files changed

+13
-17
lines changed

Bundle/Resources/doc/installation.md

+12-16
Original file line numberDiff line numberDiff line change
@@ -5,43 +5,39 @@
55
## With Composer
66
1. Using composer, install the package as a `dev` dependency:
77
```bash
8-
php composer require --dev "oro/twig-inspector:1.0.x-dev"
8+
composer require --dev "oro/twig-inspector:~1.1.0"
99
```
1010

11-
2. Enable the bundle in `AppKernel.php`
11+
2. Enable the bundle in the `config/bundles.php` file:
1212
```php
13+
# config/bundles.php
1314
<?php
14-
// src/AppKernel.php
1515

16-
public function registerBundles()
17-
{
18-
if ('dev' === $this->getEnvironment()) {
19-
//...
20-
$bundles[] = new Oro\TwigInspector\Bundle\OroTwigInspectorBundle();
21-
//...
22-
}
23-
}
16+
return [
17+
# ...
18+
Oro\TwigInspector\Bundle\OroTwigInspectorBundle::class => ['dev' => true]
19+
];
2420
```
2521

26-
3. Add `twig_inspector` firewall to`security.yml`:
22+
3. Add `twig_inspector` firewall to the `security.yaml` file:
2723
```yaml
28-
# app/config/security.yml
24+
# config/packages/security.yaml
2925
security:
3026
firewalls:
3127
twig_inspector:
3228
pattern: ^/_template/
3329
security: false
3430
```
35-
4. Import the routing to `routing_dev.yml`:
31+
4. Create the `twig_inspector.yaml` routing file in the `config/routes/dev`:
3632
```yaml
37-
# config/routing_dev.yml
33+
# config/routes/dev/twig_inspector.yaml
3834
oro_twig_inspector:
3935
resource: "@OroTwigInspectorBundle/Resources/config/oro/routing.yml"
4036
```
4137

4238
5. (Optional) Update the [framework.ide](https://symfony.com/doc/current/reference/configuration/framework.html#ide) configuration, for example:
4339
```yaml
44-
# app/config/config_dev.yml
40+
# config/packages/framework.yaml
4541
framework:
4642
ide: phpstorm # to open files in a PhpStorm IDE
4743
```

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"prefer-stable": true,
2828
"extra": {
2929
"branch-alias": {
30-
"dev-master": "1.0-dev"
30+
"dev-master": "1.1-dev"
3131
}
3232
}
3333
}

0 commit comments

Comments
 (0)