PHPackages                             malukenho/docheader - 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. malukenho/docheader

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

malukenho/docheader
===================

A small library to check header docs

1.1.0(2y ago)68380.8k↓19.9%8[1 PRs](https://github.com/malukenho/docheader/pulls)20MITPHPPHP ^8.0

Since May 23Pushed 2y ago3 watchersCompare

[ Source](https://github.com/malukenho/docheader)[ Packagist](https://packagist.org/packages/malukenho/docheader)[ Docs](https://github.com/malukenho/docheader)[ RSS](/packages/malukenho-docheader/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (6)Versions (13)Used By (20)

DocHeader
=========

[](#docheader)

[![Build Status](https://camo.githubusercontent.com/b5f13986537c25a3aa0984147e50450a80309d049a9a61e5955b3f48af7d5964/68747470733a2f2f7472617669732d63692e6f72672f6d616c756b656e686f2f646f636865616465722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/malukenho/docheader)[![Code Coverage](https://camo.githubusercontent.com/e4d8e7ce5231af21e1458fed9877c16bff9b2cb630cef1ee24b332f00b7de3a6/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d616c756b656e686f2f646f636865616465722f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/malukenho/docheader/?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/e3f650087427fab221b082fe1ca9ce4dc2c680446a0507888c659bfd78838627/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d616c756b656e686f2f646f636865616465722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/malukenho/docheader/?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/b7bad110ea2df1634c5132947469c1225eeb700ad1f98276efc4191147c33a80/68747470733a2f2f706f7365722e707567782e6f72672f6d616c756b656e686f2f646f636865616465722f762f737461626c65)](https://packagist.org/packages/malukenho/docheader)[![Total Downloads](https://camo.githubusercontent.com/dcc168f946ca2a2a1affdebdad47274c31c54575619a8dba127e291b53eb79e8/68747470733a2f2f706f7365722e707567782e6f72672f6d616c756b656e686f2f646f636865616465722f646f776e6c6f616473)](https://packagist.org/packages/malukenho/docheader)[![Latest Unstable Version](https://camo.githubusercontent.com/06a2f1dbcc4a4d55de4b5c768f0038e1680b76cfc58ef5870bf9bd757a1ad873/68747470733a2f2f706f7365722e707567782e6f72672f6d616c756b656e686f2f646f636865616465722f762f756e737461626c65)](https://packagist.org/packages/malukenho/docheader)[![License](https://camo.githubusercontent.com/ac91c56a8bb3fb52cc4b86a6178ab4ce673b7452ef53b661ecbcf727ddeb93df/68747470733a2f2f706f7365722e707567782e6f72672f6d616c756b656e686f2f646f636865616465722f6c6963656e7365)](https://packagist.org/packages/malukenho/docheader)

How much time we have wasted to change copyright years in our project? How much times we forget to update it and then we're in the middle of a new year using last year copyright dated? *That's sucks!!one!!*

**Put doc header check in your build and get it out of your way!**

### Installing

[](#installing)

```
 composer require --dev --sort-packages malukenho/docheader
```

### Setting up

[](#setting-up)

Put your header in one `.docheader` file in the directory that you're running the checker/fixer. It file must contain only the dockblock as you want, like following example:

```
/**
 * Zend Framework (http://framework.zend.com/)
 *
 * @link      http://github.com/zendframework/zf2 for the canonical source repository
 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
 * @license   http://framework.zend.com/license/new-bsd New BSD License
 */
```

and then run the checker:

```
./vendor/bin/docheader check src/
```

So, you get errors or a message saying that everything is ok!

### Docheader file

[](#docheader-file)

By default, the `docheader` search for a `.docheader` file on the current directory that the command is executed. But you can specify a folder or a file to be used as placeholder using the option `--docheader [file-or-path]`

### Current year placeholder

[](#current-year-placeholder)

You can also put `%year%` on your `.docheader` file to refer to the current Year, like that:

```
/**
 * @copyright Copyright (c) 2005-%year% Zend Technologies USA Inc. (http://www.zend.com)
 */
```

### Regexp assertion

[](#regexp-assertion)

If you're using `>=0.1.5` version, you can use the `%regexp:%` placeholder to match some content.

Example:

```
/**
 * @copyright Copyright (c) 20%regexp:\d{2}%-2016 Zend Technologies USA Inc. (http://www.zend.com)
 */
```

In this case `%regexp:\d{2}%` assert that it should be a number of two digits between `20` and `-`.

###  Health Score

48

—

FairBetter than 95% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity50

Moderate usage in the ecosystem

Community36

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor1

Top contributor holds 66.1% 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 ~281 days

Recently: every ~617 days

Total

11

Last Release

834d ago

Major Versions

0.1.8 → 1.0.02022-07-12

PHP version history (3 changes)0.1.1PHP ~5.5|^7.0

0.1.8PHP ^7.1 | ^8.0

1.0.0PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/7140a8c7b834b07674c6bd74d6cb75792522ceba17dfb1f347489083a0ba1c48?d=identicon)[malukenho](/maintainers/malukenho)

---

Top Contributors

[![malukenho](https://avatars.githubusercontent.com/u/3275172?v=4)](https://github.com/malukenho "malukenho (41 commits)")[![Chris8934](https://avatars.githubusercontent.com/u/44963939?v=4)](https://github.com/Chris8934 "Chris8934 (13 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (4 commits)")[![othillo](https://avatars.githubusercontent.com/u/2786663?v=4)](https://github.com/othillo "othillo (1 commits)")[![henriquemoody](https://avatars.githubusercontent.com/u/154023?v=4)](https://github.com/henriquemoody "henriquemoody (1 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![michalbundyra](https://avatars.githubusercontent.com/u/7423207?v=4)](https://github.com/michalbundyra "michalbundyra (1 commits)")

---

Tags

checkerdocheaderphpplaceholderstatic analysisCode stylelicensecode standard

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/malukenho-docheader/health.svg)

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

###  Alternatives

[friendsofphp/php-cs-fixer

A tool to automatically fix PHP code style

13.5k234.7M20.6k](/packages/friendsofphp-php-cs-fixer)[coenjacobs/mozart

Composes all dependencies as a package inside a WordPress plugin

4723.6M20](/packages/coenjacobs-mozart)[php-stubs/generator

Generate stubs from any PHP code for IDE completion and static analysis.

79291.0k45](/packages/php-stubs-generator)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[codelytv/coding-style

PHP Coding Style rules we use in Codely

5633.5k8](/packages/codelytv-coding-style)[giacocorsiglia/stubs-generator

Generate stubs from any PHP code for IDE completion and static analysis.

25123.0k12](/packages/giacocorsiglia-stubs-generator)

PHPackages © 2026

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