PHPackages                             bubbaops/boggarts - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. bubbaops/boggarts

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

bubbaops/boggarts
=================

Identify mischievous, invisible, and ambiguous Unicode whitespace characters (zero width spaces, no-break spaces, and similar).

v0.0.3(3y ago)16[2 PRs](https://github.com/BubbaOps/boggarts/pulls)MITPHPPHP ^8.1

Since Mar 27Pushed 2y ago1 watchersCompare

[ Source](https://github.com/BubbaOps/boggarts)[ Packagist](https://packagist.org/packages/bubbaops/boggarts)[ RSS](/packages/bubbaops-boggarts/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (14)Versions (4)Used By (0)

Laughing at Boggarts
====================

[](#laughing-at-boggarts)

> *To repel or destroy a boggart, it must be laughed at.*
> ~ Harry Potter and the Prisoner of Azkaban

---

[![Latest Version on Packagist](https://camo.githubusercontent.com/a9026253f9acb3569c21e3ec777e18d2d28a38b7a935b47e0dd6dbbf29e0ffb8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f62756262616f70732f626f6767617274732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/bubbaops/boggarts)[![GitHub Tests Action Status](https://camo.githubusercontent.com/f1576b3641f61e95069539fb038198144b99b0d27fb9f5e9cbf818bed5d4aebd/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f62756262616f70732f626f6767617274732f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/bubbaops/boggarts/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/5acb7ded07e407bbfecca33ec58916ec2ad208a3e107e7f96123438664231769/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f62756262616f70732f626f6767617274732f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/bubbaops/boggarts/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/9951e4057762de3a8fdcc7c1afb48faf1ed174b66d19ad1d2bd1a82c9168f403/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f62756262616f70732f626f6767617274732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/bubbaops/boggarts)

What even is this?
------------------

[](#what-even-is-this)

[Bare Bones Software](http://www.barebones.com/) famous [BBEdit](http://www.barebones.com/products/bbedit/) HTML and text editor for macOS has had a “Zap Gremlins” feature since its first public release on April 12th, 1992! Sublime text later rolled out it's own [Gremlins plugin](https://packagecontrol.io/packages/Gremlins), and today you can find a [VSCode Gremlins](https://packagecontrol.io/packages/Gremlins) plugin.

These plugins help identify invisible and ambiguous Unicode whitespace characters *(zero width spaces, no-break spaces, and others.)* and have been referred to as gremlins all the way back to the early 1990's.

If you do any amount of text processing, you have no doubt run into these buggers and have probably played the game where you copy the text into an editor that will show them to you, they continue to attempt to hide, and ultimately you delete the offending thing, then copy the result back into your source material to run again.

If you are clever, you have likely worked through various iterations of attempting to simply convert your entire string to [ISO-8859](https://en.wikipedia.org/wiki/ISO/IEC_8859-1), perhaps created a function to remove them, and add a new one everytime you run into one, or something along those lines.

We've had enough and have decided it's time for a first class solution to the problem. We also decided on an alternative name. The new name is fairly synonymous with the concept of a gremlin, but it has a richer history and, quite frankly, I just like it better. That movie gave me nightmares as a kid, and I don't want anything to do with them now.

Features
--------

[](#features)

- Configuration for fine-grained control over your boggarts.
- Laravel Integration.
- Easy to use.
- Can delete all configured bogies from your text.
- Can optionally replace configured bogies with your choice of characters.
- Comes pre-configured with a very nice set of boggarts to start off with.
- Has an awesome name with references to current pop culture!
- Solves a growing security issue for you.

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

[](#installation)

You can install the package via composer:

```
composer require bubbaops/boggarts
```

#### Laravel Projects

[](#laravel-projects)

You can publish the config file with:

```
php artisan vendor:publish --tag="boggarts-config"
```

Usage
-----

[](#usage)

```
$text = "    Just imagine this text full of me an nasty boggarts invisible to you!       ";
$text = \BubbaOps\Boggarts\Facades\Excise::clip($text);
// Results "Just imagine this text full of mean nasty boggarts invisible to you!"
// All cleaned up and ready to go our for a fun night.
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Bubba Hines](https://github.com/BubbaOps)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

❤️ Sponsor Me, Maybe
--------------------

[](#heart-sponsor-me-maybe)

[Sponsor me](https://github.com/sponsors/bubba-h57)

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 54.2% 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

Unknown

Total

1

Last Release

1193d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/365d59992aecf758c04c609175003de6c24145021608f2c54fabbc8fd67a5588?d=identicon)[bubbaops](/maintainers/bubbaops)

---

Top Contributors

[![bubba-h57](https://avatars.githubusercontent.com/u/603630?v=4)](https://github.com/bubba-h57 "bubba-h57 (13 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (4 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (4 commits)")[![BubbaOps](https://avatars.githubusercontent.com/u/60058548?v=4)](https://github.com/BubbaOps "BubbaOps (3 commits)")

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/bubbaops-boggarts/health.svg)

```
[![Health](https://phpackages.com/badges/bubbaops-boggarts/health.svg)](https://phpackages.com/packages/bubbaops-boggarts)
```

###  Alternatives

[illuminate/support

The Illuminate Support package.

630113.0M41.3k](/packages/illuminate-support)[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.8M47](/packages/spatie-laravel-pdf)[codewithdennis/filament-select-tree

The multi-level select field enables you to make single selections from a predefined list of options that are organized into multiple levels or depths.

329530.5k29](/packages/codewithdennis-filament-select-tree)[worksome/exchange

Check Exchange Rates for any currency in Laravel.

124603.0k](/packages/worksome-exchange)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)[codebar-ag/laravel-docuware

DocuWare integration with Laravel

1123.7k](/packages/codebar-ag-laravel-docuware)

PHPackages © 2026

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