Задать вопрос
@vitalysokolov

Как восстановить сайт на phpyii2 на новом хостинге?

Файлы, бд перенесены.
php7.1, вроде все нужные модули установлены. Php работает как модуль apache.

Запускаю
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 тоже не помогает
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.


Сначала пробовал с папкой vendor со старого проекта, затем удалил её, но результат тот же.
Удалил composer.lock
Но всё равно пакеты не устанавливаются:
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.


Как тогда их установить?
Помогите, пожалуйста, разобраться, что я не так делаю. С php yii2 знаком поверхностно.
  • Вопрос задан
  • 2793 просмотра
Подписаться 1 Простой 1 комментарий
Решения вопроса 1
@Koksario
Я нашёл workaround
Позавчера релизнулась 2я верся компоузера и он ставится по умолчанию
Если нужно быстро решить проблему, ты можешь указать непосредственно мажорную версию 1 и актуальную минурную. Например, на текущий момент это выглядит так:
php composer-setup.php --version=1.10.16
Это рабочий вариант, но уверен, что не правильный. Ждём ещё идеи
Ответ написан
Пригласить эксперта
Ответы на вопрос 1
vitaly_74
@vitaly_74
описание подобной проблемы тут
выполните команду:
composer global require "fxp/composer-asset-plugin:^1.4.6"
Ответ написан
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы