Composer require local package
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I've got a couple of libraries [Foo and Bar] that I'm developing in concert, but are still technically separate things. Previously I've just re-defined the autoloader to like "Foo\\": "../Foo/src" , but now that I've added a Guzzle dependency to Foo, Bar flips it's lid because it's not one of its dependencies. Directory structure: /home/user/src/ Foo/ src/ FooClient.php composer.json Bar/ src/ BarClient.php composer.json Theoretical Autoload Statement: [in Bar/composer.json] "require": { "local": "../Foo/composer.json" } Example code: