The official address:https://getcomposer.org/doc/05-repositories.md#path
When I want to require my project, the following errors shows up:
The requested package mvc-php/framework could not be found in any version, there may be a typo in the package name.
The “mvc-php/framework” is a git folder.
Require?instead of just the branch name, you must require branchName@dev
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
{ "name": "mvc-php/app", "repositories": [ { "type": "path", "url": "/Users/youri/Documents/Github/framework" } ], "require": { "php": ">=7.0", "mvc-php/framework": "master@dev" }, "autoload": { "psr-4": { "App\\": "app/" } } } |
Project i want to require:
1 2 3 4 5 6 7 8 9 10 11 12 |
{ "name": "mvc-php/framework", "description": "PHP MVC framework", "autoload": { "psr-4": { "Mvc\\" : "src/" } }, "require": { "php": ">=7.0" } } |