hettiger's avatar

Need help with composer minimum-stability

I know, it's not really Laravel related. Well at least I'm looking for help with a Laravel package :-)

Anyways: Hopefully someone can enlight me:

https://github.com/hettiger/larawire/issues/1

bildschirmfoto 2014-12-02 um 22 21 20

I'm not sure how to satisfy composer here. The maintainer of ProcessWire doesn't use composer and his releases are off. I forked his project and used the fork within my composer.json file to have correct versioning. I don't really want to put a fork on packagist. Any ideas?

Thanks in advance for your replies.

0 likes
5 replies
NoorDeen's avatar

maybe this ryancramerdesign/processware 2.5.* in development . if you are working in project that will not go to production change composer.json to :

"minimum-stability" : "dev",
"prefer-stable" : true

composer documentation this will install the package if its in development release and if there is any package in stable release it will install that stable release instead .

1 like
hettiger's avatar

Hey there, thanks for the replies and sorry I'm getting back so late.

I've tried my best to fix this using your suggestions but no success. It seems like the laravel composer.json file ignores this block within my package:

    "repositories": [
        {
            "type": "package",
            "package": {
                "name": "ryancramerdesign/processwire",
                "version": "master",
                "source": {
                    "url": "git@github.com:ryancramerdesign/ProcessWire.git",
                    "type": "git",
                    "reference": "origin/master"
                }
            }
        }
    ],

Result is that it can't be found by composer unless i copy that part into laravels composer.json file. If i do so I'll also have to set the following:

"minimum-stability" : "dev",
"prefer-stable" : true

Don't get me wrong, I'm totally fine setting this in my own packages composer.json file. But I don't want to force users to do this in their laravel composer.json files.

I'll introduce people to require ryancramerdesign/processwire using the repositories config in their laravel composer.json file. This should work, anyways I hope anyone will get back to me with a better solution.

nzogo's avatar

@hettiger from my understang you can only composer require the public packages from packagist composer require is automatically fetch the package name from packagist.org site only not from other places that's why when you have a custom package you have to instruct composer where to find that package whether is a path or git url

nzogo's avatar

so if you need it to be found like that it is only by publishing it to packagist i guess

Please or to participate in this conversation.