PHPackages                             twent/design-patterns - 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. twent/design-patterns

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

twent/design-patterns
=====================

Learn design patterns

0.3.4(3y ago)014GPL-3.0-onlyPHPPHP &gt;=8.1

Since Feb 7Pushed 3y ago1 watchersCompare

[ Source](https://github.com/twent/design-patterns-php)[ Packagist](https://packagist.org/packages/twent/design-patterns)[ RSS](/packages/twent-design-patterns/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (3)Versions (8)Used By (0)

Design patterns
===============

[](#design-patterns)

[![Stable Version](https://camo.githubusercontent.com/ef0dbafa7ddfbc9f4c05b730a8deb982c0d07fbd8a7468b7e515f18fcd65ce34/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7477656e742f64657369676e2d7061747465726e733f6c6162656c3d737461626c65)](https://packagist.org/packages/twent/design-patterns)[![Packagist PHP Version](https://camo.githubusercontent.com/87876d1982e5c8c0d8f856468d5cff313fd3748a4712b00785579e0fc456896c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f7477656e742f64657369676e2d7061747465726e732f706870)](https://packagist.org/packages/twent/design-patterns)[![CI Status](https://github.com/twent/design-patterns-php/actions/workflows/build.yml/badge.svg)](https://github.com/twent/design-patterns-php/actions)[![Tests Coverage](https://raw.githubusercontent.com/twent/design-patterns-php/master/badge.svg)](https://github.com/twent/design-patterns-php/actions)

This project has been created for learning design patterns with PHP.

How to use:

1. Run `composer require twent/design-patterns:`

How to dev:

1. Clone this repo or run `composer create-project twent/design-patterns:dev-master`
2. Run `make && make test`

Design patterns list
--------------------

[](#design-patterns-list)

1. Creational / Пораждающие:
    1. Singleton
    2. Factory
    3. Factory method
    4. Static Factory
    5. Abstract Factory
    6. Builder
    7. Prototype
    8. Pool
2. Structural / Структурные
    1. Dependency Injection
    2. Registry
    3. Composite
    4. Adapter / Wrapper
    5. Bridge
    6. Data mapper
    7. Decorator
    8. Facade
    9. Fluent Interface
    10. Flyweight
    11. Proxy

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 68.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 ~4 days

Total

7

Last Release

1166d ago

PHP version history (2 changes)0.1.0PHP ^8.1

0.2.1PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/0c64e3745d820c3c36c1a7f76bdc59a50211790c81fc962219825349f315b3ec?d=identicon)[twent](/maintainers/twent)

---

Top Contributors

[![twent](https://avatars.githubusercontent.com/u/7511983?v=4)](https://github.com/twent "twent (43 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (20 commits)")

---

Tags

design-patternsdisign-patternlearnlearningobject-oriented-programmingooppatternsphp

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/twent-design-patterns/health.svg)

```
[![Health](https://phpackages.com/badges/twent-design-patterns/health.svg)](https://phpackages.com/packages/twent-design-patterns)
```

###  Alternatives

[hgtan/symfony-pre-commit

A Symfony pre-commit hook

1633.6k](/packages/hgtan-symfony-pre-commit)

PHPackages © 2026

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