V
V
Viktor Yakovenko2021-02-07 15:04:02
Composer
Viktor Yakovenko, 2021-02-07 15:04:02

Why is there only one Gemfile in the RUBY project, but there are many composer.json files in PHP?

Ruby projects use a "flat" dependency system, i.e. there is only one Gemfile at the root of the project.
In PHP, for some reason, there is a "tree-like" dependency system - in the root of the project, the main composer.json file and in each library folder, in turn, "their" composer.json files.
What was the purpose of choosing such a seemingly confusing approach to describing dependencies?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vasily Bannikov, 2021-02-07
@vabka

You need to ask the composer developers about this.
Didn't deal with dependency management in php and ruby.
But it seems to me that such a tree-like format is simpler in terms of resolving transitive dependencies.
I don't see anything confusing.
A similar approach is used in C# (nuget) and js (npm)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question