Skip to content
This repository has been archived by the owner on Jul 27, 2023. It is now read-only.

Bootstrap4 problems installing via composer. #19

Open
NLeone opened this issue Aug 26, 2020 · 0 comments
Open

Bootstrap4 problems installing via composer. #19

NLeone opened this issue Aug 26, 2020 · 0 comments

Comments

@NLeone
Copy link

NLeone commented Aug 26, 2020

Dear, I install via composer as suggested by the repository cover, but apparently it does not install the latest version of it, I have problems when rendering the views with Bootstrap4 which is how I currently have my project. The code of the assets of the installed version is this:

FileInputAsset.php

<?php
/**
 * @link https://github.com/2amigos/yii2-file-input-widget
 *
 * @copyright Copyright (c) 2013-2015 2amigOS! Consulting Group LLC
 * @license http://opensource.org/licenses/BSD-3-Clause
 */

namespace dosamigos\fileinput;

use yii\web\AssetBundle;

/**
 * FileInputAsset.
 *
 * @author Antonio Ramirez <[email protected]>
 *
 * @link http://www.ramirezcobos.com/
 * @link http://www.2amigos.us/
 */
class FileInputAsset extends AssetBundle
{
    public $sourcePath = '@vendor/jasny/bootstrap/dist';
    public $css = [
        'css/jasny-bootstrap.css',
    ];
    public $js = [
        'js/jasny-bootstrap.js',
    ];
    public $depends = [
        'yii\bootstrap\BootstrapPluginAsset',
    ];
}

And this differs from the last commit you have in your file: src/FileInputAsset.php

The composer.json file in your package is as follows: composer.json

And in the file that you download when it is installed is the following:

{
    "name": "2amigos/yii2-file-input-widget",
    "description": "Jasny file input widget for the Yii framework",
    "keywords": [
        "2amigos",
        "yii",
        "yii2",
        "yii 2",
        "widget",
        "file input"
    ],
    "type": "yii2-extension",
    "license": "BSD-3-Clause",
    "homepage": "https://github.com/2amigos//yii2-file-input-widget",
    "authors": [
        {
            "name": "2amigOS! Consulting Group",
            "email": "[email protected]",
            "homepage": "http://2amigos.us",
            "role": "Developer"
        }
    ],
    "require": {
        "yiisoft/yii2": "~2.0.0",
        "yiisoft/yii2-bootstrap": "~2.0.0",
        "jasny/bootstrap": "~3.1.0",
        "kartik-v/bootstrap-fileinput": "~4.1.0"
    },
    "require-dev": {
        "phpunit/phpunit": "~4.0"
    },
    "autoload": {
        "psr-4": {
            "dosamigos\\fileinput\\": "src"
        }
    },
    "extra": {
        "asset-installer-paths": {
            "npm-asset-library": "vendor/npm",
            "bower-asset-library": "vendor/bower"
        },
        "branch-alias": {
            "dev-master": "1.0-dev"
        }
    }
}

If you observe, it does not have the bootstrap4 requirement, I can solve it by modifying the assets files, but it does not seem like a verbose way, tell me if I can install in another way that is not unzipping the package so it is loaded in my dependencies. It's a great extension!

I await your comments, greetings!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant