borisrepl / boris

A tiny REPL for PHP
MIT License
2.15k stars 115 forks source link

Dependencies update as a patch update #97

Closed tomzx closed 9 years ago

tomzx commented 9 years ago

Hi,

In v1.0.9, ext-readline, ext-pcntl and ext-posix were moved from suggested to required, thus preventing any libraries that requires boris from installing if any of the extensions are not installed.

Considering the history of the composer.json file, and that the previous commit message (from v1.0.5 to v1.0.8) is Move PHP-ext from require to suggest section in composer.json, I'm curious as to what lead to this change. I'm assuming that require was the proper way to do it and not suggest.

paulrblakey commented 9 years ago

yes, this is causing quite an inconvineince for any laravel based applications.

paulrblakey commented 9 years ago

To work around it (at least as far as wildcard dependents are concerned) just require an earlier version in your root composer.json.

    "d11wtq/boris": "v1.0.8"
d11wtq commented 9 years ago

Ok, thanks guys, I think this should be reverted.

d11wtq commented 9 years ago

Here's the commit. Granted, the original wording in the file wasn't ideal.

4be0ba9e1d2244725035ec22a722fb804dae1410

bobthecow commented 9 years ago

Boris was absolutely right to list their dependencies as actual dependencies. It's more a limitation of composer that's creating a bad user experience here.

It seems like composer should be extended to allow optional or conditional dependencies. In Laravel's case, they want to install Boris unless the system can't support it, in which case they fall back. But "suggest" is toothless; it won't do anything other than spit out some text on the command line.

paulrblakey commented 9 years ago

Having thought about it and investigated a little more, the laravel\framework (v4.2 as 5.0 has moved to a different repl provider) is probably the correct place for them to be making the requirement change.

GrahamCampbell commented 9 years ago

yes, this is causing quite an inconvineince for any laravel based applications.

That's exactly the reason why I moved Laravel off boris.

grrava commented 9 years ago

I tried the workaround but I get this:

paulrblakey commented 9 years ago

Yeah I get that too, but the source download work subsequently.

grrava commented 9 years ago

This is what I get:

However the machine I'm running this on is not mine so I'm reluctant to enter my credentials.

paulrblakey commented 9 years ago

try adding this to your composer.json

"repositories":[
    {
        "type": "vcs",
        "url": "https://github.com/borisrepl/boris"
    }
],

I did a quick test with it and it seemed to pull the package via https rather than ssh. (your results may vary)

tomandersen commented 9 years ago

Heroku installs of laravel apps dont work for us, it seems due to the name change on the repo. Many github calls with /d11wtq/ in the path get redirected, but the api.github.com does not seem to do the redirect? Not a composer expert here.

grrava commented 9 years ago

Alas, then I get this:

Could not fetch https://api.github.com/repos/borisrepl/boris, enter your GitHub credentials to go over the API rate limit

paulrblakey commented 9 years ago

Don't know what to suggest then, sorry man. :(

Lidbetter commented 9 years ago

@tomandersen @paulrblakey

Here is the temporary fix which worked for me and builds on heroku, hopefully the packagist page can be updated or aliased something!

"repositories":[
    {
        "type": "vcs",
        "url": "https://github.com/borisrepl/boris",
        "vendor-alias": "d11wtq"
    }
],
"require": {
    "d11wtq/boris": "1.0.10",
}
tejasmanohar commented 9 years ago

@grrava @paulrblakey @tomandersen @Lidbetter This is the issue as #98. I'll have to wait on @d11wtq to address it.

codeslaw commented 9 years ago

@Lidbetter That is not working for me on Heroku as of 5 minutes ago. Do you know if they manage an internal cache of packagist repos, that perhaps might not be correctly purging?

tejasmanohar commented 9 years ago

@codeslaw I tweeted to them to see, they generally respond to support requests like this, but that is possible. Other than, that I personally am not sure what to do since it is working locally.

@dhotson @d11wtq any thoughts?

tejasmanohar commented 9 years ago

@codeslaw Any luck now? https://twitter.com/jmccartie/status/574019112214663168

codeslaw commented 9 years ago

@tejasmanohar everything's working now, it seems that there's an issue with composer installing a package from source when deploying to Heroku via SSH, as opposed to git push. Pushing once via git works, and also populates the local composer cache with all your packages, so subsequent deploys via SSH will work as long as the versions don't bump. I take it at some point some proxy cache will cycle, and it won't be a problem either way.

Thanks for looking into this though!

tejasmanohar commented 9 years ago

alrighty :)

guilhermemacedo commented 9 years ago

The only way it worked for me was adding the following code to composer.json

"repositories": [
        {
            "type": "package",
            "package": {
                "name": "d11wtq/boris",
                "version": "1.0.10",
                "dist": {
                    "url": "https://github.com/borisrepl/boris/archive/v1.0.10.zip",
                    "type": "zip"
                }
            }
        }
    ],
    "require": {
        "d11wtq/boris": "1.0.10",
        "laravel/framework": "4.1.*"
    }