cinghie / yii2-fontawesome
Asset Bundle to include Font Awesome on your Yii 2 project
Package info
github.com/cinghie/yii2-fontawesome
Type:yii2-extension
pkg:composer/cinghie/yii2-fontawesome
Requires
- php: >=7.4
- bower-asset/fontawesome: ^5.15.4
- yiisoft/yii2: ^2.0.14
Requires (Dev)
- phpunit/phpunit: ^8.5 || ^9.6 || ^10.5 || ^11.0
- roave/security-advisories: dev-master
README
Yii2 AssetBundle integration for Font Awesome 5.15.x.
Requirements
- PHP 7.4 or newer
- Yii 2.0.14 or newer within the Yii 2.x line
- Font Awesome 5.15.x (
bower-asset/fontawesome)
The CI suite verifies both the lowest supported dependency set and current compatible dependencies across PHP 7.4 through PHP 8.5.
Because Yii2 and this package use bower-asset/* packages, Composer must be able to resolve Asset Packagist packages. The project CI configures Asset Packagist explicitly before dependency installation.
Installation
The preferred way to install this extension is through Composer.
Either run
php composer.phar require cinghie/yii2-fontawesome "^1.5.0"
or add this line to the require section of your composer.json file:
"cinghie/yii2-fontawesome": "^1.5.0"
Configuration
Register the standard CSS asset bundle in your view:
use cinghie\fontawesome\FontAwesomeAsset;
FontAwesomeAsset::register($this);
Register the minified CSS asset bundle in your view:
use cinghie\fontawesome\FontAwesomeMinifyAsset;
FontAwesomeMinifyAsset::register($this);
Versioning
- Font Awesome 6 is not part of the current compatibility contract and should be introduced only through a dedicated release
- Font Awesome 5: from release 1.4.3
- Font Awesome 4: last release 1.3.4