joni-jones / yii2-wschat

Online chat based on web sockets
MIT License
99 stars 43 forks source link

Unable to install via composer "[UnexpectedValueException] Could not parse version constraint <=2.*: Invalid version string "2.*" #12

Closed rajeev1985sh closed 9 years ago

rajeev1985sh commented 9 years ago

I am using yii2 2.0.5 version and when try to install your extension via composer got following error.

nearyou@nearyou-desktop:/var/www/eventnew$ composer require --prefer-dist joni-jones/yii2-wschat "*" ./composer.json has been updated Loading composer repositories with package information Updating dependencies (including require-dev)

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

require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-update] [--update-no-dev] [--update-with-dependencies] [--ignore-platform-reqs] [--sort-packages] [packages1] ... [packagesN]

nearyou@nearyou-desktop:/var/www/eventnew$ composer update Loading composer repositories with package information Updating dependencies (including require-dev)

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

update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-plugins] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--with-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [packages1] ... [packagesN]

Can please help me and figure it out what mistake i am making, thanks.

joni-jones commented 9 years ago

@coder-man, please, add your composer.json file, because I can't reproduce your error(tried stable and dev stabilities).

rajeev1985sh commented 9 years ago

{ "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.4", "yiisoft/yii2-bootstrap": "", "yiisoft/yii2-swiftmailer": "", "oncesk/yii-node-socket" : "2.0.4", "dmstr/yii2-adminlte-asset": "2.", "yiisoft/yii2-jui": "2.0.@dev", "kartik-v/yii2-widgets": "", "fxp/composer-asset-plugin": "~1.0@dev", "sintret/yii2-chat-adminlte": "dev-master",
"joni-jones/yii2-wschat": "
" }, "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" } } }

rajeev1985sh commented 9 years ago

Please guide me to what composer command with options, i need to run for proper installation of you extension. Thanks

joni-jones commented 9 years ago

Your problem not related to chat package, please recheck "dmstr/yii2-adminlte-asset": "2.", this line is incorrect. Should be 2.* instead 2..

rajeev1985sh commented 9 years ago

Ok, thanks for pointing out the issue, its "2.*" in composer file may copy paste issue, still having the same issue, well thanks its not related to your package, will try with fresh installation Again thanks for your help.

joni-jones commented 9 years ago

You have another issues in the composer file: "yiisoft/yii2-codeception": "" should be "yiisoft/yii2-codeception": "*" and many others.