Upgrade Bootstrap 3 to 4

i’m trying upgrade bootstrap from version 3 to 4, with this official extension and now works partial. for example i use in my project a widgets from 2amigos and i think is dependent from bootstrap 3. in the pages where i have a widget from 2 amigos the bootstrap3 is called always and deconfigured my layout (constructed in BS4) it’s possible remove completely bootstrap 3 or other solution for not call BS3 anymore?

other thing i see is the module Gii also layout desconfugured.

installation

php composer.phar require --prefer-dist yiisoft/yii2-bootstrap4

class AppAsset

public $depends = [
        'yii\web\YiiAsset',
        'yii\bootstrap4\BootstrapAsset',
    ];

and i rename all from yii\bootstrap to yii\bootstrap4

i also try remove yiisoft/yii2-bootstrap": "~2.0.0" from composer.json but not work.

i also try remove yiisoft/yii2-bootstrap": "~2.0.0" from composer.json but not work.

How exactly it does not work?

@samdark i remove this line and try composer update, the result is same continue calling bootstrap 3.

@russo89

Hi, welcome to yii community, try cleaner the asset folder and try again…

if you say clean folder in frontend > web > assets i already try but the result is the same.
and it recreates the bootstrap 3 asset again
when i remove yiisoft/yii2-bootstrap": "~2.0.0" from composer.json and execute composer update in the end return Package operations: 0 installs, 0 updates, 0 removals.

Do you do composer update? Try removing composer.lock.

@samdark not work, the result is same.
I think the widget reinstalls “BS3” each time it’s called… or something like this…

on the other hand it seems that BS3 is never removed ( Package operations: 0 installs, 0 updates, 0 removals)

Then something you use requires it. Try finding the package in question.

@samdark Isn’t it a widget issue? i found this issues, if i apply this “overwrite” in each widgets, it work ok, whitout call BS3.

If you are using widgets that require bootstrap 3 then yes, these widgets are not compatible.

1 Like

Ok, thanks!