fxp/composer-asset-plugin

Различные вопросы по установке и настройке фреймворка, конфигурции веб-сервера и IDE.
Ответить
alexandr79
Сообщения: 13
Зарегистрирован: 2019.03.21, 16:03

fxp/composer-asset-plugin

Сообщение alexandr79 »

питаюсь установить fxp/composer-asset-plugin
composer global require "fxp/composer-asset-plugin:^1.4.6"

Получаю ошибку
[InvalidArgumentException]
Package fxp/composer-asset-plugin at version ^1.4.6 has a PHP requirement incompatible with your PHP version, PHP extensions and Composer version

Раньше с таким не сталкивался
Аватара пользователя
ElisDN
Сообщения: 5845
Зарегистрирован: 2012.10.07, 10:24
Контактная информация:

Re: fxp/composer-asset-plugin

Сообщение ElisDN »

Удалите плагин и переходите на asset-packagist.
alexandr79
Сообщения: 13
Зарегистрирован: 2019.03.21, 16:03

Re: fxp/composer-asset-plugin

Сообщение alexandr79 »

Удалите плагин и переходите на asset-packagist.
В одном из Ваших видео помню что Вы описывали етот процесс. Скажите а есть у Вас статья где об етом можно почитать
alexandr79
Сообщения: 13
Зарегистрирован: 2019.03.21, 16:03

Re: fxp/composer-asset-plugin

Сообщение alexandr79 »

спасибо
DuoJin
Сообщения: 5
Зарегистрирован: 2020.11.11, 18:41

Re: fxp/composer-asset-plugin

Сообщение DuoJin »

беда с композером второй версии:
root@admin:/app# composer -V
The "fxp/composer-asset-plugin" plugin was skipped because it requires a Plugin API version ("^1.0") that does not match your Composer installation ("2.0.0"). You may need to run composer update with the "--no-plugins" option.
Composer version 2.0.6 2020-11-07 11:21:17
root@admin:/app# composer update
The "fxp/composer-asset-plugin" plugin was skipped because it requires a Plugin API version ("^1.0") that does not match your Composer installation ("2.0.0"). You may need to run composer update with the "--no-plugins" option.
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

Problem 1
- yiisoft/yii2[2.0.38, ..., 2.0.39.1] require bower-asset/jquery 3.5.*@stable | 3.4.*@stable | 3.3.*@stable | 3.2.*@stable | 3.1.*@stable | 2.2.*@stable | 2.1.*@stable | 1.11.*@stable | 1.12.*@stable -> found bower-asset/jquery[3.5.1] 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 ~2.0.38 -> satisfiable by yiisoft/yii2[2.0.38, 2.0.39, 2.0.39.1].

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

