PHPackages                             evalok/php-rest-lightly - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. evalok/php-rest-lightly

ActiveLibrary[HTTP &amp; Networking](/categories/http)

evalok/php-rest-lightly
=======================

a lightweight component for implementing a REST API

0.1.2(10y ago)01031MITPHPPHP &gt;=5.4.0

Since Jul 25Pushed 1y ago1 watchersCompare

[ Source](https://github.com/EvaLok/php-rest-lightly)[ Packagist](https://packagist.org/packages/evalok/php-rest-lightly)[ Docs](https://github.com/EvaLok/php-rest-lightly)[ RSS](/packages/evalok-php-rest-lightly/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)DependenciesVersions (5)Used By (0)

php-rest-lightly
================

[](#php-rest-lightly)

a lightweight component for implementing a REST API

this library helps you to leverage namespacing to implicitly define API endpoint routes rather than write them by hand; adding new endpoints wont require you to update a routes list

authentication or other operations can be done within the endpoint classes themselves

installation instructions
=========================

[](#installation-instructions)

`composer require evalok/php-rest-lightly`

example usage:

demo
====

[](#demo)

configure `.htaccess` in `demo/public`

Examples
========

[](#examples)

- `GET: api/v1/Thing1/555`

```
{
	id: 555,
	owner: {
		*owner: null
	},
	class: "api\v1\Thing1",
	method: "api\v1\Thing1::get",
	message: "testing testing 123",
	params: [ ]
}
```

- `GET: api/v1/Thing1/555/Thing2/777?some=thing`

```
{
	id: 777,
	owner: {
		*id: 555,
		*owner: { }
	},
	class: "api\v1\Thing1\Thing2",
	method: "api\v1\Thing1\Thing2::get",
	message: "testing testing 123",
	params: {
		some: "thing"
	}
}
```

- `api/v1/Restricted/Thing3/888`

```
"403: Forbidden"
```

TODO
====

[](#todo)

- tests
- versioning deprecation demo
- non-json responses
- support for request headers

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance27

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Every ~117 days

Total

3

Last Release

3715d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/822cd4d14c0e09fac815b9ddde20bfc4aa691fd5e7a4fecff5eca1bd09acf37e?d=identicon)[EvaLok](/maintainers/EvaLok)

---

Top Contributors

[![EvaLok](https://avatars.githubusercontent.com/u/12283250?v=4)](https://github.com/EvaLok "EvaLok (25 commits)")

---

Tags

rest

### Embed Badge

![Health badge](/badges/evalok-php-rest-lightly/health.svg)

```
[![Health](https://phpackages.com/badges/evalok-php-rest-lightly/health.svg)](https://phpackages.com/packages/evalok-php-rest-lightly)
```

###  Alternatives

[zircote/swagger-php

Generate interactive documentation for your RESTful API using PHP attributes (preferred) or PHPDoc annotations

5.3k132.9M468](/packages/zircote-swagger-php)[psr/link

Common interfaces for HTTP links

2.5k144.1M68](/packages/psr-link)[league/fractal

Handle the output of complex data structures ready for API output.

3.5k64.1M476](/packages/league-fractal)[friendsofsymfony/rest-bundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony

2.8k73.3M319](/packages/friendsofsymfony-rest-bundle)[lexik/jwt-authentication-bundle

This bundle provides JWT authentication for your Symfony REST API

2.6k58.7M210](/packages/lexik-jwt-authentication-bundle)[nelmio/api-doc-bundle

Generates documentation for your REST API from attributes

2.3k63.6M233](/packages/nelmio-api-doc-bundle)

PHPackages © 2026

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