Unable to install my own package

3,577 views
Skip to first unread message

Jon Chambers

unread,
May 25, 2014, 1:40:05 PM5/25/14
to compose...@googlegroups.com
Windows 8.1
Composer version a115cfd0d8efbbc2b71a4e19101c6d0b64b6e15b 2014-05-22 07:44:01


Hello-

I can clone and update the repository but not install it.
Here is a link to the composer.json file.


php composer.phar require --prefer-dist "c006/yii2-submit-spinner" "*"
I also tried 
php composer.phar require --prefer-dist "c006/yii2-submit-spinner" "dev-master"


Have tried many different variations of the .json file without success.
Here is the error.

./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - The requested package c006/yii2-submit-spinner could not be found in any version

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minim


Installation failed, reverting ./composer.json to its original content.


Any help is appreciated.

Thanks.

Jordi Boggiano

unread,
May 25, 2014, 2:50:53 PM5/25/14
to compose...@googlegroups.com
Composer by default only knows about packages registered on
packagist.org, which your package is not. Github repos have nothing to
do with composer package names, so it's not good enough that your code
is hosted at github.com/c006/yii2-submit-spinner :)

Cheers

On 25/05/2014 19:40, Jon Chambers wrote:
> Windows 8.1
> Composer version a115cfd0d8efbbc2b71a4e19101c6d0b64b6e15b 2014-05-22
> 07:44:01
>
>
> Hello-
>
> I can clone and update the repository but not install it.
> Here is a link to the composer.json
> <https://github.com/c006/yii2-submit-spinner/blob/master/composer.json> file.
>
>
> php composer.phar require --prefer-dist "c006/yii2-submit-spinner" "*"
> I also tried
> php composer.phar require --prefer-dist "c006/yii2-submit-spinner"
> "dev-master"
>
>
> Have tried many different variations of the .json file without success.
> Here is the error.
>
> ./composer.json has been updated
> Loading composer repositories with package information
> Updating dependencies (including require-dev)
> Your requirements could not be resolved to an installable set of packages.
>
> Problem 1
> - The requested package c006/yii2-submit-spinner could not be found
> in any version
>
> Potential causes:
> - A typo in the package name
> - The package is not available in a stable-enough version according to
> your minim
> see
> <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for
>
> Read <http://getcomposer.org/doc/articles/troubleshooting.md> for
> further common p
>
> Installation failed, reverting ./composer.json to its original content.
>
>
> Any help is appreciated.
>
> Thanks.
>
> --
> You received this message because you are subscribed to the Google
> Groups "composer-users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to composer-user...@googlegroups.com
> <mailto:composer-user...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.


--
Jordi Boggiano
@seldaek - http://nelm.io/jordi

Jon Chambers

unread,
May 25, 2014, 3:45:39 PM5/25/14
to compose...@googlegroups.com
Ah-ha! I never would have figured  figured that out.
Thank you Jordi, just registered on packagist.org

Jon

Antonio Carlos Ribeiro

unread,
May 25, 2014, 5:09:44 PM5/25/14
to compose...@googlegroups.com
You can install your package even if it's not on packagist, just add it as a vcs repository to your application composer.json:

    "repositories": [
        {
            "type": "vcs",
        },
    ],

Require it 

    "require": {
        "c006/yii2-submit-spinner": "dev-master"
    },

And a 

   composer install

Should now work.



Antonio Carlos Ribeiro
a...@antoniocarlosribeiro.com

(+55) 21-9-8088-2233 (celular TIM)
(+55) 21-2556-3164 (fixo residencial)

skype: antoniocarlosribeiro

_______________

I must say I find television very educational. The minute somebody turns it on, I go to the library and read a good book. (Devo dizer que acho televisão muito educativo. Quando alguém a liga, vou à biblioteca e leio um bom livro.

(Groucho Marx)




--
You received this message because you are subscribed to the Google Groups "composer-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to composer-user...@googlegroups.com.

Jon Chambers

unread,
May 28, 2014, 5:56:18 PM5/28/14
to compose...@googlegroups.com
Thank you Antonio.
This method works great for private repositories.



On Sunday, May 25, 2014 10:40:05 AM UTC-7, Jon Chambers wrote:

Obaidah Khaleel

unread,
Jan 31, 2016, 7:55:13 AM1/31/16
to composer-users
Thank you Antonio you saved my time :)
Reply all
Reply to author
Forward
0 new messages