root@admin:/app# composer install
The "fxp/composer-asset-plugin" plugin was skipped because it requires a Plugin API version ("^1.0") that does not match your Composer installation ("2.0.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.
Your lock file does not contain a compatible set of packages. Please run composer update.

Problem 1
- fxp/composer-asset-plugin is locked to version v1.4.6 and an update of this package was not requested.
- fxp/composer-asset-plugin v1.4.6 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.

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.

может кто помочь?
Аватара пользователя
samdark
Администратор
Сообщения: 9489
Зарегистрирован: 2009.04.02, 13:46
Откуда: Воронеж
Контактная информация:

Re: fxp/composer-asset-plugin

Сообщение samdark »

Переходите на asset-packagist.
DuoJin
Сообщения: 5
Зарегистрирован: 2020.11.11, 18:41

Re: fxp/composer-asset-plugin

Сообщение DuoJin »

расскажите как это сделать, пожалуйста
(эту ссылку видел и пробовал viewtopic.php?f=28&t=45670&p=228030#p228030)
Аватара пользователя
ElisDN
Сообщения: 5845
Зарегистрирован: 2012.10.07, 10:24
Контактная информация:

Re: fxp/composer-asset-plugin

Сообщение ElisDN »

DuoJin писал(а): 2020.11.12, 10:30 эту ссылку видел и пробовал
И что не получилось?
DuoJin
Сообщения: 5
Зарегистрирован: 2020.11.11, 18:41

Re: fxp/composer-asset-plugin

Сообщение DuoJin »

Composer version 2.0.6 2020-11-07 11:21:17
структура composer.json:

Код: Выделить всё

"require": {
        "php": "7.4.*",
        "yiisoft/yii2": "~2.0.38",

        "fxp/composer-asset-plugin": "~1.4",
        "yiisoft/yii2-redis": "~2.0",
        "yiisoft/yii2-authclient": "~2.2",
        "yiisoft/yii2-queue": "~2.3.0",
        "yiisoft/yii2-debug": "~2.1.0",
        "yiisoft/yii2-bootstrap": "~2.0",
...
"config": {
        "process-timeout": 1800,
        "optimize-autoloader": true,
        "fxp-asset": {
            "enabled": "false"
        },
        "repositories": [
            {
                "type": "composer",
                "url": "https://asset-packagist.org"
            }
        ],
        "platform": {
            "php": "7.4"
        }
    }
удалил папку vendor
root@admin:/app# composer update

Код: Выделить всё

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

  Problem 1
    - yiisoft/yii2[2.0.38, ..., 2.0.39.1] require bower-asset/jquery 3.5.*@stable | 3.4.*@stable | 3.3.*@stable | 3.2.*@stable | 3.1.*@stable | 2.2.*@stable | 2.1.*@stable | 1.11.*@stable | 1.12.*@stable -> found bower-asset/jquery[3.5.1] 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 ~2.0.38 -> satisfiable by yiisoft/yii2[2.0.38, 2.0.39, 2.0.39.1].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
или вот так:
root@admin:/app# composer install

Код: Выделить всё

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
    - fxp/composer-asset-plugin is locked to version v1.4.6 and an update of this package was not requested.
    - fxp/composer-asset-plugin v1.4.6 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.

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.
я почитал что проблема с совместимостью пакета fxp/composer-asset-plugin с композером в2 но может есть вариант его вообще не использовать
Аватара пользователя
samdark
Администратор
Сообщения: 9489
Зарегистрирован: 2009.04.02, 13:46
Откуда: Воронеж
Контактная информация:

Re: fxp/composer-asset-plugin

Сообщение samdark »

"fxp/composer-asset-plugin": "~1.4" из require уберите.
DuoJin
Сообщения: 5
Зарегистрирован: 2020.11.11, 18:41

Re: fxp/composer-asset-plugin

Сообщение DuoJin »

попробовал:
composer.json:

Код: Выделить всё

"require": {
        "php": "7.4.*",
        "yiisoft/yii2": "~2.0.38",

        "yiisoft/yii2-redis": "~2.0",
        "yiisoft/yii2-authclient": "~2.2",
        "yiisoft/yii2-queue": "~2.3.0",
        "yiisoft/yii2-debug": "~2.1.0",
        "yiisoft/yii2-bootstrap": "~2.0",
        "codemix/yii2-localeurls": "1.7.1",
"config": {
        "process-timeout": 1800,
        "optimize-autoloader": true,
        "fxp-asset": {
            "enabled": false
        },
        "repositories": [
            {
                "type": "composer",
                "url": "https://asset-packagist.org"
            }
        ],
        "platform": {
            "php": "7.4"
        }
    }
root@admin:/app# composer clear-cache

root@admin:/app# composer update

Код: Выделить всё

The "fxp/composer-asset-plugin" plugin was skipped because it requires a Plugin API version ("^1.0") that does not match your Composer installation ("2.0.0"). You may need to run composer update with the "--no-plugins" option.
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - yiisoft/yii2[2.0.38, ..., 2.0.39.1] require bower-asset/jquery 3.5.*@stable | 3.4.*@stable | 3.3.*@stable | 3.2.*@stable | 3.1.*@stable | 2.2.*@stable | 2.1.*@stable | 1.11.*@stable | 1.12.*@stable -> found bower-asset/jquery[3.5.1] 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 ~2.0.38 -> satisfiable by yiisoft/yii2[2.0.38, 2.0.39, 2.0.39.1].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
Аватара пользователя
ElisDN
Сообщения: 5845
Зарегистрирован: 2012.10.07, 10:24
Контактная информация:

Re: fxp/composer-asset-plugin

Сообщение ElisDN »

Вынесите "repositories" из "config"
Аватара пользователя
ElisDN
Сообщения: 5845
Зарегистрирован: 2012.10.07, 10:24
Контактная информация:

Re: fxp/composer-asset-plugin

Сообщение ElisDN »

И удалите плагин вообще через

Код: Выделить всё

composer global remove fxp/composer-asset-plugin
DuoJin
Сообщения: 5
Зарегистрирован: 2020.11.11, 18:41

Re: fxp/composer-asset-plugin

Сообщение DuoJin »

Во! получилось! Спасибо большое.

composer global remove fxp/composer-asset-plugin
не понадобилось - у меня в докере все и там нет глобала.

помогло:
Вынесите "repositories" из "config"
Ответить