Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems resolving dependencies, when new releases without version prefix have been added #115

Closed
schmunk42 opened this issue May 19, 2015 · 2 comments
Labels

Comments

@schmunk42
Copy link
Contributor

I am experiencing composer update issues with a certain bower-asset plugin.

composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - 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.
    - Removal request for yiisoft/yii2-gii == 2.0.9999999.9999999-dev
    - Installation request for yiisoft/yii2-gii 2.* -> satisfiable by yiisoft/yii2-gii[2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.0.x-dev].

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.

Read <http://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

While not having any of the usual problems, I noticed this:

$ composer show bower-asset/typeahead.js
name     : bower-asset/typeahead.js
descrip. :                                              
keywords : 
versions : dev-master, * v0.11.1, v0.11.0, v0.10.5, v0.10.4, v0.10.3, v0.10.2, v0.10.1, v0.10.0, v0.9.3, v0.9.2, v0.9.1, v0.9.0, v0.8.2, v0.8.1, v0.8.0, 0.11.1, dev-integration-0.11.2
type     : bower-asset-library
source   : [git] https://github.com/twitter/typeahead.js.git 588440f66559714280628a4f9799f0c4eb880a4a
dist     : [zip] https://api.github.com/repos/twitter/typeahead.js/zipball/588440f66559714280628a4f9799f0c4eb880a4a 588440f66559714280628a4f9799f0c4eb880a4a
names    : bower-asset/typeahead.js

requires
bower-asset/jquery >=1.7

requires (dev)
bower-asset/jquery ~1.7
bower-asset/jasmine-ajax ~1.3.1
bower-asset/jasmine-jquery ~1.5.2

There's a 0.11.1 tag in the versions list.

Could it be that this tag makes the asset-plugin stop scanning tags with v prefix?

I tried to fix this by using an alias, but this one does not work:

"bower-asset/typeahead.js": "v0.10.5 as 0.10.5",

This one worked:

"bower-asset/typeahead.js": "0.11.1 as 0.10.99",

Related issues:

Fix - in my case:

"yiisoft/yii2-gii": "dev-master",
@francoispluchino
Copy link
Member

I use your constraint of dependency for do the tests (install and install+update), and the 2 tests are passed with successfully:

Install test:

{
    "require": {
        "bower-asset/typeahead.js": "0.10.* | ~0.11.0"
    }
}
$ composer install --prefer-dist
Loading composer repositories with package information
Installing dependencies (including require-dev)
  - Installing bower-asset/jquery (2.1.4)
    Downloading: 100%
    Extracting archive

  - Installing bower-asset/typeahead.js (v0.11.1)
    Downloading: 100%
    Extracting archive

Writing lock file
Generating autoload files

Update test:

{
    "require": {
        "bower-asset/typeahead.js": "0.10.*"
    }
}
$ composer install --prefer-dist
Loading composer repositories with package information
Installing dependencies (including require-dev)
  - Installing bower-asset/jquery (2.1.4)
    Downloading: 100%
    Extracting archive

  - Installing bower-asset/typeahead.js (v0.10.5)
    Downloading: 100%
    Extracting archive

Writing lock file
Generating autoload files

Update:

{
    "require": {
        "bower-asset/typeahead.js": "0.10.* | ~0.11.0"
    }
}
$ composer update --prefer-dist -v
Loading composer repositories with package information
Updating dependencies (including require-dev)
Adding VCS repository bower-asset/jquery
Adding VCS repository bower-asset/typeahead.js
Reading bower.json of bower-asset/typeahead.js (v0.11.1)
Importing tag v0.11.1 (0.11.1.0)
Reading bower.json of bower-asset/typeahead.js (v0.11.0)
Importing tag v0.11.0 (0.11.0.0)
  - Removing bower-asset/typeahead.js (v0.10.5)
  - Installing bower-asset/typeahead.js (v0.11.1)
    Loading from cache
    Extracting archive

Writing lock file
Generating autoload files

The tag versions with v prefix or without prefix are scanned, it's the standard behavior of Composer. Do you use the latest stable version of the plugin?

@schmunk42
Copy link
Contributor Author

Fixed for me. The only thing that worked in the end was removing my entire vendor folder.

Before that I tried to update the plugin, removed lock-file, removed all composer caches(!), removed all bower packages and gii. Did not help - just for reference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants