phphighchartsyii2yii2-advanced-app

Yii2 unable to install hightcharts widget as composer is giving errors


I am trying to install Yii2 Hightcharts Widget via composer. But it's not allowing me to install and giving some errors.

Install Command

composer require miloschuman/yii2-highcharts-widget

Problem

E:\xampp\htdocs\lesco>composer require miloschuman/yii2-highcharts-widget
The "yiisoft/yii2-composer" plugin was skipped because it requires a Plugin API version ("^1.0") that does not match your Composer installation ("2.3.0"). You may need to run composer update with the "--no-plugins" option.
./composer.json has been updated
The "yiisoft/yii2-composer" plugin was skipped because it requires a Plugin API version ("^1.0") that does not match your Composer installation ("2.3.0"). You may need to run composer update with the "--no-plugins" option.
Running composer update miloschuman/yii2-highcharts-widget
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

Problem 1
- phpoffice/phpspreadsheet is locked to version 1.10.1 and an update of this package was not requested.
- phpoffice/phpspreadsheet 1.10.1 requires php ^7.1 -> your php version (8.0.25) does not satisfy that requirement.
Problem 2
- codeception/base is locked to version 2.5.x-dev and an update of this package was not requested.
- codeception/base 2.5.x-dev requires php >=5.6.0 <8.0 -> your php version (8.0.25) does not satisfy that requirement.
Problem 3
- symfony/var-dumper v4.2.0 requires php ^7.1.3 -> your php version (8.0.25) does not satisfy that requirement.
- luoxiaojun1992/yii2-tinker dev-master requires symfony/var-dumper 4.2.0 -> satisfiable by symfony/var-dumper[v4.2.0].
- luoxiaojun1992/yii2-tinker is locked to version dev-master and an update of this package was not requested.

You can also try re-running composer require with an explicit version constraint, e.g. "composer require miloschuman/yii2-highcharts-widget:*" to figure out if any version is installable, or "composer require miloschuman/yii2-highcharts-widget:^2.1" if you know which you need.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

Composer.json File

{
"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": "dev",
"require": {
    "php": ">=5.4.0",
    "yiisoft/yii2": "~2.0.13",
    "yiisoft/yii2-bootstrap": "~2.0.0",
    "yiisoft/yii2-swiftmailer": "~2.0.0",
    "luoxiaojun1992/yii2-tinker": "*",
    "kartik-v/yii2-grid": "@dev",
    "kartik-v/yii2-widget-select2": "@dev",
    "kartik-v/yii2-mpdf": "dev-master",
    "moonlandsoft/yii2-phpexcel": "*",
    "nirvana-msu/yii2-showloading": "1.0.*@dev",
    "kartik-v/yii2-krajee-base": "^2.0",
    "kartik-v/yii2-widget-spinner": "@dev",
    "edwinhaq/yii2-simple-loading": "*",
    "c006/yii2-submit-spinner": "*",
    "kartik-v/yii2-detail-view": "*",
    "fedemotta/yii2-cronjob": "*",
    "kartik-v/yii2-widget-datetimepicker": "*",
    "kartik-v/yii2-date-range": "dev-master",
    "phpoffice/phpspreadsheet": "^1.2",
    "linslin/yii2-curl": "*",
    "kartik-v/yii2-widget-fileinput": "@dev",
    "kartik-v/yii2-dialog": "*",
    "google/apiclient": "^2.0",
    "delight-im/str": "^2.4",
    "mongosoft/yii2-soap-client": "dev-master",
    "kartik-v/yii2-export": "@dev",
  "ext-json": "*",
  "ext-curl": "*"
},
"require-dev": {
    "yiisoft/yii2-debug": "~2.0.0",
    "yiisoft/yii2-gii": "~2.0.0",
    "yiisoft/yii2-faker": "~2.0.0",

    "codeception/base": "^2.2.3",
    "codeception/verify": "~0.3.1"
},

"config": {
    "process-timeout": 1800,
    "fxp-asset": {
        "enabled": false
    }
},
"extra": {
    "asset-installer-paths": {
        "npm-asset-library": "vendor/npm",
        "bower-asset-library": "vendor/bower"
    }
},
"scripts": {
    "post-install-cmd": "php init --env=Development --overwrite=n"
},
"autoload": {
    "psr-4": {
        "kartik\\spinner\\": "",
        "nirvana\\showloading\\": ""
    }
},
"repositories": [{
    "type": "composer",
    "url": "https://asset-packagist.org"
}]

 }

