PHPackages                             guibranco/pancake - 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. guibranco/pancake

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

guibranco/pancake
=================

The Pancake project, a toolkit for PHP projects

v1.7.20(1w ago)316.2k5[5 issues](https://github.com/guibranco/Pancake/issues)[5 PRs](https://github.com/guibranco/Pancake/pulls)MITPHPCI passing

Since Mar 19Pushed 2d agoCompare

[ Source](https://github.com/guibranco/Pancake)[ Packagist](https://packagist.org/packages/guibranco/pancake)[ RSS](/packages/guibranco-pancake/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (10)Dependencies (6)Versions (391)Used By (0)

🥞 Pancake
=========

[](#-pancake)

> A lightweight, composable toolkit for PHP 8.4+ projects.

[![CI](https://github.com/guibranco/pancake/actions/workflows/ci.yml/badge.svg)](https://github.com/guibranco/pancake/actions/workflows/ci.yml)[![GitHub license](https://camo.githubusercontent.com/d50be53ed40f15c4b650f9f39ec3c6ff5b61bec4a759ba7f336165262c9644bd/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6775696272616e636f2f70616e63616b65)](https://github.com/guibranco/pancake/blob/main/LICENSE)[![Packagist Version](https://camo.githubusercontent.com/f646614af25d5db4af4bf2b2c51c3de3d5e1d540e1fa314c6cd2afc8e42e1bd8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6775696272616e636f2f70616e63616b652e737667)](https://packagist.org/packages/guibranco/pancake)[![Packagist Downloads](https://camo.githubusercontent.com/55b3f9c699620e8b3091d6c325cbf857f0d49ff6f9bf8c1e192eeeeaefc4536e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6775696272616e636f2f70616e63616b65)](https://packagist.org/packages/guibranco/pancake)[![Time tracker](https://camo.githubusercontent.com/51bc983355ee7174743c77e4eed178c43ecfa01f10a5e410e04ac0d42a44a769/68747470733a2f2f77616b6174696d652e636f6d2f62616467652f6769746875622f6775696272616e636f2f70616e63616b652e737667)](https://wakatime.com/badge/github/guibranco/pancake)

[![Pancake logo](https://raw.githubusercontent.com/guibranco/pancake/main/logo.png)](https://raw.githubusercontent.com/guibranco/pancake/main/logo.png)

📖 **Documentation:** [guibranco.github.io/pancake](https://guibranco.github.io/pancake/)

---

Table of contents
-----------------

[](#table-of-contents)

- [Features](#features)
- [CI/CD](#cicd)
- [Code quality](#code-quality)
- [Installation](#installation)
- [User guide](#user-guide)
- [Testing](#testing)
- [Changelog](#changelog)
- [Contributing](#contributing)
- [Support](#support)

---

Features
--------

[](#features)

Pancake provides a curated set of battle-tested utility classes, ready to drop into any PHP project:

ClassDescription[`CircuitBreaker`](https://guibranco.github.io/pancake/user-guide/basic-usage/)Prevents cascading failures with open/half-open/closed state management[`Color`](https://guibranco.github.io/pancake/user-guide/color/)Color conversion and manipulation utilities[`Database`](https://guibranco.github.io/pancake/user-guide/database/)Thin PDO wrapper with query building helpers[`GUIDv4`](https://guibranco.github.io/pancake/user-guide/guid-v4/)RFC 4122-compliant UUID v4 generator[`GitHub`](https://guibranco.github.io/pancake/user-guide/github/)Interact with the GitHub REST API[`HealthChecks`](https://guibranco.github.io/pancake/user-guide/health-checks/)Liveness and readiness probe endpoints[`IpUtils`](https://guibranco.github.io/pancake/user-guide/ip-utils/)IP address parsing, validation, and range checking[`Logger`](https://guibranco.github.io/pancake/user-guide/logger/)PSR-3 compatible structured logger[`LogStream`](https://guibranco.github.io/pancake/user-guide/logstream/)Real-time log ingestion and streaming client[`MemoryCache`](https://guibranco.github.io/pancake/user-guide/memory-cache/)Shared-memory key/value store backed by `shmop`[`OneSignal`](https://guibranco.github.io/pancake/user-guide/one-signal/)Push notification client for the OneSignal API[`Request`](https://guibranco.github.io/pancake/user-guide/request/)Fluent HTTP client with `curl_multi` support[`SessionManager`](https://guibranco.github.io/pancake/user-guide/session-manager/)Secure session handling with lifetime and flash support[`ShieldsIo`](https://guibranco.github.io/pancake/user-guide/shieldsio/)Shields.io badge builder with cache-control---

CI/CD
-----

[](#cicd)

BuildLast commitCoverageCode smellsLines of code[![CI](https://github.com/guibranco/pancake/actions/workflows/ci.yml/badge.svg)](https://github.com/guibranco/pancake/actions/workflows/ci.yml)[![GitHub last commit](https://camo.githubusercontent.com/ab8c66cc9c4145a067ecb421d3735f8fbd9825ff20aaeb2036e3d015e74458c4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6173742d636f6d6d69742f6775696272616e636f2f70616e63616b652f6d61696e)](https://github.com/guibranco/pancake)[![Coverage](https://camo.githubusercontent.com/1a6c0301fa10dcaf294e17f90aaaa5feb00b057909eb1cf9c098d86fad39fc56/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d6775696272616e636f5f70616e63616b65266d65747269633d636f766572616765)](https://sonarcloud.io/dashboard?id=guibranco_pancake)[![Code Smells](https://camo.githubusercontent.com/3ae536b566be9f26d050cb2217f90807efcde29cde1c3ef570204786c5228bc0/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d6775696272616e636f5f70616e63616b65266d65747269633d636f64655f736d656c6c73)](https://sonarcloud.io/dashboard?id=guibranco_pancake)[![Lines of Code](https://camo.githubusercontent.com/5251d652220bf5cd9f56d29f07d3ed392affc6b0737f67f2197e029214037745/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d6775696272616e636f5f70616e63616b65266d65747269633d6e636c6f63)](https://sonarcloud.io/dashboard?id=guibranco_pancake)---

Code quality
------------

[](#code-quality)

[![Codacy Grade](https://camo.githubusercontent.com/77c72a60f191dca30568384dc36f450cb3e72b0ea74962c69e4242a38d913f29/68747470733a2f2f6170702e636f646163792e636f6d2f70726f6a6563742f62616467652f47726164652f3961333639653864633165373462613162313863333039393335633761663462)](https://app.codacy.com/gh/guibranco/pancake/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)[![Codacy Coverage](https://camo.githubusercontent.com/c41915d41b6a3f206a9de68fe52b1e5d1bf13f66a448f04d4b5953f20d4e42d6/68747470733a2f2f6170702e636f646163792e636f6d2f70726f6a6563742f62616467652f436f7665726167652f3961333639653864633165373462613162313863333039393335633761663462)](https://app.codacy.com/gh/guibranco/pancake/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_coverage)[![Codecov](https://camo.githubusercontent.com/a55775d04c493f56a3662df96456ed4e9ab9545bb789ca37d0dee0fb2cc8a6ad/68747470733a2f2f636f6465636f762e696f2f67682f6775696272616e636f2f70616e63616b652f6272616e63682f6d61696e2f67726170682f62616467652e737667)](https://codecov.io/gh/guibranco/pancake)[![CodeFactor](https://camo.githubusercontent.com/fa1699b571078e4a70c435ec1a0e951efb55b1cce512ca8015fb4d39d9bf4efd/68747470733a2f2f7777772e636f6465666163746f722e696f2f7265706f7369746f72792f6769746875622f6775696272616e636f2f70616e63616b652f6261646765)](https://www.codefactor.io/repository/github/guibranco/pancake)

[![Quality Gate Status](https://camo.githubusercontent.com/b02740ecb71dab376f69efb5e55dca1a9312291d82e83f286e1372a17be20621/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d6775696272616e636f5f70616e63616b65266d65747269633d616c6572745f737461747573)](https://sonarcloud.io/dashboard?id=guibranco_pancake)[![Maintainability Rating](https://camo.githubusercontent.com/dc55e90646560c4456b956863c754ac011d95841ce010fa13c9237d5826c89ae/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d6775696272616e636f5f70616e63616b65266d65747269633d7371616c655f726174696e67)](https://sonarcloud.io/dashboard?id=guibranco_pancake)[![Reliability Rating](https://camo.githubusercontent.com/be19d9ce281443b3f03475f6a62a7a2259d8ee0fdfa7f58d708a315af3d032ca/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d6775696272616e636f5f70616e63616b65266d65747269633d72656c696162696c6974795f726174696e67)](https://sonarcloud.io/dashboard?id=guibranco_pancake)[![Security Rating](https://camo.githubusercontent.com/a73fb73368555007e912996f747b1ab43756aa8f000222e0200740936fe381cc/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d6775696272616e636f5f70616e63616b65266d65747269633d73656375726974795f726174696e67)](https://sonarcloud.io/dashboard?id=guibranco_pancake)

[![Technical Debt](https://camo.githubusercontent.com/d21e66958711cd114cd6a186b282d2763f8148363db53eb5f2fcccf5cfa9173b/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d6775696272616e636f5f70616e63616b65266d65747269633d7371616c655f696e646578)](https://sonarcloud.io/dashboard?id=guibranco_pancake)[![Duplicated Lines (%)](https://camo.githubusercontent.com/855021ab3fcf51eea0abec02d9b9bad3cc75d6d0106c9422372a37107f50d133/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d6775696272616e636f5f70616e63616b65266d65747269633d6475706c6963617465645f6c696e65735f64656e73697479)](https://sonarcloud.io/dashboard?id=guibranco_pancake)[![Bugs](https://camo.githubusercontent.com/94a3b1d6282062cf95b6e00945cf7fa9878124e3c7160ba6fea8b4c9ecabdbc1/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d6775696272616e636f5f70616e63616b65266d65747269633d62756773)](https://sonarcloud.io/dashboard?id=guibranco_pancake)[![Vulnerabilities](https://camo.githubusercontent.com/45876f1f5ae294bb45f65c522a68f8adced80c65ce3cb17fee043971abc69529/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d6775696272616e636f5f70616e63616b65266d65747269633d76756c6e65726162696c6974696573)](https://sonarcloud.io/dashboard?id=guibranco_pancake)

[![Maintainability](https://camo.githubusercontent.com/95fd8caa2c539c8372b28c7d3e33bb4f03f0d3c4e7c461e4bb3202c3ac4ca321/68747470733a2f2f716c74792e73682f67682f6775696272616e636f2f70726f6a656374732f50616e63616b652f6d61696e7461696e6162696c6974792e737667)](https://qlty.sh/gh/guibranco/projects/Pancake)[![Code Coverage](https://camo.githubusercontent.com/198939df67104ce547559996bbb22a9252a7b706255aca13e82faff8c7ae0072/68747470733a2f2f716c74792e73682f67682f6775696272616e636f2f70726f6a656374732f50616e63616b652f636f7665726167652e737667)](https://qlty.sh/gh/guibranco/projects/Pancake)[![DeepSource](https://camo.githubusercontent.com/7bf1c8c82109f1f410b85a17c054e3daaa1ed82a1eeabcd4bb54017ca453b38e/68747470733a2f2f6170702e64656570736f757263652e636f6d2f67682f6775696272616e636f2f70616e63616b652e7376672f3f6c6162656c3d6163746976652b6973737565732673686f775f7472656e643d7472756526746f6b656e3d7233584761384d5148475a45526449684b4235455a58664c)](https://app.deepsource.com/gh/guibranco/pancake/?ref=repository-badge)

---

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

[](#installation)

**Requirements:** PHP 8.4+, Composer

### Via Composer (recommended)

[](#via-composer-recommended)

```
composer require guibranco/pancake
```

### Via GitHub Releases

[](#via-github-releases)

Download the latest archive from the [Releases](https://github.com/GuiBranco/pancake/releases) page and include the autoloader manually.

[![GitHub release date](https://camo.githubusercontent.com/b9fce34229e2743ca0a6a609da390d1757ca3e2c3b573116cbf7aef4b29df2ae/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652d646174652f6775696272616e636f2f70616e63616b652e737667)](https://github.com/guibranco/pancake/releases)

---

User guide
----------

[](#user-guide)

Full documentation, class references, and examples live at **[guibranco.github.io/pancake](https://guibranco.github.io/pancake/user-guide/basic-usage/)**.

### Quick start

[](#quick-start)

```
