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

Package not found #40

Closed
LCSKJ opened this issue May 4, 2017 · 10 comments
Closed

Package not found #40

LCSKJ opened this issue May 4, 2017 · 10 comments

Comments

@LCSKJ
Copy link

LCSKJ commented May 4, 2017

I am including the following package

bower-asset/scriptaculous-bower

from bower through asset-packagist which used to work since today. Now it gives a message that the package exists but is rejected by composer. I stripped down the composer.json to

{
    "name": "test/test",
    "require": {
        "bower-asset/scriptaculous-bower": "^1.9"
    },
    "repositories": [{
	"type": "composer",
	"url": "https://asset-packagist.org"
    }]
}

When running composer install I am receiving the following error message

The requested package bower-asset/scriptaculous-bower ^1.9 exists as bower-asset/scriptaculous-bower[1.9.0, 1.8.1, dev-master] but these are rejected by your constraint.

This used to work before, if I change the requirement to ^1.8 it works and 1.8.1 is installed. The message is kinda weird because 1.9.0 is present and composer even knows about it.
Not sure if it is a problem with asset-packagist, but nor the original bower package neither the entry at asset-packagist.org have changed lately.

@SilverFire
Copy link
Member

The problem occurred because of the recent changes in #31
For 1.9.0 was generated the following: "version_normalized":"dev-1.9.0-dev"
Reverting that change solved the problem.
@edgardmessias

@SilverFire SilverFire reopened this May 4, 2017
@SilverFire
Copy link
Member

@edgardmessias do you know why $package->getVersion() returned this value?

@edgardmessias
Copy link
Contributor

The problem occurs because of bower.json in the master contains version.

The code $repository->getPackages() return six packages:

Class Type Pretty Version Version
Fxp\Composer\AssetPlugin\Package\LazyCompletePackage 1.9.0 1.9.0.0
Fxp\Composer\AssetPlugin\Package\LazyCompletePackage 1.8.1 1.8.1.0
Composer\Package\AliasPackage 1.9.0 dev-1.9.0
Composer\Package\CompletePackage dev-master 9999999-dev
Composer\Package\AliasPackage 1.9.0 dev-1.9.0-dev
Composer\Package\CompletePackage dev-master 9999999-dev

The AliasPackage override LazyCompletePackage in loop

@edgardmessias
Copy link
Contributor

If run composer show bower-asset/scriptaculous-bower -a
show: versions : dev-master, 1.8.1, 1.9.0, but the 1.9.0 is dev-1.9.0-dev

That is, it is a BUG in fxp/composer-asset-plugin

@hiqsol hiqsol closed this as completed in b781661 May 5, 2017
hiqsol added a commit that referenced this issue May 5, 2017
@ctrlaltca
Copy link

ctrlaltca commented May 8, 2017

Looks like https://asset-packagist.org/p/bower-asset/scriptaculous-bower/272df73d58bc6d747a9187005aff5cb61e0ddd304020286e3082092f551b26e6.json is still reporting version dev-1.9.0-dev:

{
  "packages": {
    "bower-asset/scriptaculous-bower": {
      "1.9.0": {
        "uid": 1331895,
        "name": "bower-asset/scriptaculous-bower",
        "version": "1.9.0",
        "version_normalized": "dev-1.9.0-dev",
        "type": "bower-asset",

@edgardmessias
Copy link
Contributor

edgardmessias commented May 8, 2017

This change has not been for production.

@SilverFire @hiqsol , Do you have date to put this change into production?

@SilverFire
Copy link
Member

No, it is not deployed yet. Will do it during day

@hiqsol
Copy link
Member

hiqsol commented May 8, 2017

Sorry, not today, still several things to do.
But Wednesday definitively.

@LCSKJ
Copy link
Author

LCSKJ commented May 10, 2017

Thank you, works as expected.

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

No branches or pull requests

5 participants