Composer issues with bower / jui


I have an quite old Yii2 app running. Now I made some changes but the deployment does not work anymore. The bower-asset package is gone.
yiisoft/yii2-bootstrap dev-master requires bower-asset/bootstrap 3.4.* | 3.3.* | 3.2.* | 3.1.* -> satisfiable by bower-asset/bootstrap[v3.4.1]

I found the yidas/yii2-bower-asset is a 3rd party workaround since years. Installing yidas/yii2-bower-asset and set the alias for bower is working but the frontend is broken. It can’t find a class:
Class yii\jui\JuiAsset does not exist

But there is another problem with yiisoft/yii2-jui.
Checking that it’s installing 2.0.0-beta instead of the lastest version 2.0.7. But 2.0.7 or any 2.0.x version requires again the bower package which is gone.

I have no clue how to solve that dependency issue since anything I tried is running in a different error.

Why is the yii2 framework not providing a proper solution and still has package i the own composer deps which don’t exist anymore?

Btw, yes I deleted the composer.lock and vendor folder already. But doesn’t help.

What is the output of “composer install”?

With the workaround using yidas/yii2-bower-asset there is no composer issue but the frontend is broken because it’s only installing yidas/yii2-bower-asset 2.0.0-beta which is missing the yii\jui\JuiAsset file.

If I try composer require yiisoft/yii2-jui:2.0.7
Problem 1
- Root composer.json requires yiisoft/yii2-jui 2.0.7 → satisfiable by yiisoft/yii2-jui[2.0.7].
- yiisoft/yii2-jui 2.0.7 requires bower-asset/jquery-ui ~1.12.1 → could not be found in any version, but the following packages provide it:
- ommu/faq Frequency Asked Question Module from OMMU
- kriss/yii2-calendar-schedule Yii2 Calendar Schedule
- ommu/gii Gii Generator Template from OMMU
- ommu/support Support Module from OMMU
- ommu/testimony Testimony Module from OMMU
- ommu/users Users Module from OMMU
- yuncms/framework The Yuncms Framework.
Consider requiring one of these to satisfy the bower-asset/jquery-ui requirement.

What version of PHP are you using? Can you provide your composer.json and composer.lock files?

It’s running on PHP7.0. Never tested if all deps are working with PHP8.

composer.json: Yii2 composer.json · GitHub
composer.lock: Yii2 composer.lock · GitHub

I’ll try to take a look at the composer files tomorrow

I got rid of the yidas/yii2-bower-asset

“type”: “composer”,
“url”: “

And then was able to add yiisoft/yii2-jui:2.0.7

Here is the updated composer.json.

    "name": "gide/cc2",
    "description": "Yii 2 Advanced Application Template",
    "keywords": ["yii2", "framework", "advanced", "application template"],
    "homepage": "",
    "type": "custom-cc2",
    "license": "BSD-3-Clause",
    "support": {
        "issues": "",
        "forum": "",
        "wiki": "",
        "irc": "irc://",
        "source": ""
    "minimum-stability": "dev",
    "require": {
        "php": ">=7.0.0",
        "kartik-v/yii2-checkbox-x": "*",
        "kartik-v/yii2-date-range": "*",
        "kartik-v/yii2-detail-view": "*",
        "kartik-v/yii2-export": "*",
        "kartik-v/yii2-grid": "*",
        "kartik-v/yii2-krajee-base": "*",
        "kartik-v/yii2-mpdf": "*",
        "kartik-v/yii2-nav-x": "*",
        "kartik-v/yii2-sortable-input": "*",
        "kartik-v/yii2-widget-activeform": "*",
        "kartik-v/yii2-widget-fileinput": "*",
        "kartik-v/yii2-widgets": "*",
        "vlucas/phpdotenv": "^3.6@dev",
        "webvimark/module-user-management": "^1.0",
        "yiisoft/yii2": "2.0.47",
        "yiisoft/yii2-bootstrap": "*",
        "yiisoft/yii2-jui": "2.0.7",
        "yiisoft/yii2-swiftmailer": "*"
    "require-dev": {
        "codeception/codeception": "*",
        "yiisoft/yii2-debug": "*",
        "yiisoft/yii2-gii": "*",
        "yiisoft/yii2-faker": "*"
    "config": {
        "allow-plugins": {
            "yiisoft/yii2-composer": true
        "fxp-asset": {
            "installer-paths": {
                "npm-asset-library": "vendor/npm",
                "bower-asset-library": "vendor/bower"
        "platform": {
            "php": "7.0"
        "process-timeout": 1800,
        "sort-packages": true
    "repositories": [
            "type": "composer",
            "url": ""
            "type": "composer",
            "url": ""

1 Like

Thank you.
For some reason 1 kartik-v dep was missing but I have added it and it’s working now.

You are welcome. Good luck!