kartik-v / yii2-grid

Enhanced GridView with various utilities for Yii Framework 2.0
http://demos.krajee.com/grid
Other
556 stars 302 forks source link

Dependencies fail to install for Yii 2.0.0 stable install #97

Closed circulon closed 9 years ago

circulon commented 9 years ago

I have been struggling with this all day ;( As Yii is now at 2.0.0 stable I don't really want to go the minimum-stability:"dev" route. I have a virgin "basic" install with a couple of models and no other extensions

Following the installation instructions throws a slew of problems like

Your requirements could not be resolved to an installable set of packages.

Problem 1

Potential causes:

Got most dependencies to install separately via adding the to composer.json ala "require": { ... "kartik-v/yii2-widgets": "dev-master", "kartik-v/yii2-money": "dev-master", "kartik-v/yii2-slider": "dev-master", "kartik-v/yii2-checkbox-x": "dev-master", "kartik-v/yii2-editable": "dev-master", "kartik-v/yii2-popover-x": "dev-master", "kartik-v/yii2-grid": "dev-master" }

popover-x will not install at all even via this method

What else can I try?

kartik-v commented 9 years ago

These extensions will undergo a bit more change as enhancements are planned. Hence a stable release is not yet set for these. This will eventually happen not very late from now... since the stable version of yii has been released.

Would suggest to carefully set the minimum stability - because this will be set across all extensions you use. If doing this, you should set the versions of various dependencies/extensions carefully using the @ pattern.

circulon commented 9 years ago

As it turns out keeping 'stable' is recommended as per this article https://igor.io/2013/02/07/composer-stability-flags.html

so to use yii2 and its dependencies as stable and yours as dev here is what I did in composer.json

"minimum-stability": "stable",
"require": {
    "php": ">=5.4.0",
    "yiisoft/yii2": "*",
    "yiisoft/yii2-bootstrap": "*",
    "yiisoft/yii2-swiftmailer": "*",
    "kartik-v/yii2-detail-view": "dev-master",
    "kartik-v/yii2-grid": "dev-master",
    "kartik-v/yii2-widgets": "@dev",
    "kartik-v/yii2-money": "@dev",
    "kartik-v/yii2-slider": "@dev",
    "kartik-v/yii2-checkbox-x": "@dev",
    "kartik-v/bootstrap-popover-x": "@dev",
    "kartik-v/yii2-popover-x": "@dev",
    "kartik-v/yii2-editable": "@dev"

...}

This works perfectly and it does not pull in dev versions of the main framework and its dependencies For those of us who are using your extension and the stable version off yii2 you might want to note this on the installation page possibly.

Excellent extensions BTW Keep up the good work

kartik-v commented 9 years ago

Great you got this resolved. I will put up a wiki for this once I get time for benefit of others.

kartik-v commented 9 years ago

I created a web tip / wiki for this for the benefit of others.

circulon commented 9 years ago

Hey Nice work

I’m sure this will help many devs that are just getting a handle on composer dependencies

Thanks again

On 25 Oct 2014, at 2:24 am, Kartik Visweswaran notifications@github.com wrote:

I created a web tip/wiki http://webtips.krajee.com/setting-composer-minimum-stability-application/ on this for benefit of others.

— Reply to this email directly or view it on GitHub https://github.com/kartik-v/yii2-grid/issues/97#issuecomment-60428768.