Automatically upgrade Heroicons v1 to v2 icon names in Blade templates
helgesverre/blade-heroicons-upgrader is a Laravel package for automatically upgrade heroicons v1 to v2 icon names in blade templates.
It currently has 19 GitHub stars and 503 downloads on Packagist (latest version v1.2.2).
Install it with composer require helgesverre/blade-heroicons-upgrader.
Discover more Laravel packages by helgesverre
or browse all Laravel packages to compare alternatives.
Last updated

This only supports Blade Heroicons.
🔧 Blade Heroicons Upgrader is a Laravel tool specifically designed for updating from Heroicons v1 to v2 in Blade files. It simplifies the process of transitioning to the latest Blade Heroicons version, making it quick and effortless.
This tool replaces old icon names in your code, such as @svg("clipboard-check") and <x-clipboard-check />, and
updates them to their new v2 equivalents such as @svg("clipboard-document-check")
and <x-clipboard-document-check />.
It's built to prevent overlapping or incorrect updates, ensuring that icons are not mistakenly transformed into
something
like <x-heroicon-o-server-stack-stack />.
laravel/prompts dependencyYou can install the package via composer:
composer require --dev helgesverre/blade-heroicons-upgrader
Run the command to upgrade your blade files (defaults to ./resources/views):
php artisan blade-heroicons-upgrader:upgrade
You can target a specific file or directory by passing it as an argument:
php artisan blade-heroicons-upgrader:upgrade resources/views/welcome.blade.php
You may also specify one or more files or directories:
php artisan blade-heroicons-upgrader:upgrade ./resources/views ./app/Composers/MenuComposer.php
You can do a dry run to preview replacements without modifying files:
php artisan blade-heroicons-upgrader:upgrade --dry
# Run test suite
composer test
# Run tests with coverage (requires Xdebug or uses Herd)
composer test-coverage
# Run static analysis
composer analyse
# Format code
composer format
To test the package installation works correctly across Laravel 10, 11, and 12:
# Bash version (recommended for quick testing)
composer test-install
# PHP version (better error handling, more maintainable)
composer test-install:php
# Or run scripts directly
bash test-install.sh
php test-install.php
Both scripts will:
wip/laravel-* directoriesKey Improvements:
To clean up test installations: rm -rf wip
Q: Does it work for other icon sets? A: No, maybe in the future
Q: My icon was replaced with the wrong one. What should I do? A: If you encounter any incorrect replacements, Please submit a pull request with the correction. Your help in would be greatly appreciated!
Q: Why did you build this? A: I had to do this process manually 4 times this year, and was tired of doing it.
The MIT License (MIT). Please see License File for more information.