PHPackages                             arekx/restfn - 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. [API Development](/categories/api)
4. /
5. arekx/restfn

ActiveLibrary[API Development](/categories/api)

arekx/restfn
============

Functional Rest framework

00PHPCI passing

Since Apr 18Pushed today1 watchersCompare

[ Source](https://github.com/ArekX/RestFn)[ Packagist](https://packagist.org/packages/arekx/restfn)[ RSS](/packages/arekx-restfn/feed)WikiDiscussions master Synced today

READMEChangelog (1)DependenciesVersions (2)Used By (0)

RestFn
======

[](#restfn)

RestFn ("REST function") is a PHP library for building a single, functional-style endpoint.

Instead of having many REST endpoints, you have one. The client sends a request that is a tree of operations, and the server runs that tree to shape the response. You write actions for the actual work, and the client composes those actions with built-in operations (get, map, sort, run, and so on) to get back the data it needs in one request.

RestFn is the engine for this. It gives you the operation language and a dependency injection container to wire everything together; you provide the endpoint and the actions.

Requires PHP 8.4+.

[![CI](https://github.com/ArekX/RestFn/actions/workflows/ci.yml/badge.svg)](https://github.com/ArekX/RestFn/actions/workflows/ci.yml)[![Documentation Status](https://camo.githubusercontent.com/a34437ca6497143cc70971068c6cdec39ae65f1dbe3b13730adafcb7ec1e093a/68747470733a2f2f72656164746865646f63732e6f72672f70726f6a656374732f72657374666e2f62616467652f3f76657273696f6e3d6c6174657374)](https://restfn.readthedocs.io/en/latest/?badge=latest)

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

[](#user-guide)

User guide is available on

### Manual generation

[](#manual-generation)

1. Install `Python` and `pip`.
2. Install `mkdocs` with `pip install mkdocs`
3. From project's directory run `mkdocs build`
4. Manual will be built in the `site` folder.

Testing
-------

[](#testing)

Testing is done using `PHPUnit`

- To run all tests run `composer test`
- To generate test coverage run `composer coverage`

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

[](#code-quality)

Formatting, linting, and static analysis are handled by [Mago](https://mago.carthage.software/), installed as a dev dependency.

- To format the code run `composer format`
- To lint the code run `composer lint`
- To run static analysis run `composer analyze`
- To run everything (format check, lint, analyze, tests) run `composer check`

CI runs the tests and all three Mago checks on every push and pull request.

License
-------

[](#license)

Copyright 2026 Aleksandar Panic

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

 or [in this repository](LICENSE.md)

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance65

Regular maintenance activity

Popularity0

Limited adoption so far

Community7

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/3c16806a6fc4805b54005c72ea7aa0b6bc33f889a4a657a3071953f6b4e4a23c?d=identicon)[ArekXV](/maintainers/ArekXV)

---

Top Contributors

[![ArekX](https://avatars.githubusercontent.com/u/4344776?v=4)](https://github.com/ArekX "ArekX (139 commits)")

---

Tags

apiframeworkfunctionalphpreststyle

### Embed Badge

![Health badge](/badges/arekx-restfn/health.svg)

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

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35816.3M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24015.5M18](/packages/hubspot-api-client)[botman/driver-telegram

Telegram driver for BotMan

93452.6k6](/packages/botman-driver-telegram)

PHPackages © 2026

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