title: UnexpectedValueException: Could not parse version constraint >=~2: Invalid version string "~2"
body: <p>I'd tried:</p>
  
  <ol>
  <li><p>composer global update</p></li>
  <li><p>composer selfupdate</p></li>
  <li><p>composer update</p></li>
  </ol>
  
  <p>I got error at 3rd step.</p>
  
  <p>I run php 7. Building a webpage use Yii2.
  I had run "composer update" successfully in the past (as I remember, that is before updating php to 7)</p>
  
  <p>Below is my composer.json </p>
  
  <pre><code>{
      "name": "yiisoft/yii2-app-basic",
      "description": "Yii 2 Basic Project Template",
      "keywords": ["yii2", "framework", "basic", "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": "dev",
      "require": {
          "php": "&gt;=5.3.3",
          "yiisoft/yii2": "*",
          "yiisoft/yii2-authclient": "*",
          "yiisoft/yii2-bootstrap": "*",
          "yiisoft/yii2-swiftmailer": "*",
          "kartik-v/yii2-widget-datetimepicker": "*",
          "kartik-v/yii2-widget-select2": "@dev",
          "dektrium/yii2-user": "*",
          "philippfrenzel/yii2fullcalendar": "*",
          "kartik-v/yii2-widget-timepicker": "*",
          "kartik-v/yii2-widget-depdrop": "@dev",
          "wbraganca/yii2-dynamicform": "*",
          "kartik-v/yii2-widgets": "*",
          "kartik-v/yii2-grid": "@dev",
          "kartik-v/yii2-mpdf": "dev-master",
          "kartik-v/yii2-popover-x": "*",
          "kartik-v/yii2-krajee-base": "dev-master",
          "bluezed/yii2-scroll-top": "*",
          "kartik-v/yii2-icons": "@dev",
          "kartik-v/yii2-export": "*",
          "kartik-v/yii2-field-range": "*",
          "kartik-v/yii2-widget-typeahead": "*",
          "fxp/composer-asset-plugin": "*",
          "ext-gd": "*",
          "codemix/yii2-streamlog": "^1.0",
          "ext-intl": "*",
          "yii2mod/yii2-google-maps-markers": "*",
          "kartik-v/yii2-tabs-x": "*",
          "kartik-v/yii2-editable": "*",
          "kartik-v/yii2-money": "dev-master",
          "yiisoft/yii2-imagine": "*",
          "himiklab/yii2-recaptcha-widget": "*",
          "aws/aws-sdk-php": "^3.20",
          "aws/aws-php-sns-message-validator": "^1.1",
          "doctrine/cache": "^1.6",
          "fedemotta/yii2-aws-sdk": "*",
          "loveorigami/yii2-notification-wrapper": "*",
          "bower-asset/noty": "^2.3",
          "bower-asset/jquery-growl": "^1.3"
      },
      "require-dev": {
          "yiisoft/yii2-codeception": "*",
          "yiisoft/yii2-debug": "*",
          "yiisoft/yii2-gii": "*",
          "yiisoft/yii2-faker": "*"
      },
      "config": {
          "process-timeout": 1800
      },
      "scripts": {
          "post-create-project-cmd": [
              "yii\\composer\\Installer::postCreateProject"
          ]
      },
      "extra": {
          "yii\\composer\\Installer::postCreateProject": {
              "setPermission": [
                  {
                      "runtime": "0777",
                      "web/assets": "0777",
                      "yii": "0755"
                  }
              ],
              "generateCookieValidationKey": [
                  "config/web.php"
              ]
          },
          "asset-installer-paths": {
              "npm-asset-library": "vendor/npm",
              "bower-asset-library": "vendor/bower"
          }
      }
  }
  </code></pre>
  
  <p>Thank you.</p>