malukenho/docheader
Laravel package that adds and manages standardized documentation headers in your source files. Generate consistent file/class docblocks with project metadata, author, license, and timestamps, helping teams enforce style and keep headers up to date automatically.
composer require --dev malukenho/docheaderphp artisan vendor:publish --provider="Malukenho\DocHeader\DocHeaderServiceProvider" to publish the config (config/docheader.php) and stubsconfig/docheader.php β adjust templates for license, author, year, file type, etc.php artisan docheader:generate to scan app/ and add headers to PHP files missing themπ‘ Ideal for onboarding new projects or cleaning up legacy codebases β start with a dry run:
php artisan docheader:generate --dry-run
php artisan docheader:check to your pipeline (e.g., GitHub Actions, GitLab CI) to fail if any file lacks a compliant headerhusky + lint-staged or simple Git hooks to auto-fix headers on staged PHP files:
php artisan docheader:apply --only-staged
@docblock-header ignore in a fileβs docblock to exclude it from updatescompany-header) and override per directory via config or --config flag for multirepo setupsphp artisan docheader:generate --path=app/Models to avoid touching tests or config'year' => 2025) or flag (--year=2024) to avoid unnecessary diffsgenerate skips files with any valid header; update forces rewrite β use --force with care in shared repos--filter=.*Test\.php$ to skip test headers during bulk ops; configure skip_patterns in config/docheader.php\Malukenho\DocHeader\HeaderGenerator to inject custom tokens (e.g., {gitBranch} or {composerVersion})composer update --with-all-dependencies; check config/docheader.php uses phpstan-style docblocks (/** not /*!)config/docheader.php, add 'laravel' => true to auto-include @license MIT and @link https://laravel.com/docs/{version} via dynamic tokensHow can I help you explore Laravel packages today?