Skip to content

Commit b287259

Browse files
authored
Update README.md
docs: Mention installation process for a Symfony Framework app (#76)
1 parent 8b1d65f commit b287259

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ If you don't need any custom completion behaviour, you can simply add the comple
2323
$ composer require stecman/symfony-console-completion
2424
```
2525

26-
2. Add an instance of `CompletionCommand` to your application's `Application::getDefaultCommands()` method:
26+
2. For standalone Symfony Console applications, add an instance of `CompletionCommand` to your application's `Application::getDefaultCommands()` method:
2727

2828
```php
2929
protected function getDefaultCommands()
@@ -33,6 +33,18 @@ If you don't need any custom completion behaviour, you can simply add the comple
3333
//...
3434
}
3535
```
36+
37+
For Symfony Framework applications, register the `CompletionCommand` as a service in `app/config/services.yml`:
38+
39+
```yaml
40+
services:
41+
#...
42+
console.completion_command:
43+
class: Stecman\Component\Symfony\Console\BashCompletion\CompletionCommand
44+
tags:
45+
- { name: console.command }
46+
#...
47+
```
3648

3749
3. Register completion for your application by running one of the following in a terminal, replacing `[program]` with the command you use to run your application (eg. 'composer'):
3850

0 commit comments

Comments
 (0)