PHPackages                             sam016/php-textwrap - 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. sam016/php-textwrap

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

sam016/php-textwrap
===================

PHP TextWrap library inspired by python's argparse

v1.0.1(6y ago)04MITPythonPHP ^7.2

Since Aug 24Pushed 5y ago1 watchersCompare

[ Source](https://github.com/sam016/php-textwrap)[ Packagist](https://packagist.org/packages/sam016/php-textwrap)[ RSS](/packages/sam016-php-textwrap/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

php-textwrap
============

[](#php-textwrap)

- [Introduction](#Introduction)
- [Requirements](#Requirements)
- [Installation](#Installation)
- [Development](#Development)
    - [Setup](Setup)
    - [Docker shell](#Docker-shell)
- [Tests](#Tests)
- [Issues](#Issues)

Introduction
------------

[](#introduction)

**php-textwrap** is the library inspired by [Python](https://docs.python.org/)'s [textwrap](https://docs.python.org/3.1/library/textwrap.html)

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

[](#requirements)

Only requirement:

```
php >= 7.2

```

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

[](#installation)

```
composer require sam016/php-textwrap

```

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

[](#development)

### Setup

[](#setup)

1. Build the docker container

    `docker-compose build`
2. Start the docker container

    `docker-compose up`

### Docker shell

[](#docker-shell)

Use the following command to execute inside the docker container

`docker exec -it $(docker ps -aqf 'name=textwrap') bash`

Tests
-----

[](#tests)

Use the following command inside the container to run the test cases

`composer test`

Use the following command from host machine to run the test cases

`docker exec -it $(docker ps -aqf 'name=textwrap') composer test`

Issues
------

[](#issues)

Guidelines for raising the bugs:

1. Please check the existing issues in the **Issues** section before creating a new one.
2. State
    - reproduction steps
    - library version
    - php version
    - crystal clear description about issue
    - did it just get too much?

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 87.5% 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 ~0 days

Total

2

Last Release

2456d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/06c54b0488eb3f250a84e4a500b3da85fc98141cd99a3d51a285c5a048e7cddd?d=identicon)[sam016](/maintainers/sam016)

---

Top Contributors

[![sam016](https://avatars.githubusercontent.com/u/8340854?v=4)](https://github.com/sam016 "sam016 (7 commits)")[![narasimhajupally](https://avatars.githubusercontent.com/u/32263230?v=4)](https://github.com/narasimhajupally "narasimhajupally (1 commits)")

---

Tags

phpphp7text-wrap

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/sam016-php-textwrap/health.svg)

```
[![Health](https://phpackages.com/badges/sam016-php-textwrap/health.svg)](https://phpackages.com/packages/sam016-php-textwrap)
```

###  Alternatives

[marcogermani87/filament-cookie-consent

Easy cookie consent integrations for Filament

1917.0k](/packages/marcogermani87-filament-cookie-consent)

PHPackages © 2026

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