V
V
Vitaly2020-10-25 19:45:15
Yii
Vitaly, 2020-10-25 19:45:15

How to restore a site on phpyii2 on a new hosting?

Files, db transferred.
php7.1, it seems that all the necessary modules are installed. Php works as an apache module.

launching

php composer.phar update -W
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires yiisoft/yii2 2.0.7 -> satisfiable by yiisoft/yii2[2.0.7].
    - yiisoft/yii2 2.0.7 requires bower-asset/jquery 2.2.*@stable | 2.1.*@stable | 1.11.*@stable -> found bower-asset/jquery[2.2.4] in lock file but not in remote repositories, make sure you avoid updating this package to keep the one from lock file.
  Problem 2
    - yiisoft/yii2-bootstrap 2.0.0 requires bower-asset/bootstrap 3.2.* | 3.1.* -> found bower-asset/bootstrap[v3.3.5] but it does not match the constraint.
    - yiisoft/yii2-bootstrap[2.0.1, ..., 2.0.8] require bower-asset/bootstrap 3.3.* | 3.2.* | 3.1.* -> found bower-asset/bootstrap[v3.3.5] in lock file but not in remote repositories, make sure you avoid updating this package to keep the one from lock file.
    - yiisoft/yii2-bootstrap[2.0.9, ..., 2.0.10] require bower-asset/bootstrap 3.4.* | 3.3.* | 3.2.* | 3.1.* -> found bower-asset/bootstrap[v3.3.5]
in lock file but not in remote repositories, make sure you avoid updating this package to keep the one from lock file.
    - Root composer.json requires yiisoft/yii2-bootstrap * -> satisfiable by yiisoft/yii2-bootstrap[2.0.0, ..., 2.0.10].

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


composer install doesn't help either
php composer.phar install
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Your lock file does not contain a compatible set of packages. Please run composer update.

  Problem 1
    - yiisoft/yii2-composer is locked to version 2.0.4 and an update of this package was not requested.
    - yiisoft/yii2-composer 2.0.4 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.
  Problem 2
    - yiisoft/yii2-composer 2.0.4 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.
    - yiisoft/yii2 2.0.7 requires yiisoft/yii2-composer ~2.0.4 -> satisfiable by yiisoft/yii2-composer[2.0.4].
    - yiisoft/yii2 is locked to version 2.0.7 and an update of this package was not requested.

You are using Composer 2, which some of your plugins seem to be incompatible with. Make sure you update your plugins or report a plugin-issue to ask them to support Composer 2.


First I tried with the vendor folder from the old project, then deleted it, but the result is the same.
Removed composer.lock
But still the packages are not installed:
php composer.phar update
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires yiisoft/yii2 2.0.7 -> satisfiable by yiisoft/yii2[2.0.7].
    - yiisoft/yii2 2.0.7 requires bower-asset/jquery 2.2.*@stable | 2.1.*@stable | 1.11.*@stable -> could not be found in any version, but the following packages provide it:
      - craftcms/cms Craft CMS
      - yidas/yii2-bower-asset Bower Assets for Yii 2 app provided via Composer repository
      - yidas/yii2-composer-bower-skip A Composer package that allows you to install or update Yii2 without Bower-Asset
      - yidas/yii2-jquery jQuery Asset Bundle extension with fixed and CDN sources for Yii2 framework
      - jamband/yii2-ensure-unique-behavior This extension insert unique identifier automatically for the Yii 2 framework
      - cliff363825/yii2-bower-asset Yii2 bower asset
      - maiscrm/yii2-composer-bower-skip A Composer package that allows you to install or update Yii2 without Bower-Asset
      - blackhive/yii2-app-advanced Yii 2 Advanced Project Template
      - demokn/yii2-composer-asset
      - getdkan/recline recline.js module for DKAN/Drupal
      - kriss/yii2-advanced Yii2 advanced project template, Frontend for API and Backend with AdminLTE
      - maniakalen/tags Yii2 Element tags integration module
      - myzero1/yii2-app-advanced Yii 2 Advanced Project Template
      - onyijne/ovy Onsen-UI 2 + Vue.js 2 + Yii2 Basic Project Template
      - projectchina/yii2-app-advanced Yii 2 Advanced Project Template
      - seesoft/cms
      - stiks/yii2-composer-bower-skip A Composer package that allows you to install or update Yii2 without Bower-Asset
      - tanakahisateru/yii2-app-basic-npm How to use NPM with Yii 2 Basic Application Template
      - yuncms/framework The Yuncms Framework.
      Consider requiring one of these to satisfy the bower-asset/jquery requirement.
  Problem 2
    - yiisoft/yii2-bootstrap 2.0.0 requires bower-asset/bootstrap 3.2.* | 3.1.* -> could not be found in any version, but the following packages provide it:
      - craftcms/cms Craft CMS
      - yidas/yii2-bower-asset Bower Assets for Yii 2 app provided via Composer repository
      - yidas/yii2-composer-bower-skip A Composer package that allows you to install or update Yii2 without Bower-Asset
      - yidas/yii2-bootstrap Bootstrap Asset Bundle extension for Yii2 framework
      - cliff363825/yii2-bower-asset Yii2 bower asset
      - maiscrm/yii2-composer-bower-skip A Composer package that allows you to install or update Yii2 without Bower-Asset
      - blackhive/yii2-app-advanced Yii 2 Advanced Project Template
      - demokn/yii2-composer-asset
      - kriss/yii2-advanced Yii2 advanced project template, Frontend for API and Backend with AdminLTE
      - myzero1/yii2-app-advanced Yii 2 Advanced Project Template
      - projectchina/yii2-app-advanced Yii 2 Advanced Project Template
      - seesoft/cms
      - stiks/yii2-composer-bower-skip A Composer package that allows you to install or update Yii2 without Bower-Asset
      - tanakahisateru/yii2-app-basic-npm How to use NPM with Yii 2 Basic Application Template
      Consider requiring one of these to satisfy the bower-asset/bootstrap requirement.
    - yiisoft/yii2-bootstrap[2.0.1, ..., 2.0.8] require bower-asset/bootstrap 3.3.* | 3.2.* | 3.1.* -> could not be found in any version, but the following packages provide it:
      - craftcms/cms Craft CMS
      - yidas/yii2-bower-asset Bower Assets for Yii 2 app provided via Composer repository
      - yidas/yii2-composer-bower-skip A Composer package that allows you to install or update Yii2 without Bower-Asset
      - yidas/yii2-bootstrap Bootstrap Asset Bundle extension for Yii2 framework
      - cliff363825/yii2-bower-asset Yii2 bower asset
      - maiscrm/yii2-composer-bower-skip A Composer package that allows you to install or update Yii2 without Bower-Asset
      - blackhive/yii2-app-advanced Yii 2 Advanced Project Template
      - demokn/yii2-composer-asset
      - kriss/yii2-advanced Yii2 advanced project template, Frontend for API and Backend with AdminLTE
      - myzero1/yii2-app-advanced Yii 2 Advanced Project Template
      - projectchina/yii2-app-advanced Yii 2 Advanced Project Template
      - seesoft/cms
      - stiks/yii2-composer-bower-skip A Composer package that allows you to install or update Yii2 without Bower-Asset
      - tanakahisateru/yii2-app-basic-npm How to use NPM with Yii 2 Basic Application Template
      Consider requiring one of these to satisfy the bower-asset/bootstrap requirement.
    - yiisoft/yii2-bootstrap[2.0.9, ..., 2.0.10] require bower-asset/bootstrap 3.4.* | 3.3.* | 3.2.* | 3.1.* -> could not be found in any version, but the following packages provide it:
      - craftcms/cms Craft CMS
      - yidas/yii2-bower-asset Bower Assets for Yii 2 app provided via Composer repository
      - yidas/yii2-composer-bower-skip A Composer package that allows you to install or update Yii2 without Bower-Asset
      - yidas/yii2-bootstrap Bootstrap Asset Bundle extension for Yii2 framework
      - cliff363825/yii2-bower-asset Yii2 bower asset
      - maiscrm/yii2-composer-bower-skip A Composer package that allows you to install or update Yii2 without Bower-Asset
      - blackhive/yii2-app-advanced Yii 2 Advanced Project Template
      - demokn/yii2-composer-asset
      - kriss/yii2-advanced Yii2 advanced project template, Frontend for API and Backend with AdminLTE
      - myzero1/yii2-app-advanced Yii 2 Advanced Project Template
      - projectchina/yii2-app-advanced Yii 2 Advanced Project Template
      - seesoft/cms
      - stiks/yii2-composer-bower-skip A Composer package that allows you to install or update Yii2 without Bower-Asset
      - tanakahisateru/yii2-app-basic-npm How to use NPM with Yii 2 Basic Application Template
      Consider requiring one of these to satisfy the bower-asset/bootstrap requirement.
    - Root composer.json requires yiisoft/yii2-bootstrap * -> satisfiable by yiisoft/yii2-bootstrap[2.0.0, ..., 2.0.10].

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
 - It's a private package and you forgot to add a custom repository to find it

Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.


How then to install them?
Please help me figure out what I'm doing wrong. I am superficially familiar with php yii2.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
Koksario, 2020-10-26
@vitalysokolov

I found a workaround
The day before yesterday the 2nd version of the composer was released and it is set by default.
If you need to quickly solve the problem, you can directly specify the major version 1 and the current minor one. For example, at the moment it looks like this:
php composer-setup.php --version=1.10.16
This is a working option, but I'm sure it's not correct. Looking forward to more ideas

V
vitaly_74, 2020-10-25
@vitaly_74

a description of a similar problem here,
run the command:

composer global require "fxp/composer-asset-plugin:^1.4.6"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question