yiisoft / yii2-gii

Yii 2 Gii Extension
http://www.yiiframework.com
BSD 3-Clause "New" or "Revised" License
202 stars 192 forks source link

Composer dependency problem #177

Closed yii-bot closed 8 years ago

yii-bot commented 8 years ago

This issue has originally been reported by @Ziggizag at https://github.com/yiisoft/yii2/issues/12140. Moved here by @samdark.


There is a dependency issue while installing project with Composer:

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

  Problem 1
    - yiisoft/yii2-gii 2.0.5 requires bower-asset/typeahead.js 0.10.* | ~0.11.0 -> no matching package found.
    - yiisoft/yii2-gii 2.0.4 requires bower-asset/typeahead.js 0.10.* -> no matching package found.
    - yiisoft/yii2-gii 2.0.3 requires bower-asset/typeahead.js 0.10.* -> no matching package found.
    - yiisoft/yii2-gii 2.0.2 requires bower-asset/typeahead.js 0.10.* -> no matching package found.
    - yiisoft/yii2-gii 2.0.1 requires bower-asset/typeahead.js 0.10.* -> no matching package found.
    - yiisoft/yii2-gii 2.0.0 requires bower-asset/typeahead.js 0.10.* -> no matching package found.
    - Installation request for yiisoft/yii2-gii * -> satisfiable by yiisoft/yii2-gii[2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.0.5].

The issue is becaus typeahead.js 0.11.0 was release candidate. The stable version is 0.11.1. Please correct this asap within Gii's composer.json as we cannot install stable packages.

samdark commented 8 years ago

@Ziggizag it's curerntly 0.10.* | ~0.11.0 in Gii's composer.json so it should work well with 0.11.0. Are you sure you have fxp plugin installed globally?

Ziggizag commented 8 years ago

Sure, and there was no issue for the time being.

Ziggizag commented 8 years ago

FYI - this is my project's composer.json:


{
    "name": "yiisoft/yii2-app-advanced",
    "description": "Yii 2 Advanced Project Template",
    "keywords": ["yii2", "framework", "advanced", "project template"],
    "homepage": "http://www.yiiframework.com/",
    "type": "project",
    "license": "BSD-3-Clause",
    "support": {
        "issues": "https://github.com/yiisoft/yii2/issues?state=open",
        "forum": "http://www.yiiframework.com/forum/",
        "wiki": "http://www.yiiframework.com/wiki/",
        "irc": "irc://irc.freenode.net/yii",
        "source": "https://github.com/yiisoft/yii2"
    },
    "minimum-stability": "stable",
    "require": {
        "php": ">=5.4.0",
        "yiisoft/yii2": ">=2.0.6",
        "yiisoft/yii2-bootstrap": "*",
        "yiisoft/yii2-swiftmailer": "*",
        "yiisoft/yii2-mongodb": "~2.1.0",
        "dektrium/yii2-rbac": "^0.3.0",
        "dektrium/yii2-user": "0.9.*@dev",
        "kartik-v/yii2-dynagrid": "@dev",
        "warrence/yii2-kartikgii": "dev-master",
        "kartik-v/yii2-mpdf": "@dev",
        "lajax/yii2-translate-manager": "1.*",
        "omnilight/yii2-shopping-cart": "*",
        "omgdef/yii2-multilingual-behavior": "^2.1",
        "dmstr/yii2-adminlte-asset": "*",
        "yiisoft/yii2-imagine": "^2.0",
        "kartik-v/yii2-editable": "*",
        "2amigos/yii2-ckeditor-widget": "~1.0",
        "kartik-v/yii2-tabs-x": "*",
        "moonlandsoft/yii2-phpexcel": "*",
        "mootensai/yii2-enhanced-gii": "dev-master",
        "smsapi/php-client": "^1.7",
        "mongosoft/yii2-upload-behavior": "*",
        "c006/yii2-migration-utility": "dev-master"
    },
    "require-dev": {
        "yiisoft/yii2-codeception": "*",
        "yiisoft/yii2-debug": "*",
        "yiisoft/yii2-gii": "*",
        "yiisoft/yii2-faker": "*"
    },
    "config": {
        "process-timeout": 1800
    },
    "extra": {
        "asset-installer-paths": {
            "npm-asset-library": "vendor/npm",
            "bower-asset-library": "vendor/bower"
        }
    }
}
rob006 commented 8 years ago

Try remove "minimum-stability": "stable",.

Ziggizag commented 8 years ago

I know, but this is a requirement actually - I need stable releases for this project.

Ziggizag commented 8 years ago

BTW

This are my global Composer configuration:

C:\Users\ZIGGI\AppData\Roaming\Composer>composer show -i
You are using the deprecated option "installed". Only installed packages are shown by default now. The --all option can be used to show all packages.
fxp/composer-asset-plugin    dev-master 8d74bc7 NPM/Bower Dependency Manager for Composer
pdepend/pdepend              2.2.4              Official version of pdepend to be handled with Composer
phpmd/phpmd                  2.4.3              PHPMD is a spin-off project of PHP Depend and aims to be a PHP equivalent of the well kn...
squizlabs/php_codesniffer    2.6.1              PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defi...
symfony/config               v3.1.2             Symfony Config Component
symfony/dependency-injection v3.1.2             Symfony DependencyInjection Component
symfony/filesystem           v3.1.2             Symfony Filesystem Component
samdark commented 8 years ago

I'm conducting a test. Will be back in 15 minutes.

Ziggizag commented 8 years ago

Waiting, sir !

rob006 commented 8 years ago

I know, but this is a requirement actually - I need stable releases for this project.

Then why you have so many @dev in your composer.json? :)

0.11 is technically no stable release.

Ziggizag commented 8 years ago

Then why you have so many @dev in your composer.json? :)

Hehe - it is project I joined. I believe other developers made their life easier :-)

samdark commented 8 years ago

Installed your composer.json without problems. No errors, everything's in place.

Try deleting whole vendor dir and starting over just in case.

Ziggizag commented 8 years ago

Hmm...

Ziggizag commented 8 years ago

There is yet no "vendor" folder - it failed before it was even created!

Ziggizag commented 8 years ago

Hmm,

It fails even after removing this "minimum-stability": "stable", line :-(

Ziggizag commented 8 years ago

Hmm,

Finally I run composer global update, It updated fxp Updating fxp/composer-asset-plugin dev-master (8d74bc7 => d7d189e)

And now it passed through!