PHPackages                             haspadar/php-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. haspadar/php-skeleton

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

haspadar/php-skeleton
=====================

Reusable template for PHP libraries: Composer, CI, static analysis — all synced via one script

06PHPCI passing

Since Aug 16Pushed 9mo agoCompare

[ Source](https://github.com/haspadar/php-skeleton)[ Packagist](https://packagist.org/packages/haspadar/php-skeleton)[ RSS](/packages/haspadar-php-skeleton/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

🧊 Skeleton
==========

[](#-skeleton)

[![PHP Version](https://camo.githubusercontent.com/b37db47746bb49d291c47c3cc8fabd15219dc271ef4a998933fcd59e950d22b3/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e342d626c7565)](https://www.php.net/releases/8.4/)[![Code Style](https://camo.githubusercontent.com/214e62ff4dcc50f7a50860c9a053af7f6db67a64a0f0b0718dd1e246aec3980f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f436f64652532305374796c652d5053522d2d31322d626c7565)](https://github.com/FriendsOfPHP/PHP-CS-Fixer)[![Psalm](https://camo.githubusercontent.com/8ed831918c897d26a357e18e30ccfe73b2882f59ffe3b9980abbc1b9f57257f4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7073616c6d2d6c6576656c253230382d627269676874677265656e)](https://psalm.dev)

---

ℹ️ About
--------

[](#ℹ️-about)

Skeleton is a **template for EO-style PHP libraries**.
It provides a ready-to-use boilerplate with the same checks and structure
that will be reused across many future EO projects.

It comes with:

- consistent README header and footer sections;
- predefined CI pipeline (phpstan, psalm, rector, php-cs-fixer, infection, phpunit);
- examples of decomposition into small, final, immutable classes;
- sample I/O wrappers, tasks, and fakes for tests.

### Usage

[](#usage)

The entrypoint is `bin/skeleton.php`.

It works in two modes:

1. **Copy-as-is** – copies template files into your target directory.
2. **Section replacement** – replaces README sections with your project-specific values.

Arguments:

- `--vendor=VendorName`
- `--repo=repo-name`
- `--namespace=MyNamespace`

Defaults are guessed from your current Git repo.

```
php bin/skeleton.php --vendor=haspadar --repo=php-skeleton --namespace=PhpSkeleton
```

[![Skeleton CLI Demo](docs/demo.png)](docs/demo.png)

This will generate a README and boilerplate code with the provided values.

---

🧠 Philosophy
------------

[](#-philosophy)

- ❌ No `null`, `static`, or shared state in the public API
- ✅ One object = one responsibility
- ✅ Final classes, immutability by default
- ✅ Composition over inheritance
- ✅ Behavior and data live together

Inspired by [Elegant Objects](https://www.yegor256.com/elegant-objects.html) and [cactoos](https://github.com/yegor256/cactoos).
--------------------------------------------------------------------------------------------------------------------------------

[](#inspired-by-elegant-objects-and-cactoos)

🧪 Quality &amp; CI
------------------

[](#-quality--ci)

Every push and pull request is checked via GitHub Actions:

- ✅ Static analysis with [PHPStan](https://phpstan.org/) (level 9) and [Psalm](https://psalm.dev/) (level 8)
- ✅ Type coverage report via [Shepherd](https://shepherd.dev/)
- ✅ Code style check with [PHP-CS-Fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer) (only changed files)
- ✅ Unit tests with [PHPUnit](https://phpunit.de)
- ✅ Code coverage via [Codecov](https://codecov.io/)
- ✅ Mutation testing with [Infection](https://infection.github.io)
- ✅ Composer validation, platform checks, security audit
- ✅ Automatic refactoring via [Rector](https://github.com/rectorphp/rector)

---

📥 Installation
--------------

[](#-installation)

```
composer require haspadar/php-skeleton
```

Requires PHP 8.4
----------------

[](#requires-php-84)

📄 License
---------

[](#-license)

[MIT](LICENSE)

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance41

Moderate activity, may be stable

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity13

Early-stage or recently created project

 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.

### Community

Maintainers

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

---

Top Contributors

[![haspadar](https://avatars.githubusercontent.com/u/1282194?v=4)](https://github.com/haspadar "haspadar (1 commits)")

### Embed Badge

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

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

PHPackages © 2026

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