I am PHP programmer that know Rails.
Ruby gem bundler very good tool to install dependencies, does php have something like that?(maybe some php framework have such tool).
Expanation about gem bundler:
Bundler manages an application's dependencies through its entire life across many machines systematically and repeatably.
There is Composer.
Then you have Packagist (which is the main Composer repository).
And you can also manage your private/own repository using Satis.
By the way, a post from the author about What & Why Composer.
there is pecl for php, for php extensions.