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

Could not parse version constraint <=1.3.x: Invalid version string "1.3.x" #236

Closed
yahorosh opened this issue Jun 30, 2016 · 7 comments
Closed
Assignees
Labels
Milestone

Comments

@yahorosh
Copy link

yahorosh commented Jun 30, 2016

Error when i try to install

composer require yevgen-grytsay/yii2-marionettejs -vv

Adding VCS repository bower-asset/marionette

Installation failed, reverting ./composer.json to its original content.


  [UnexpectedValueException]                                                  
  Could not parse version constraint <=1.3.x: Invalid version string "1.3.x"  

@francoispluchino
Copy link
Member

Try with the 1.2.x-dev version of this plugin.

@yahorosh
Copy link
Author

yahorosh commented Jun 30, 2016

Is this error it is permanent bug of composer-asset-plugin?
I found mention about this bug for 1.0.1 version.

What is wrong? Is it realy so difficult to fix it one time and forever?

I go to the Converter/SemverConverter and push this

...
    public function convertVersion($version)
    {
$version = preg_replace('\.x($|\s|-)', '$1', $version);
...

for install plugin. I think anyone who work with plugin more than one hour can to fix it more smarter. It is realy dolefully to solve similar problems instead programming.

@francoispluchino
Copy link
Member

I just try to install the bower-asset/marionette asset, and it's ok for me with the 1.2.x-dev version of this plugin and 1.1.3 version of Composer:

{
    "require": {
        "yevgen-grytsay/yii2-marionettejs": "*"
    }
}
$ composer install --prefer-dist
Loading composer repositories with package information
Updating dependencies (including require-dev)
  - Installing yiisoft/yii2-composer (2.0.4)
    Downloading: 100%

  - Installing bower-asset/jquery (2.2.4)
    Loading from cache

  - Installing bower-asset/underscore (1.8.3)
    Loading from cache

  - Installing bower-asset/backbone (1.3.3)
    Loading from cache

  - Installing bower-asset/backbone.wreqr (v1.3.7)
    Loading from cache

  - Installing bower-asset/backbone.babysitter (v0.1.12)
    Loading from cache

  - Installing bower-asset/marionette (v2.4.7)
    Loading from cache

  - Installing bower-asset/yii2-pjax (v2.0.6)
    Downloading: 100%

  - Installing bower-asset/punycode (v1.3.2)
    Downloading: 100%

  - Installing bower-asset/jquery.inputmask (3.2.7)
    Downloading: 100%

  - Installing cebe/markdown (1.1.0)
    Downloading: 100%

  - Installing ezyang/htmlpurifier (v4.7.0)
    Downloading: 100%

  - Installing yiisoft/yii2 (2.0.8)
    Downloading: 100%

  - Installing yevgen-grytsay/yii2-marionettejs (v1.0.0)
    Downloading: 100%

Writing lock file
Generating autoload files

@francoispluchino
Copy link
Member

francoispluchino commented Jul 1, 2016

It's fixed by #221 / #222, and has been merged for the current dev version.

@francoispluchino
Copy link
Member

The 1.2.0 stable version is release.

@mubat
Copy link

mubat commented Feb 16, 2017

francoispluchino, hi.
I have same issue when I trying to install bower-asset/fullcalendar:

#composer require bower-asset/fullcalendar
You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug

                                                                        
  [UnexpectedValueException]                                            
  Could not parse version constraint >=~2: Invalid version string "~2"  

Composer version - 1.2.2 2016-11-03 17:43:15
fxp/composer-asset-plugin version - v1.2.2

@francoispluchino francoispluchino self-assigned this Feb 16, 2017
@francoispluchino francoispluchino added this to the 1.3.0 milestone Feb 16, 2017
@francoispluchino
Copy link
Member

Your problem is fixed in the 1.3.0@dev version.

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

3 participants