arekx/restfn
Composer 安装命令:
composer require arekx/restfn
包简介
Functional Rest framework
README 文档
README
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+.
User guide
User guide is available on https://restfn.readthedocs.io/en/latest
Manual generation
- Install
Pythonandpip. - Install
mkdocswithpip install mkdocs - From project's directory run
mkdocs build - Manual will be built in the
sitefolder.
Testing
Testing is done using PHPUnit
- To run all tests run
composer test - To generate test coverage run
composer coverage
Code quality
Formatting, linting, and static analysis are handled by Mago, 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
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
http://www.apache.org/licenses/LICENSE-2.0 or in this repository
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.
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2026-06-22