assets publishOptions except problem

hi i’m new here. i’m working with yii2 and i tried to implement some publishOptions exceptions in my assetBundle, but in the yii-code i realized it’s absolutely not recognized in the assetManager, maybe i’m missing something.

My asset bundle:




    public $publishOptions = [

        'except' => ['connector/base_connector.php']

    ];



AssetManager:

github.com / yiisoft / yii2 / blob / master / framework / web / AssetManager.php

I don’t see where the ‘except’-key is detected, neither the ‘only’-key

Thank you for your help!

according to http://www.yiiframework.com/doc-2.0/guide-structure-assets.html

‘only’ and ‘except’ supposedly pointing to directories containing css or js files , rather than php files.




<?php

namespace app\assets;


use yii\web\AssetBundle;


class FontAwesomeAsset extends AssetBundle 

{

    public $sourcePath = '@bower/font-awesome'; 

    public $css = [ 

        'css/font-awesome.min.css', 

    ];

    public $publishOptions = [

        'only' => [

            'fonts/',

            'css/',

        ]

    ];

}




thank you for your reply. indeed your are right, but i want to use an external library, that i want to use as an asset. the problem, there is a folder with php files, that i don’t want to publish in my asset-bundle, that’s why i try to add an exception for that php-folder…

ok finally i managed it. i updated yii 2.0.4 to 2.0.6

the post can be marked as solved.

thank you

glad to hear your updates