teamreflex / oauth2-discord

OAuth2 client for authenticating with the Discord API servers
MIT License
61 stars 26 forks source link

Compser require error #5

Closed norfair00 closed 8 years ago

norfair00 commented 8 years ago
composer require team-reflex/oauth2-discord

  [InvalidArgumentException]
  Could not find package team-reflex/oauth2-discord at any version for your minimum-stability (dev). Check the package spelling or your minimum-stability

require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-update] [--update-no-dev] [--update-with-dependencies] [--ignore-platform-reqs] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--] [<packages>]...
norfair00 commented 8 years ago

? ? ? ? ? ? ? ? ? ?

Dahara2012 commented 8 years ago

same for me

VVSidorov commented 8 years ago

Had the same issue, change to the directory with the composer.json file and run composer install. It should download all the dependancies to the vendor folder.

davidcole1340 commented 8 years ago

That's because your minimum-stability is not set to dev. I've pushed a version, can you remove it from your composer.json if it is there and try to require it again?

VVSidorov commented 8 years ago

Not seeing any recent updates. What needs to be removed from the composer.json file?

davidcole1340 commented 8 years ago

@VVSidorov Could you try just run composer install team-reflex/oauth2-discord?

VVSidorov commented 8 years ago

@uniquoooo I get the following error

Invalid argument team-reflex/oauth2-discord. Use "composer require team-reflex/oauth2-discord" instead to add packages to your composer.json.

However if I run composer install it downloads everything just fine.

davidcole1340 commented 8 years ago

@VVSidorov sorry, meant composer require team-reflex/oauth2-discord.

VVSidorov commented 8 years ago

@uniquoooo Here is the output I receive

Using version ^1.0 for team-reflex/oauth2-discord ./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 packag

Problem 1

  • Installation request for team-reflex/oauth2-discord dev-master -> satisfiable by team-reflex/oauth2-discord[dev-master].
  • Can only install one of: team-reflex/oauth2-discord[v1.0, dev-master].
  • Installation request for team-reflex/oauth2-discord ^1.0 -> satisfiable by team-reflex/oauth2-discord[v1.0].

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

davidcole1340 commented 8 years ago

@VVSidorov In your composer.json, can you remove team-reflex/oauth2-discord from the require section? Might look like this:

{
    "require": {
        "team-reflex/oauth2-discord": "dev-master"
    }
}

Just remove the "team-reflex/oauth2-discord": "dev-master".

VVSidorov commented 8 years ago

@uniquoooo My composer.json file currently looks like:

{
    "name": "team-reflex/oauth2-discord",
    "description": "OAuth2 client for authenticating with the Discord API servers",
    "license": "MIT",
    "authors": [
        {
            "name": "David Cole",
            "email": "david@team-reflex.com"
        }
    ],
    "autoload": {
        "psr-4": {
            "Discord\\OAuth\\": "src/Discord"
        }
    },
    "require": {
        "league/oauth2-client": "^1.3",
        "illuminate/support": "^5.2"
    },
    "require-dev": {
        "symfony/var-dumper": "^3.1",
        "phpunit/phpunit": "~4.0",
        "mockery/mockery": "^0.9.5",
        "satooshi/php-coveralls": "^1.0"
    }
}

No changes have been made after a git clone

davidcole1340 commented 8 years ago

Oh, have you cloned the repository? You should make a new project folder and create a file called composer.json with the following content:

{
    "require": {
        "team-reflex/oauth2-discord": "^1.0"
    }
}

Once you do that, run composer install.

VVSidorov commented 8 years ago

@uniquoooo Got it! Thank you! Haven't worked with compser before so thank you for clearing that up.

After creating a new project folder, and adding the composer.json file with

{
    "require": {
        "team-reflex/oauth2-discord": "^1.0"
    }
}

I ran composer install and composer require team-reflex/oauth2-discord both worked perfectly without flaws.

Thank you!