Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
String Mask Bundle

String Mask Bundle Laravel Package

mrgoodbytes8667/string-mask-bundle

A Symfony bundle that adds string masking utilities to your application. Hide or partially redact sensitive values such as emails, phone numbers, and card numbers, and reuse the masking service across templates, logs, and API responses.

View on GitHub
Deep Wiki
Context7

String Mask Bundle is a Symfony bundle that provides a simple, reusable service for masking sensitive strings such as emails, phone numbers, credit card numbers, and API keys. It helps keep personal and confidential data out of logs, error messages, and UI output without writing ad-hoc masking logic.

Drop the bundle into any Symfony application, configure masking rules as needed, and inject the masker wherever you need it.

  • Built-in maskers for emails, phone numbers, credit cards, and generic strings
  • Configurable mask characters and visibility rules
  • Framework-agnostic masking logic wrapped in a Symfony bundle
  • Auto-configured service ready for dependency injection
  • PSR-3 friendly for sanitizing log context
Frequently asked questions about String Mask Bundle
Is mrgoodbytes8667/string-mask-bundle a Laravel package?
No. Despite being listed on a Laravel/PHP package index, it is a Symfony bundle with a Twig extension. It ships no service provider, no facade, and no Laravel auto-discovery, and Laravel renders with Blade rather than Twig. Treat the Twig filter surface as unusable inside a Laravel application.
How do I install mrgoodbytes8667/string-mask-bundle in a Laravel app?
Composer installation is mechanically trivial, but that is the least of the problem. Pulling twig/twig and Symfony bundle wiring into a Blade app adds transitive symfony/* constraints that can collide with the Illuminate stack and block future framework upgrades. Run composer require --dry-run on a scratch branch first, and expect no Laravel integration wiring afterward.
Which Laravel versions does this string mask bundle support?
The evaluation does not confirm a supported Laravel version range because this is not a Laravel package at all. Its constraints target Symfony and Twig, and the last release was 2024-08-01, leaving roughly a year of drift from current PHP and Symfony releases. Check composer.json for permissive caret ranges versus pinned versions before assuming compatibility with your Illuminate version.
Can I use Twig filters in Laravel Blade templates?
No. Twig filters and functions have no effect in Blade templates. Using this package in Laravel would mean running Twig alongside Blade purely to reach a string masking helper, which is a disproportionate architectural cost for the benefit.
What license does mrgoodbytes8667/string-mask-bundle use, and is it safe for commercial use?
The repository reports NOASSERTION, which means the actual terms are unverified until someone reads the LICENSE file. Do not ship code that touches PII or masked identifiers before legal review. For a Laravel team this is a procurement gate, not a footnote.
Does Laravel have a built-in alternative to this string masking bundle?
Yes. Laravel 9 and later ship Str::mask($value, '*', 3, 4) plus the fluent Str::of($value)->mask() form, covering the large majority of phone, ID, and card masking needs with zero added dependency risk. For per-field strategies, wrap that in a small Masker service instead of adopting a bundle.
How does this package handle UTF-8, null, and short strings when masking?
The evaluation does not validate this, and it matters because masking is a data-exposure control. Naive implementations break on multibyte and UTF-8 input, null or empty strings, and short values where the mask reveals the entire original. Confirm a real test suite exists before trusting it for anything security-adjacent.
Is the masking logic usable without Twig, for example from a service class?
Unverified. The masking behavior is only confirmed to be reachable through the Twig extension, and whether the author kept the primitive in a framework-agnostic class is unknown until the source is read. If you adopt any part of it, isolate that core class behind your own interface.
How should I test string masking in my Laravel application?
Do not test through a Twig filter in a Laravel codebase. Express the behavior you need as an internal contract such as Masker::maskPhone() and Masker::maskCard(), then test that contract with cases covering UTF-8, null, empty, and very short inputs. The tests then stay valid whether the implementation is this package, a fork, or Str::mask().
Is this package actively maintained and safe to use in production?
Based on the assessment, no. It has zero stars, zero dependents, a single maintainer, a single release cadence, and no disclosed security policy or vulnerability reporting channel. For Laravel teams the recommendation is to reimplement or vendor a small, license-cleared helper rather than carry a stale dependency.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo
bernskioldmedia/laravel-harvest
bernskiold/laravel-data-scrubber
bernskiold/laravel-currency-converter
bernskiold/laravel-campaign-monitor
bernskioldmedia/laravel-autotranslate
siberfx/telegram-bot
roy-sandip/laravel-view-extended
gregsphotography/site-builder-core
roy-sandip/laravel-view
anodyne/blade-fluentui-icons
webx-ui/module-catalog-collections