Commit 34db091
committed
minor #927 Fixed transitive dependencies usage (javiereguiluz)
This PR was squashed before being merged into the master branch (closes #927).
Discussion
----------
Fixed transitive dependencies usage
I was playing with the "transitive dependencies usage" inspection and lots of errors were reported. Our code uses some classes that belong to packages not required explicitly in our `composer.json`.
For example, we have lots of console commands with lots of `use Symfony\Component\Console\...` import but we never required `symfony/console` ... so it worked thanks to some package requiring symfony/console indirectly.
Same happens to lots of other missing dependencies. However, should we add all of them?
* These seem obvious to me that we should add them: Console, Intl, OptionsResolver.
* These could be added or not: Twig (added indirectly by TwigBundle), all the security/* micro-dependencies (added indirectly by SecurityBundle), EventDispatcher, Doctrine Common, Doctrine Persistence, etc.
* I think we should not add these: HttpFoundation, HttpKernel, Routing, etc.
What do you think?
Commits
-------
f17a647 Fixed transitive dependencies usage2 files changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| 22 | + | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
| |||
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
| 33 | + | |
31 | 34 | | |
32 | 35 | | |
33 | 36 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments