php - How do I use my forked version of a repo in Composer? -
i working on project , ended having make small change 1 of packages i'm using.
that package is: shopifyextras/shopify-php-api-wrapper
can find here: https://github.com/shopifyextras/php-shopify-api-wrapper
my previous composer.json file looked this:
{ "require": { "monolog/monolog": "1.*", "shopifyextras/shopify-php-api-wrapper": "^1.1" }, "autoload": { "psr-0": { "myapp\\": "src/" } } }
after forking repo , making changes (i forgot create new branch first, created branch after committing master, , pushed github - don't think should cause issues given branch exists , point correct head), updated composer.json use fork.
after reading composer docs (https://getcomposer.org/doc/05-repositories.md#vcs) updated composer.json following:
{ "minimum-stability": "dev", "prefer-stable" : true, "repositories": [ { "type": "git", "url": "https://github.com/jonlaliberte/php-shopify-api-wrapper.git" } ], "require": { "monolog/monolog": "1.*", "shopifyextras/shopify-php-api-wrapper": "dev-risksbugfix" }, "autoload": { "psr-0": { "myapp\\": "src/" } } }
when run composer update receive following error:
$ composer update --verbose loading composer repositories package information updating dependencies (including require-dev) requirements not resolved installable set of packages. problem 1 - requested package shopifyextras/shopify-php-api-wrapper not found in version, there may typo in package name. potential causes: - typo in package name - package not available in stable-enough version according minimum-stability setting see <https://getcomposer.org/doc/04-schema.md#minimum-stability> more details. read <https://getcomposer.org/doc/articles/troubleshooting.md> further common problems.
i have tried:
using "risksbugfix" instead of "dev-risksbugfix"
using type "vcs" instead of git"
removing ".git" repo url
using "jonlaliberte/shopify-php-api-wrapper" instead of "shopifyextras/shopify-php-api-wrapper"
any appreciated. thanks!
if alias non-comparable version (such
dev-develop
)dev-
must prefix branch name.
you branch non-comparable version dev-riskbugfix
.
you might need prefix dev-
: dev-dev-riskbugfix
.
or rename branch riskbugfix
, rid of dev-
, alias dev-riskbugfix
.
Comments
Post a Comment