Current implementation of yii2-icons does not support the new Font Awesome 5, since the former "fa" class is replaced with "fas", "far", "fal" or "fab". While FA4 would suffice for some, the new SVG functionalities like transforming, masking and layering make it a worthwile set to use. In other words: perhaps it would be a good idea to include FA5 support in yii2-icons.
Issues to address
yii2-icons provides most features as is including transforming and masking; however, the following issues persist:
Font Awesome 5 comes in Free and Pro (subscriber) versions;
Font Awesome package does not update beyond 4.7;
"fa" class is replaced by "fas", "far", "fal" or "fab";
The new layering system makes for multiple icons stacking together, making the showStack method unsuitable.
Proposed enhancement
Adding 2 new Assets, one for Free version using the public CDN and one for Pro version, where the user will have to upload their own copy of FA5 Pro (no CDN currently exists and downloading requires paid subscription) (addresses issues 1 and 2);
Changing FA prefixes and adding fa5 style parameter to show method, in order to make "fas" default option with possibility to change to "far", "fal" and "fab" (addresses issue 3);
For backwards compatibility, this parameter is to be added last, hence making it necessary to fill in the $tag parameter, in which case filling NULL to force the default will break the code. Requires check on $add parameter (follows from previous);
Adding new method showLayers, to make use of the FA5 layering system (addresses issue 4).
Pull request
I will add a pull request shortly for my changes for this enhancement. Please note that I'm a newbie on GIT and collaborating. I just made the changes, commented them where appropriate but did not change any versioning information in the files itself. Please review the code and add this where necessary. Also, please let me know if there's anything I can learn.
Prerequisites
Matched all prerequisites.
The feature request
Current implementation of yii2-icons does not support the new Font Awesome 5, since the former "fa" class is replaced with "fas", "far", "fal" or "fab". While FA4 would suffice for some, the new SVG functionalities like transforming, masking and layering make it a worthwile set to use. In other words: perhaps it would be a good idea to include FA5 support in yii2-icons.
Issues to address
yii2-icons provides most features as is including transforming and masking; however, the following issues persist:
Proposed enhancement
Pull request
I will add a pull request shortly for my changes for this enhancement. Please note that I'm a newbie on GIT and collaborating. I just made the changes, commented them where appropriate but did not change any versioning information in the files itself. Please review the code and add this where necessary. Also, please let me know if there's anything I can learn.