PHPackages                             helgesverre/blade-heroicons-upgrader - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. helgesverre/blade-heroicons-upgrader

ActiveLibrary[Templating &amp; Views](/categories/templating)

helgesverre/blade-heroicons-upgrader
====================================

Automatically upgrade Heroicons v1 to v2 icon names in Blade templates

v1.2.2(7mo ago)195014MITPHPPHP ^8.1CI failing

Since Dec 30Pushed 7mo ago1 watchersCompare

[ Source](https://github.com/HelgeSverre/blade-heroicons-upgrader)[ Packagist](https://packagist.org/packages/helgesverre/blade-heroicons-upgrader)[ Docs](https://github.com/helgesverre/blade-heroicons-upgrader)[ RSS](/packages/helgesverre-blade-heroicons-upgrader/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (5)Dependencies (15)Versions (7)Used By (0)

[![](./art/header.png)](./art/header.png)

Blade Heroicons Upgrader
========================

[](#blade-heroicons-upgrader)

[![Latest Version on Packagist](https://camo.githubusercontent.com/85259b19b600ead8a0bbee0dfca5254c1567ef4d38ffc196a59c9339390e4b77/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f68656c67657376657272652f626c6164652d6865726f69636f6e732d75706772616465722e737667)](https://packagist.org/packages/helgesverre/blade-heroicons-upgrader)[![GitHub Tests Action Status](https://camo.githubusercontent.com/c1770689e79e7f5b7fec9e56f08cb99f82887e5db52c6b78df6251ebce56f522/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f68656c67657376657272652f626c6164652d6865726f69636f6e732d75706772616465722f74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473)](https://github.com/helgesverre/blade-heroicons-upgrader/actions?query=workflow%3Atests+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/cb2717f249cc853e6e6e4380aab6919b85afb095d176e298633d9a65cb91f820/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f68656c67657376657272652f626c6164652d6865726f69636f6e732d75706772616465722e737667)](https://packagist.org/packages/helgesverre/blade-heroicons-upgrader)

Storytime.
----------

[](#storytime)

[Skip to installation](#installation)

[![](./art/Steps/Step1.png)](./art/Steps/Step1.png)

[![](./art/Steps/Step2.png)](./art/Steps/Step2.png)

[![](./art/Steps/Step3.png)](./art/Steps/Step3.png)

[![](./art/Steps/Step4.png)](./art/Steps/Step4.png)

[![](./art/Steps/Step5.png)](./art/Steps/Step5.png)

[![](./art/Steps/Step6.png)](./art/Steps/Step6.png)

What it does.
-------------

[](#what-it-does)

> This only supports [Blade Heroicons](https://github.com/blade-ui-kit/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 ``, and updates them to their new v2 equivalents such as `@svg("clipboard-document-check")`and ``.

It's built to prevent overlapping or incorrect updates, ensuring that icons are not mistakenly transformed into something like ``.

Requirements
------------

[](#requirements)

- **PHP**: 8.1 or higher
- **Laravel**: 10.17+, 11.x, or 12.x
    - Laravel 10.17+ is required due to the `laravel/prompts` dependency

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require --dev helgesverre/blade-heroicons-upgrader
```

Usage
-----

[](#usage)

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
```

Development
-----------

[](#development)

### Running Tests

[](#running-tests)

```
# 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
```

### Testing Installation Across Laravel Versions

[](#testing-installation-across-laravel-versions)

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:

- Test Laravel 10, 11, and 12 installations
- Create fresh Laravel projects in `wip/laravel-*` directories
- Install the package from the local codebase
- Verify the command is registered
- Test command execution with a sample file
- **Continue testing all versions even if one fails**
- Show a summary with passed/failed versions
- Exit with code 1 if any version fails (useful for CI)

**Key Improvements:**

- Tests continue even if Laravel 9 fails (it's not supported)
- Summary table shows which versions passed/failed
- Only creates directories for successfully installed versions

To clean up test installations: `rm -rf wip`

FAQ
---

[](#faq)

**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.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance65

Regular maintenance activity

Popularity23

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 94.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~162 days

Total

5

Last Release

212d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/68f3958f40262d577ddc0596e4ba78b42c0409ebc7de948bab47edee392d5f68?d=identicon)[HelgeSverre](/maintainers/HelgeSverre)

---

Top Contributors

[![HelgeSverre](https://avatars.githubusercontent.com/u/1089652?v=4)](https://github.com/HelgeSverre "HelgeSverre (36 commits)")[![jplhomer](https://avatars.githubusercontent.com/u/848147?v=4)](https://github.com/jplhomer "jplhomer (1 commits)")[![kurucu](https://avatars.githubusercontent.com/u/1073323?v=4)](https://github.com/kurucu "kurucu (1 commits)")

---

Tags

bladeiconslaravelsvgupgraderlaravelHeroiconsblade-iconshelgesverreblade-heroicons-upgrader

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/helgesverre-blade-heroicons-upgrader/health.svg)

```
[![Health](https://phpackages.com/badges/helgesverre-blade-heroicons-upgrader/health.svg)](https://phpackages.com/packages/helgesverre-blade-heroicons-upgrader)
```

###  Alternatives

[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[spatie/laravel-health

Monitor the health of a Laravel application

85810.0M83](/packages/spatie-laravel-health)[ryangjchandler/blade-capture-directive

Create inline partials in your Blade templates with ease.

8222.2M12](/packages/ryangjchandler-blade-capture-directive)[spatie/laravel-blade-comments

Add debug comments to your rendered output

177325.5k](/packages/spatie-laravel-blade-comments)[hirethunk/verbs

An event sourcing package that feels nice.

513162.9k6](/packages/hirethunk-verbs)[wnx/laravel-backup-restore

A package to restore database backups made with spatie/laravel-backup.

203330.1k2](/packages/wnx-laravel-backup-restore)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
