Skip to content

Commit 34db091

Browse files
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 usage
2 parents 37d5c5e + f17a647 commit 34db091

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

composer.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@
1414
"sensio/framework-extra-bundle": "^5.1",
1515
"sensiolabs/security-checker": "^5.0",
1616
"symfony/asset": "*",
17+
"symfony/console": "*",
1718
"symfony/expression-language": "*",
1819
"symfony/flex": "^1.1",
1920
"symfony/form": "*",
2021
"symfony/framework-bundle": "*",
22+
"symfony/intl": "*",
2123
"symfony/monolog-bundle": "^3.1",
2224
"symfony/polyfill-php72": "^1.8",
2325
"symfony/security-bundle": "*",
@@ -28,6 +30,7 @@
2830
"symfony/webpack-encore-bundle": "dev-master",
2931
"symfony/yaml": "*",
3032
"twig/extensions": "^1.5",
33+
"twig/twig": "^2.6",
3134
"white-october/pagerfanta-bundle": "^1.1"
3235
},
3336
"require-dev": {

composer.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)