PHPackages                             concretecms/nightcap - 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. concretecms/nightcap

ActiveLibrary

concretecms/nightcap
====================

Easily build PHP client libraries for your REST APIs.

001PHP

Since Jun 22Pushed 2y ago4 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

concrete5 Nightcap
==================

[](#concrete5-nightcap)

concrete5 Nightcap is a library that aims to make getting REST just a little bit easier. With Nightcap, developers can create PHP clients for their existing API layer; if you're a developer who wants to take their REST API and offer a PHP client for it, this is the library for you.

concrete5 Nightcap is **not**:

1. A REST Library – Nightcap uses [Guzzle 6 for that](http://docs.guzzlephp.org/en/stable/)
2. A REST Web Services library – Nightcap uses [Guzzle Services for that](https://github.com/guzzle/guzzle-services).
3. An OAuth2 Client – Nightcap uses the [League OAuth2 Client for that](https://github.com/thephpleague/oauth2-client).

Nightcap does, however, include all these things.

Instead, Nightcap is a way to glue all these different things together, providing a nice object-oriented layer around various OAuth2 grant types and authorization. It uses the very handy [Guzzle OAuth2 Subscriber](https://github.com/kamermans/guzzle-oauth2-subscriber) library to handle refresh tokens and access token persistence transparently, without any configuration. Additionally, Nightcap gives you a way to define your web services easily, and offer extension as well.

Library Example
---------------

[](#library-example)

concrete5's PHP API client is built on Nightcap: it's probably the best place to start.

[https://github.com/concrete5/concrete5\_api\_client](https://github.com/concrete5/concrete5_api_client)

### Using the Client

[](#using-the-client)

Want to see how a developer queries the API? The test console application is a good place to start:

[https://github.com/aembler/concrete5\_cli\_api\_example](https://github.com/aembler/concrete5_cli_api_example)

###  Health Score

14

—

LowBetter than 2% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity22

Early-stage or recently created project

 Bus Factor1

Top contributor holds 95.2% 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/d8d8902700dc0979d0cb96ff69a17808f74823c0c2b4ef75d91aba2f66d6f5fb?d=identicon)[aembler](/maintainers/aembler)

---

Top Contributors

[![aembler](https://avatars.githubusercontent.com/u/527809?v=4)](https://github.com/aembler "aembler (20 commits)")[![wordish](https://avatars.githubusercontent.com/u/42463480?v=4)](https://github.com/wordish "wordish (1 commits)")

### Embed Badge

![Health badge](/badges/concretecms-nightcap/health.svg)

```
[![Health](https://phpackages.com/badges/concretecms-nightcap/health.svg)](https://phpackages.com/packages/concretecms-nightcap)
```

PHPackages © 2026

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