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

Text Wrap Laravel Package

treestoneit/text-wrap

A PHP text-wrapping utility for Laravel that breaks long strings into fixed-width lines. Wrap plain text or HTML safely, preserve whole words, and control line length for emails, reports, consoles, and any output where clean, readable formatting matters.

View on GitHub
Deep Wiki
Context7

treestoneit/text-wrap is a lightweight PHP utility for wrapping and formatting text to a fixed width. It helps you keep output readable in terminals, plain-text emails, reports, and generated documents by breaking long strings into neatly sized lines—without cutting words mid-token unless you ask it to.

  • Configurable width for any line length or column layout
  • Word-aware wrapping that avoids splitting words by default
  • Custom break characters and hard-break support for long tokens
  • Multibyte-safe handling for UTF-8 content
  • Simple API with no framework dependencies
Frequently asked questions about Text Wrap
What is treestoneit/text-wrap used for?
It is described as a lightweight PHP utility for wrapping and formatting text to a fixed width, with configurable line length, word-aware wrapping, custom break characters, hard-break support, and multibyte-safe handling. The intended use cases are terminals, plain-text emails, reports, and generated documents. However, the TPM assessment found the repository behaves like a Laravel Nova field, so confirm the actual artifact before relying on the README wording.
Does treestoneit/text-wrap work with Laravel?
The overview claims no framework dependencies, but the repository assessment describes a Laravel Nova Text field, a service provider calling Nova::script() and Nova::style(), and a compiled Vue component. That means Laravel usefulness depends on which artifact is authoritative. Do not assume modern Laravel support: the last release was 2018-08-31, before Nova 3/4/5, Vue 3, Inertia, Vite, and PHP 8.
Which Laravel and Nova versions are supported?
There is no evidence of support for current Laravel or Nova releases. The last release date is 2018-08-31, which points to Nova 1.x/2.x, PHP 7.x, Vue 2, and Laravel Mix. Composer will likely refuse to resolve against a modern laravel/nova constraint, and forcing resolution will not make the old Vue 2 asset bundle run in a modern Nova toolchain.
How do I install treestoneit/text-wrap?
A normal Composer install would start with composer require treestoneit/text-wrap, but first verify whether you are installing a plain PHP text wrapper or a Nova field. If it is the Nova field, expect provider registration and published assets in addition to the Composer package. Because the package is archived and dates to 2018, test dependency resolution on your target stack before committing.
Is treestoneit/text-wrap multibyte-safe for UTF-8?
The overview explicitly claims multibyte-safe handling for UTF-8 content, which matters for accented characters, CJK text, and emoji in wrapped output. That claim needs verification against the shipped code, especially given the package identity mismatch. Add tests with real multilingual strings before using it in emails or reports.
Can treestoneit/text-wrap wrap HTML safely?
The blurb mentions wrapping plain text or HTML safely, but the detailed overview describes a plain-text formatting utility. If the shipped artifact is a Nova field, grep resources/js/field.js for v-html or innerHTML before use, because rendering operator-visible data as raw HTML inside an authenticated admin panel creates stored XSS risk. Treat it as a formatter, not an HTML sanitizer.
Does treestoneit/text-wrap split words?
By default the utility is described as word-aware, so it avoids cutting words mid-token. It also supports custom break characters and hard-break behavior for long unbroken tokens when you explicitly need that. Configure the width and break behavior to match your terminal, email, or report column.
Is treestoneit/text-wrap still maintained?
No. The package is archived, has no security contact, no upgrade path, and no upstream maintenance, with the last release on 2018-08-31. Adoption means inheriting the maintenance obligation in full. The low adoption signals, including 10 stars and 0 dependents, reinforce that this is not an actively supported dependency.
What are better alternatives to treestoneit/text-wrap?
For plain PHP wrapping, use the built-in wordwrap() or a maintained multibyte-safe string library instead of a 2018 archived package. For Nova table readability, try Text::make(...)->displayUsing(fn ($v) => $v) plus a theme override, or build a small in-repo field with php artisan nova:field. Those options cost less to own than carrying a fork of an abandoned package.
Should I use treestoneit/text-wrap in production?
The TPM assessment is a no-go under either reading of the package. If the need is CSS-level wrapping in Nova, a displayUsing callback plus theme override likely closes it; if the need is a text utility, wordwrap() or a maintained library is safer. If you still accept the package, assign an owner for the fork, a smoke test, the next Nova upgrade, and a security review of the shipped JavaScript.
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.
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle
glavweb/extra-bundle