Giter Club home page Giter Club logo

Comments (8)

cordoval avatar cordoval commented on May 28, 2024

@stof why do you think this is not working at all?

from php-github-api.

adanlobato avatar adanlobato commented on May 28, 2024

I've tried to reproduce it, but I think it works fine for me. This is what I've run:

git clone https://github.com/cordoval/gush
cd gush
composer update

And this is what composer has installed:

  - Installing knplabs/github-api (dev-master 13cac64)
    Cloning 13cac64bfd92daf99c5b5b3c4c11471d5fed5d68

Have you tried clearing composer's cache at ~/.composer/cache/. I've sometimes solved weird issues by doing that.

from php-github-api.

cordoval avatar cordoval commented on May 28, 2024

the command is

composer global require 'cordoval/gush=dev-master'

thanks for your time @adanlobato

from php-github-api.

adanlobato avatar adanlobato commented on May 28, 2024

Hey! I think I've found your problem, try the following:

composer global require 'cordoval/gush=dev-master' 'knplabs/github-api=@dev'

Probably it's going to work fine now. The problem is that when you run composer global require it is the same as running composer require on ~/.composer/. So when you require packages globally you're appending them to your ~/.composer/composer.json file, which acts as a normal project composer.json.

In other words, the result of running your command would be your global composer.json being as follows:

{
    "require": {
        "cordoval/gush": "dev-master"
    }
}

As you probably know, default minimum-stability in composer is stable, but your project relies on an unstable third-party package: knplabs/github-api. This means that you have two options:

The first one is switching minimum-stability globally to dev (we can add prefer-stable: true also). With this we will 'see' all available packages in all stabilities but only the most stable that match our requirements will be installed.

{
    "require": {
        "cordoval/gush": "dev-master"
    },
    "minimum-stability": "dev",
    "prefer-stable": true
}

The other option is enabling the dev channel only for our desired package, which results in:

{
    "require": {
        "cordoval/gush": "dev-master"
        "knplabs/github-api": "@dev"
    }
}

The command I gave you does this last option.

Summarizing, the problem is that packages are globally installed as dependencies, not root projects; so the problem is that the minimum-stability flag you've set in your project is not being propagated.

Hope this helps! :D

from php-github-api.

cordoval avatar cordoval commented on May 28, 2024

oh no no no no, this is not the solution, I already tried this all night and it is not the solution. If you check your @dev will give you 1.2.0 and not 1.3.x-dev which is the needed thing. I think at this point the only solution is to have @cursedcoder to actually tag semver properly since some bugs were fixed. Not sure why this is not done regularly.

from php-github-api.

cordoval avatar cordoval commented on May 28, 2024

it worked with composer global require 'cordoval/gush=dev-master' 'knplabs/github-api=@dev' but shows still the need for tagging bug fixes.

from php-github-api.

cursedcoder avatar cursedcoder commented on May 28, 2024

@cordoval check 1.2.1

from php-github-api.

cordoval avatar cordoval commented on May 28, 2024

thanks bunches @cursedcoder you rock! 👍 👶

from php-github-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.