composer.json while developing extension

Hi.

I’m developing an extension for Yii2 (it already exists, to be precise).

So this is the exension composer.json:


{

    "name": "maxxer/fastreader",

    "type": "yii2-extension",

    "require": {

        "yiisoft/yii2": ">=2.0.4",

        "kartik-v/yii2-widget-depdrop": ">=1.0.1",

        "garyjl/yii2-simple_html_dom": "*"

    },

    "license": "GPLv3",

    "authors": [

        {

            "name": "Lorenzo Milesi"

        }

    ],

    "minimum-stability": "stable",

    "autoload": {

        "psr-4": {

            "maxxer\\fastreader\\": ""

        }

    }


}

then I install a yii2 basic app, add a local path repository and add




"maxxer/fastreader": "@dev"



to the “require” part. Then I do composer update, but it complains that garyjl/yii2-simple_html_dom is available only as dev-master, which conflicts with my minimum stability. I can set app’s stability to “dev”, but that would update Yii2 too as well to dev, which is not what I want.

I could also manually tweak app’s autoloader and manually copy or link the extension, but I’d rather understand how to properly configure composer to do so :)

Any hint?

thanks

after better reading composer specs, I ended up adding the plugin requirement as an explicit dependency of the main app, with the "@dev" stability.

Another option is to change minimum-stability to "dev" and use


composer install

instead of


update

.