php - Composer cannot find the package for new require within Yii2 composer.json -
ok, i'm using yii2 , trying add new requirement/library project. said library can found here: https://github.com/cyphix333/sbbcodeparser
it forked project added composer.json.
i tried adding requirement in projects main composer file, ie:
"require": { //.......... "samclarke/sbb-code-parser": "*" }, then ran:
composer update it complained couldn't find package or version of it.
then removed line , tried:
require samclarke/sbb-code-parser i have files in yii vendor folder located at: @app/vendor/samclarke/sbb-code-parser
i'm pretty new composer , not sure i'm doing wrong or how composer supposed know files based on package name.
the package samclarke/sbb-code-parser can found @ packagist. https://packagist.org/packages/samclarke/sbb-code-parser
by default composer tries resolve stableset of packages. packages doesn't provide stable version (version tag), yet - dev-master version exists. composer can not resolve it. in order require it, need lower minimum-stability package development.
you might 1 package explicitly:
"require": { "samclarke/sbb-code-parser": "dev-master@dev" }, or packages setting:
"minimum-stability": "dev" the package cyphix333/sbbcodeparser not on packagist. it's private fork. if want code. might add repositories section composer.json , add repo url , type vcs there. composer can load package vcs repository on @ github. described here: https://getcomposer.org/doc/05-repositories.md#loading-a-package-from-a-vcs-repository
that work this:
{ "repositories": [ { "type": "vcs", "url": "https://github.com/cyphix333/sbbcodeparser" } ], "require": { "samclarke/sbb-code-parser": "dev-master" } } but unfortunately, fork not maintained , doesn't contain valid composer.json file.
[composer\repository\invalidrepositoryexception] no valid composer.json found in branch or tag of https://github.com/cyphix333/sbbcodeparser, not load package it. this needs fixed first....
Comments
Post a Comment