[FrameworkBundle] Commands can be registered in the DIC

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | don't now
| Fixed tickets | #8166
| License       | MIT
| Doc PR        | TODO

Todo:

* [ ] Documentation
* [ ] Clean code (add type hinting)
* [ ] Add tests

What do you think of that ?