1

I developed a Laravel 5.5 package with package auto discovery and pushed it at git hub

https://github.com/adamibrahim/authconfirm

when i run

$ composer require "adamibrahim/authconfirm" : "v0.1.1"

I got an error

could not find package adamibrahim/authconfirm at any version for your min ...

do i need to register my repository somewhere so i can use composer require command ?

here is my package composer.json

{
"name": "adamibrahim/authconfirm",
"type": "library",
"description": ":Laravel 5.5 Auth modifications to confirm the auth email",
"keywords": [
    "Laravel5.5",
    "Auth",
],
"homepage": "https://github.com/adamibrahim/authconfirm",
"license": "MIT",
"authors": [
    {
        "name": ":Adam Ibrahim",
        "email": ":adamibrahim1701@gmail.com",
        "homepage": ":author_website",
        "role": "Developer"
    }
],
"require": {
    "illuminate/support": "~5.1",
    "php" : "~5.6|~7.0"
},
"require-dev": {
    "phpunit/phpunit" : ">=5.4.3",
    "squizlabs/php_codesniffer": "^2.3"
},
"autoload": {
    "psr-4": {
        "Adamibrahim\\Authconfirm\\": "src"
    }
},
"autoload-dev": {
    "psr-4": {
        "Adamibrahim\\Authconfirm\\": "tests"
    }
},
"extra": {
    "branch-alias": {
        "dev-master": "1.0-dev"
    }
},
"config": {
    "sort-packages": true
}
}
Adam Ibrahim
  • 95
  • 1
  • 10

1 Answers1

3

Well, it's not enough just to create Github repository to use it via composer. You should create account at https://packagist.org/ and add your package in there to make it available via composer require.

In addition you should setup Packagist integration on Github at:

https://github.com/adamibrahim/authconfirm/settings/installations

to make sure after changes in Github Packagist will see those changes.

Marcin Nabiałek
  • 109,655
  • 42
  • 258
  • 291
  • Thanks for response will check that , and give a try – Adam Ibrahim Dec 25 '17 at 10:41
  • Of course, you do this when you are ready to publish to packagist. Until then, you can install using composer directly from Github, or some other repositories. Details on how to do this can be found here: https://getcomposer.org/doc/05-repositories.md#vcs – Jason Jan 15 '18 at 14:27