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

1.0.0(1mo ago)00Apache-2.0PHPPHP &gt;=8.4CI passing

Since Jun 22Pushed 1mo ago1 watchersCompare

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

READMEChangelog (1)Dependencies (5)Versions (3)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

39

—

LowBetter than 84% of packages

Maintenance90

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

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

Unknown

Total

1

Last Release

45d ago

### 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

###  Code Quality

TestsPHPUnit

### 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

[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

758297.9k49](/packages/civicrm-civicrm-core)[typo3/cms

TYPO3 CMS is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.

1.2k1.9M122](/packages/typo3-cms)[api-platform/core

Build a fully-featured hypermedia or GraphQL API in minutes!

2.6k52.2M366](/packages/api-platform-core)[typo3/cms-core

TYPO3 CMS Core

3713.6M5.5k](/packages/typo3-cms-core)[api-platform/state

API Platform state interfaces

275.4M156](/packages/api-platform-state)[paynl/php-sdk

Pay. API client library for PHP. Pay. is an all-in-one European PSP offering 50+ payment methods both online and instore.

1096.7k5](/packages/paynl-php-sdk)

PHPackages © 2026

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