What I have tried?

I have tried to run composer with below command as per this given solution

composer install --ignore-platform-reqs

But got the following errors

The "yiisoft/yii2-composer" plugin was skipped because it requires a Plugin API version ("^1.0") that does not match your Composer installation ("2.3.0"). You may need to run composer update with the "--no-plugins" option.
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. It is recommended that you run `composer update` or `composer update <package name>`.
Your lock file does not contain a compatible set of packages. Please run composer update.

Problem 1
- kartik-v/yii2-widget-select2 is locked to version dev-master and an update of this package was not requested.
- kartik-v/yii2-widget-select2 dev-master requires select2/select2 >=4.0 -> found select2/select2[dev-master] but it does not match the constraint.
Problem 2
- codeception/phpunit-wrapper is locked to version 7.8.0 and an update of this package was not requested.
- codeception/phpunit-wrapper 7.8.0 requires sebastian/diff ^3.0 -> found sebastian/diff[dev-master, 4.0.x-dev (alias of dev-master)] but it does not match the constraint.
Problem 3
- phpunit/php-code-coverage is locked to version 6.1.4 and an update of this package was not requested.
- phpunit/php-code-coverage 6.1.4 requires phpunit/php-file-iterator ^2.0 -> found phpunit/php-file-iterator[dev-master, 3.0.x-dev (alias of dev-master)] but it does not match the constraint.
Problem 4
- phpunit/phpunit is locked to version 7.5.x-dev and an update of this package was not requested.
- phpunit/phpunit 7.5.x-dev requires phpunit/php-file-iterator ^2.0.1 -> found phpunit/php-file-iterator[dev-master, 3.0.x-dev (alias of dev-master)] but it does not match the constraint.
Problem 5
- sebastian/comparator is locked to version 3.0.2 and an update of this package was not requested.
- sebastian/comparator 3.0.2 requires sebastian/diff ^3.0 -> found sebastian/diff[dev-master, 4.0.x-dev (alias of dev-master)] but it does not match the constraint.
Problem 6
- sebastian/exporter is locked to version 3.1.2 and an update of this package was not requested.
- sebastian/exporter 3.1.2 requires sebastian/recursion-context ^3.0 -> found sebastian/recursion-context[dev-master, 4.0.x-dev (alias of dev-master)] but it does not match the constraint.
Problem 7
- sebastian/object-enumerator is locked to version 3.0.3 and an update of this package was not requested.
- sebastian/object-enumerator 3.0.3 requires sebastian/object-reflector ^1.1.1 -> found sebastian/object-reflector[dev-master, 2.0.x-dev (alias of dev-master)] but it does not match the constraint.
Problem 8
- kartik-v/yii2-widget-select2 dev-master requires select2/select2 >=4.0 -> found select2/select2[dev-master] but it does not match the constraint.
- kartik-v/yii2-widget-select2 2.1.x-dev is an alias of kartik-v/yii2-widget-select2 dev-master and thus requires it to be installed too.
- kartik-v/yii2-widget-select2 is locked to version 2.1.x-dev and an update of this package was not requested.

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades, and removals for packages currently locked to specific versions.

Any help would be highly appreciated.


Solution

  • Hi can you please try this, add below code in composer.json and update composer ?

     "miloschuman/yii2-highcharts-widget": "^8.0",