PHPackages                             makinacorpus/php-header-fixer - 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. makinacorpus/php-header-fixer

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

makinacorpus/php-header-fixer
=============================

Fixes headers in HTML text

1.1.1(2y ago)14331MITPHPPHP &gt;=8.0

Since Apr 12Pushed 2y ago12 watchersCompare

[ Source](https://github.com/makinacorpus/php-header-fixer)[ Packagist](https://packagist.org/packages/makinacorpus/php-header-fixer)[ RSS](/packages/makinacorpus-php-header-fixer/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (1)Versions (5)Used By (1)

Header fixer
------------

[](#header-fixer)

Usage
-----

[](#usage)

Fixes header semantic hierarchy in HTML text.

```
$fixedHtmlText = \MakinaCorpus\HeaderFixer\Header::fix($originalHtmlText, 0, true);
```

And that is pretty much it.

Options are:- `0` is the decal, if you, for example, want the text to start with `h2` instead of `h1`, then set `1` here, for `h3` set `2`, etc...
- `true` is the *relocate orphans* options, if set to true, when a title is the single one at his own level, with no siblings, it will be put at a higher level side by side its parent.

TODOLIST
--------

[](#todolist)

- implement a generic twig filter
- implement a drupal 7 module (another repo, including jolitypo)
- implement a drupal 8 module (another repo, including jolitypo)

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~701 days

Total

4

Last Release

849d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/69252826f3a70a19fc5dcefb7ef9d26d465bb300245641abb4dd89d0ec391a66?d=identicon)[pounard](/maintainers/pounard)

![](https://www.gravatar.com/avatar/d21b98752b406528da88850922b1061f39bf72eb2126b413d5c12e275811a40b?d=identicon)[Makina Corpus](/maintainers/Makina%20Corpus)

---

Top Contributors

[![pounard](https://avatars.githubusercontent.com/u/341855?v=4)](https://github.com/pounard "pounard (9 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/makinacorpus-php-header-fixer/health.svg)

```
[![Health](https://phpackages.com/badges/makinacorpus-php-header-fixer/health.svg)](https://phpackages.com/packages/makinacorpus-php-header-fixer)
```

###  Alternatives

[datlechin/flarum-chatgpt

ChatGPT: AI-powered Auto-Reply Extension for Flarum.

143.5k](/packages/datlechin-flarum-chatgpt)

PHPackages © 2026

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