PHPackages                             esi/php-project-template - 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. esi/php-project-template

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

esi/php-project-template
========================

Simple template repository for PHP libraries/projects.

v3.0.1(2mo ago)37[1 issues](https://github.com/ericsizemore/php-project-template/issues)[1 PRs](https://github.com/ericsizemore/php-project-template/pulls)MITPHPPHP &gt;=8.4CI passing

Since Nov 5Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/ericsizemore/php-project-template)[ Packagist](https://packagist.org/packages/esi/php-project-template)[ Docs](https://github.com/ericsizemore/php-project-template)[ Fund](https://ko-fi.com/ericsizemore)[ GitHub Sponsors](https://github.com/ericsizemore)[ RSS](/packages/esi-php-project-template/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (6)Dependencies (12)Versions (12)Used By (0)

PHP Project Template
====================

[](#php-project-template)

[![Build Status](https://camo.githubusercontent.com/6094216eb13d441b52693a23bbd445a8b6668bf488900b37c29457fc81980801/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6572696373697a656d6f72652f7068702d70726f6a6563742d74656d706c6174652f6261646765732f6275696c642e706e673f623d6d61696e)](https://scrutinizer-ci.com/g/ericsizemore/php-project-template/build-status/main)[![Code Coverage](https://camo.githubusercontent.com/afd5d1b5f75b2846942e8c53be486e0fee5aaa49bcfa13dec75ffada9409af06/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6572696373697a656d6f72652f7068702d70726f6a6563742d74656d706c6174652f6261646765732f636f7665726167652e706e673f623d6d61696e)](https://scrutinizer-ci.com/g/ericsizemore/php-project-template/?branch=main)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/deb19807a78a8914687c8d41af383a86e860a3da9352887fdc6066337485b880/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6572696373697a656d6f72652f7068702d70726f6a6563742d74656d706c6174652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d61696e)](https://scrutinizer-ci.com/g/ericsizemore/php-project-template/?branch=main)[![Continuous Integration](https://github.com/ericsizemore/php-project-template/actions/workflows/continuous-integration.yml/badge.svg)](https://github.com/ericsizemore/php-project-template/actions/workflows/continuous-integration.yml)[![Type Coverage](https://camo.githubusercontent.com/af340e3bbef38a4cae753498d3933a11306f87befc8f932127e17099fcfb418f/68747470733a2f2f73686570686572642e6465762f6769746875622f6572696373697a656d6f72652f7068702d70726f6a6563742d74656d706c6174652f636f7665726167652e737667)](https://shepherd.dev/github/ericsizemore/php-project-template)[![Psalm Level](https://camo.githubusercontent.com/6f63ff339986830d9dcd83992bfb5d8a85c744f7043e9c15c46eeaf3a69b658f/68747470733a2f2f73686570686572642e6465762f6769746875622f6572696373697a656d6f72652f7068702d70726f6a6563742d74656d706c6174652f6c6576656c2e737667)](https://shepherd.dev/github/ericsizemore/php-project-template)[![Mutation testing badge](https://camo.githubusercontent.com/4ca99411c36982491b003519d7fdf77744be284c3550b48d16fa7e88733901d3/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e743f7374796c653d666c61742675726c3d687474707325334125324625324662616467652d6170692e737472796b65722d6d757461746f722e696f2532466769746875622e636f6d2532466572696373697a656d6f72652532467068702d70726f6a6563742d74656d706c6174652532466d61696e)](https://dashboard.stryker-mutator.io/reports/github.com/ericsizemore/php-project-template/main)[![Latest Stable Version](https://camo.githubusercontent.com/6774c5f315dd355e74ca4d69e394bb176b8bbd78640b60cec3d242819943c0af/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6573692f7068702d70726f6a6563742d74656d706c6174652e737667)](https://packagist.org/packages/esi/php-project-template)[![Downloads per Month](https://camo.githubusercontent.com/cea04a5a973505d9eb7a05e87c467379a71b97fa0e27a5f378038b39930dbd16/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f6573692f7068702d70726f6a6563742d74656d706c6174652e737667)](https://packagist.org/packages/esi/php-project-template)[![License](https://camo.githubusercontent.com/04dbe57a7caf24fcaf9610a5da0cbf01c46d8d4ade9d6a8f5bb1390fc049d89a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6573692f7068702d70726f6a6563742d74656d706c6174652e737667)](https://packagist.org/packages/esi/php-project-template)

`ericsizemore/php-project-template` started as a template to be used for my own future repos/libraries, with the goal of eventually bringing my current repos to parity with this setup.

This package can be used to create a basic PHP library package/repository, complete with a directory structure and starting files (i.e., README, LICENSE, issue templates, PHPUnit configuration, etc.) commonly found in PHP libraries.

Important

Once you create a new repository based on this template, or a project if via Composer, it is important that you change all mention of 'esi/php-project-template' and 'ericsizemore/php-project-template' to your `vendor/library` and `github-username/repository` name.

Obviously, this is also necessary for the `vendor\namespace` and filenames inside the `src` and `tests` folders. It is also important to setup and modify workflows per [Workflow Setup](#workflow-setup).

Note

Files that may need changed per the above `IMPORTANT` information: all files within the `.github` directory, `composer.json`, `$header` block in `.php-cs-fixer.dist.php`, `CONTRIBUTING.md`, `LICENSE`, `README.md`, and `SECURITY.md`.

Note

The issue templates in `.github/ISSUE_TEMPLATE`, the pull request template at `.github/pull_request_template.md`, and the Renovate config at `renovate.json` assume you have created labels for: `bug`, `dependency`, `enhancement`, `fix`, `unverified`, and `verified`.

Note

You should replace the contents of the included `.gitattributes` file with the contents of `.gitattributes.template`for proper export ignores, etc.

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

[](#installation)

You can install the package via composer:

```
$ composer create-project ericsizemore/php-project-template YOUR-PROJECT-NAME
```

You can also [create a repository from this template](https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-repository-from-a-template) on GitHub.

#### PHP Version Support

[](#php-version-support)

The following table shows the *minimum* PHP requirement needed for each version of this project template.

PHP VersionTemplate VersionPHP 8.4 (current)3.x (current)PHP 8.32.xPHP 8.21.x### Workflow Setup

[](#workflow-setup)

The [`continuous-integration.yml`](.github/workflows/continuous-integration.yml) workflow expects the project to exist on [Scrutinizer](https://scrutinizer-ci.com) so that it can upload coverage reports. It also makes use of [CodeCov](https://about.codecov.io), so it will require a new [repository/action secret](https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions) named `CODECOV_TOKEN`.

[`Renovate`](https://github.com/apps/renovate) is used to handle automated updating of `composer` dependencies with a config file at `renovate.json`. A [`merge-me.yml`](.github/workflows/merge-me.yml) workflow is provided to automatically merge PR's created by Renovate. This requires `Allow auto-merge` to be enabled in repository settings, and a new [repository/action secret](https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions) named `MERGE_TOKEN`.

```
          # Create a token with repository permissions:
          # https://github.com/settings/tokens/new?scopes=repo&description=Merge+Me!+GitHub+Actions+Workflow
          #
          # Set MERGE_TOKEN as an environment variable on your repository:
          # https://github.com/yourname/repo-name/settings/secrets/actions/new
```

The `mutation-test` portion of the [`continuous-integration.yml`](.github/workflows/continuous-integration.yml) workflow sends mutation coverage (handled with [Infection](https://github.com/infection/infection)) information to [Stryker](https://dashboard.stryker-mutator.io) and requires a new [repository/action secret](https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions) named `STRYKER_DASHBOARD_API_KEY`.

Usage
-----

[](#usage)

```
// usage information here
```

About
-----

[](#about)

### Requirements

[](#requirements)

- PHP &gt;= 8.4

### Credits

[](#credits)

- [Eric Sizemore](https://github.com/ericsizemore)
- [All Contributors](https://github.com/ericsizemore/php-project-template/contributors)

### Available Tools

[](#available-tools)

See [Available Tools](./docs/available-tools.md).

### Contributing

[](#contributing)

See [CONTRIBUTING](./CONTRIBUTING.md).

Bugs and feature requests are tracked on [GitHub](https://github.com/ericsizemore/php-project-template/issues).

### Contributor Covenant Code of Conduct

[](#contributor-covenant-code-of-conduct)

See [CODE\_OF\_CONDUCT.md](./CODE_OF_CONDUCT.md)

### Backward Compatibility Promise

[](#backward-compatibility-promise)

See [backward-compatibility.md](./backward-compatibility.md) for more information on Backwards Compatibility.

### Changelog

[](#changelog)

See the [CHANGELOG](./CHANGELOG.md) for more information on what has changed recently.

### License

[](#license)

See the [LICENSE](./LICENSE) for more information on the license that applies to this project.

### Security

[](#security)

See [SECURITY](./SECURITY.md) for more information on the security disclosure process.

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance82

Actively maintained with recent releases

Popularity8

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 94.3% 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 ~68 days

Recently: every ~51 days

Total

8

Last Release

80d ago

Major Versions

1.0.x-dev → v2.0.02025-08-05

2.0.x-dev → v3.0.02026-02-27

PHP version history (3 changes)v1.0.0PHP &gt;=8.2

v2.0.0PHP &gt;=8.3

v3.0.0PHP &gt;=8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/b7181952b087db2a847c6b90d5cc5e53948e66229ad16acf92ccca3e8767cb92?d=identicon)[ericsizemore](/maintainers/ericsizemore)

---

Top Contributors

[![renovate[bot]](https://avatars.githubusercontent.com/in/2740?v=4)](https://github.com/renovate[bot] "renovate[bot] (395 commits)")[![ericsizemore](https://avatars.githubusercontent.com/u/723810?v=4)](https://github.com/ericsizemore "ericsizemore (23 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

---

Tags

phpphp-libraryphp-library-templatephp-projectphp-project-templatephpphp-projectPHP Libraryericsizemorephp-library-templatephp-project-template

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Psalm, Rector

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/esi-php-project-template/health.svg)

```
[![Health](https://phpackages.com/badges/esi-php-project-template/health.svg)](https://phpackages.com/packages/esi-php-project-template)
```

###  Alternatives

[niiknow/bayes

a machine learning lib

6950.0k](/packages/niiknow-bayes)[amirezaeb/heroqr

A Powerful QR Code Management Library For PHP

9510.3k](/packages/amirezaeb-heroqr)[imanghafoori/laravel-anypass

A minimal yet powerful package to help you in development.

21421.6k](/packages/imanghafoori-laravel-anypass)

PHPackages © 2026

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