PHPackages                             ramsey/php-library-skeleton - 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. [Templating &amp; Views](/categories/templating)
4. /
5. ramsey/php-library-skeleton

Abandoned → [ramsey/php-library-starter-kit](/?search=ramsey%2Fphp-library-starter-kit)Project[Templating &amp; Views](/categories/templating)

ramsey/php-library-skeleton
===========================

A starter kit for quickly setting up a new PHP library package.

3.5.6(1y ago)26034727[1 issues](https://github.com/ramsey/php-library-starter-kit/issues)[1 PRs](https://github.com/ramsey/php-library-starter-kit/pulls)MITPHPPHP ^8.1CI passing

Since Jan 3Pushed 2w ago5 watchersCompare

[ Source](https://github.com/ramsey/php-library-starter-kit)[ Packagist](https://packagist.org/packages/ramsey/php-library-skeleton)[ RSS](/packages/ramsey-php-library-skeleton/feed)WikiDiscussions main Synced 3d ago

READMEChangelog (10)Dependencies (4)Versions (34)Used By (0)

PHP Library Starter Kit
=======================

[](#php-library-starter-kit)

 **A starter kit for quickly setting up a new PHP library package.**

 [![Source Code](https://camo.githubusercontent.com/a89aa4cf676b476153f8509ee260fa77336fb2b0fe29d9c66086e6ba5df53533/687474703a2f2f696d672e736869656c64732e696f2f62616467652f736f757263652d72616d7365792f7068702d2d6c6962726172792d2d737461727465722d2d6b69742d626c75652e7376673f7374796c653d666c61742d737175617265)](https://github.com/ramsey/php-library-starter-kit) [![Download Package](https://camo.githubusercontent.com/e4df38ff1323b891c37b53408b7e8c9c3a0e247dd151fe1b6dd9f21f65d2b2f2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f72616d7365792f7068702d6c6962726172792d737461727465722d6b69742e7376673f7374796c653d666c61742d737175617265266c6162656c3d72656c65617365)](https://packagist.org/packages/ramsey/php-library-starter-kit) [![PHP Programming Language](https://camo.githubusercontent.com/343e5ff0f15728e0c4ff2d2b6fde708cbf5d06a1a413f4cf6c60c294464e2e36/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f72616d7365792f7068702d6c6962726172792d737461727465722d6b69742e7376673f7374796c653d666c61742d73717561726526636f6c6f72423d253233383839324246)](https://php.net) [![Read License](https://camo.githubusercontent.com/dd705804f6fb3714b5c22ef0dc4f401a239b052d3ce0498e424690b3f26a4cf5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f72616d7365792f7068702d6c6962726172792d737461727465722d6b69742e7376673f7374796c653d666c61742d73717561726526636f6c6f72423d6461726b6379616e)](https://github.com/ramsey/php-library-starter-kit/blob/main/LICENSE) [![Build Status](https://camo.githubusercontent.com/3e8ace6293c02e1ec1ad7e562f851352df2e1bd81cb00bf4cdd629c9cbcf9bdd/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f72616d7365792f7068702d6c6962726172792d737461727465722d6b69742f636f6e74696e756f75732d696e746567726174696f6e2e796d6c3f6272616e63683d6d61696e267374796c653d666c61742d737175617265266c6f676f3d676974687562)](https://github.com/ramsey/php-library-starter-kit/actions/workflows/continuous-integration.yml) [![Codecov Code Coverage](https://camo.githubusercontent.com/9603a7477cb03c34f5546a18281eac61f3f7f891fb464737d9cc06ae31413b5f/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f67682f72616d7365792f7068702d6c6962726172792d737461727465722d6b69743f6c6162656c3d636f6465636f76266c6f676f3d636f6465636f76267374796c653d666c61742d737175617265)](https://codecov.io/gh/ramsey/php-library-starter-kit) [![Psalm Type Coverage](https://camo.githubusercontent.com/22444fd20aa79da55d3e34268af69cfbc64838bb63813307a494f3f78cfc538f/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e743f7374796c653d666c61742d7371756172652675726c3d687474707325334125324625324673686570686572642e64657625324667697468756225324672616d7365792532467068702d6c6962726172792d737461727465722d6b6974253246636f766572616765)](https://shepherd.dev/github/ramsey/php-library-starter-kit)

About
-----

[](#about)

ramsey/php-library-starter-kit is a package that may be used to generate a basic PHP library project directory structure, complete with many of the starting files (i.e. README, LICENSE, GitHub issue templates, PHPUnit configuration, etc.) that are commonly found in PHP libraries. You may use the project directory that's created as a starting point for creating your own PHP libraries.

This project adheres to a [code of conduct](CODE_OF_CONDUCT.md). By participating in this project and its community, you are expected to uphold this code.

Usage
-----

[](#usage)

```
composer create-project ramsey/php-library-starter-kit YOUR-PROJECT-NAME
```

Running this command will create a new repository containing the same files and structure as this repository. Afterward, it will run the `Ramsey\Dev\LibraryStarterKit\Wizard::start()` method to set up the project, which will walk you through a series of questions and make changes to files based on your answers. When complete, it will remove the `./src/LibraryStarterKit` and `./tests/LibraryStarterKit`directories, leaving everything else in place with an initial commit.

### Using An Existing Answers File

[](#using-an-existing-answers-file)

When executing `create-project`, if you exit the program while in the middle of the question prompts, you might notice it creates a `.starter-kit-answers` file in the project directory. When you return later and run `composer starter-kit`, it will use this file to pre-fill any questions you've already answered. Once finished, the starter kit removes this file.

You may also use an existing answers file to provide all your answers to the prompts, including skipping the question prompts. To do this, set an environment variable with the path to your answers file:

```
STARTER_KIT_ANSWERS_FILE=/path/to/starter-kit-answers.json
```

To skip the question prompts, make sure you include the `skipPrompts` property in the answers file, and set it to `true`.

The answers file is a JSON object, consisting of all the public properties found in `Ramsey\Dev\LibraryStarterKit\Answers`.

For example:

```
{
    "authorEmail": "author@example.com",
    "authorHoldsCopyright": true,
    "authorName": "Author Smith",
    "authorUrl": "https://example.com/",
    "codeOfConduct": "Contributor-2.0",
    "codeOfConductCommittee": null,
    "codeOfConductEmail": "conduct@example.com",
    "codeOfConductPoliciesUrl": null,
    "codeOfConductReportingUrl": null,
    "copyrightEmail": "author@example.com",
    "copyrightHolder": "Acme, Inc.",
    "copyrightUrl": "https://example.com/acme",
    "copyrightYear": "2021",
    "githubUsername": "example",
    "license": "MIT",
    "packageDescription": "An awesome library that does stuff.",
    "packageKeywords": [
        "awesome",
        "stuff"
    ],
    "packageName": "acme/awesome",
    "packageNamespace": "Acme\\Awesome",
    "projectName": "My Awesome Library",
    "securityPolicy": true,
    "securityPolicyContactEmail": "security@example.com",
    "securityPolicyContactFormUrl": null,
    "skipPrompts": true,
    "vendorName": "acme"
}
```

Contributing
------------

[](#contributing)

Contributions are welcome! To contribute, please familiarize yourself with [CONTRIBUTING.md](CONTRIBUTING.md).

Coordinated Disclosure
----------------------

[](#coordinated-disclosure)

Keeping user information safe and secure is a top priority, and we welcome the contribution of external security researchers. If you believe you've found a security issue in software that is maintained in this repository, please read [SECURITY.md](SECURITY.md) for instructions on submitting a vulnerability report.

FAQs
----

[](#faqs)

### Why did you include package/tool *x* and not *y*?

[](#why-did-you-include-packagetool-x-and-not-y)

I created this project starter kit for my own uses, and these are the common files, packages, and tools I use in my PHP libraries. If you like what you see, feel free to use it. If you like some of it but not all, fork it and customize it to fit your needs. I hope you find it helpful!

Copyright and License
---------------------

[](#copyright-and-license)

ramsey/php-library-starter-kit is copyright © [Ben Ramsey](https://benramsey.com)and licensed for use under the terms of the MIT License (MIT). Please see [LICENSE](LICENSE) for more information.

###  Health Score

55

—

FairBetter than 98% of packages

Maintenance73

Regular maintenance activity

Popularity31

Limited adoption so far

Community21

Small or concentrated contributor base

Maturity81

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 83.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 ~72 days

Recently: every ~163 days

Total

32

Last Release

434d ago

Major Versions

1.1.1 → 2.0.02020-05-29

2.1.4 → 3.0.02021-07-14

PHP version history (4 changes)1.0.0PHP ^7.2

2.0.0PHP ^7.4

3.0.0PHP ^7.4 || ^8

3.5.0PHP ^8.1

### Community

Maintainers

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

---

Top Contributors

[![ramsey](https://avatars.githubusercontent.com/u/42941?v=4)](https://github.com/ramsey "ramsey (211 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (37 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (2 commits)")[![eliatcodecov](https://avatars.githubusercontent.com/u/87772943?v=4)](https://github.com/eliatcodecov "eliatcodecov (1 commits)")[![rodrigoprimo](https://avatars.githubusercontent.com/u/77215?v=4)](https://github.com/rodrigoprimo "rodrigoprimo (1 commits)")[![szepeviktor](https://avatars.githubusercontent.com/u/952007?v=4)](https://github.com/szepeviktor "szepeviktor (1 commits)")[![upyx](https://avatars.githubusercontent.com/u/6064612?v=4)](https://github.com/upyx "upyx (1 commits)")

---

Tags

composer-commandslibraryphpskeletonpackagelibrarybuildertemplateSkeleton

### Embed Badge

![Health badge](/badges/ramsey-php-library-skeleton/health.svg)

```
[![Health](https://phpackages.com/badges/ramsey-php-library-skeleton/health.svg)](https://phpackages.com/packages/ramsey-php-library-skeleton)
```

PHPackages © 2026

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