PHPackages                             storinka/invoke - 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. storinka/invoke

ActiveLibrary[API Development](/categories/api)

storinka/invoke
===============

Invoke Core library

v2.0.9(3y ago)21.8k[3 issues](https://github.com/storinka/invoke/issues)4MITPHPPHP ^8.1

Since Feb 6Pushed 3y ago1 watchersCompare

[ Source](https://github.com/storinka/invoke)[ Packagist](https://packagist.org/packages/storinka/invoke)[ RSS](/packages/storinka-invoke/feed)WikiDiscussions v2 Synced 3w ago

READMEChangelog (10)Dependencies (4)Versions (87)Used By (4)

[![Invoke](https://user-images.githubusercontent.com/21020331/145628046-ca19dbdf-2935-49fe-934c-a171219566cc.png)](https://user-images.githubusercontent.com/21020331/145628046-ca19dbdf-2935-49fe-934c-a171219566cc.png)

PHP library for building fast and modern web APIs.

- #### [Explore](https://explore.invoke.red)

    [](#explore)
- #### [Documentation](https://invoke.red)

    [](#documentation)

Installation
------------

[](#installation)

**The library is still work-in-progress.**

```
composer require storinka/invoke:^2 storinka/invoke-http:^2
```

Basic example
-------------

[](#basic-example)

1. Create `index.php`

```
use Invoke\Invoke;

function add(float $a, float $b): float
{
    return $a + $b;
}

Invoke::create([
    "add"
])->serve();
```

2. Run a server

```
php -S localhost:8000 index.php
```

3. Make a request

```
curl 'localhost:8000/add?a=2&b=2'

# { "result": 4 }
```

Complex example
---------------

[](#complex-example)

1. Create a type

```
use Invoke\Data;

class UserResult extends Data
{
    public int $id;

    public string $name;
}
```

2. Create a method to get list of users

```
use Invoke\Method;

class GetUsers extends Method
{
    protected function handle(int $page, int $perPage): array
    {
        $usersFromDB = getUsersFromDb($page, $perPage);

        return UserResult::many($usersFromDB);
    }
}
```

3. Setup Invoke

```
use Invoke\Invoke;

Invoke::create([
    "getUsers" => GetUsers::class
])->serve();
```

4. Run a server and try to invoke:

```
curl 'localhost:8000/getUsers?page=1&perPage=10'

# { "result": [ ... ] }
```

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity78

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~7 days

Recently: every ~33 days

Total

83

Last Release

1347d ago

Major Versions

v0.0.35 → v1.0-BETA2021-07-08

v1.0-BETA-38 → 2.0.02022-03-07

PHP version history (3 changes)v0.0.4PHP ^7.4

v0.0.20PHP ^7.4|^8.0

2.0.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/4d3f4af288b1ce188d4ffb9f89e415f47f84bf4ada50074447cf804245ef3c19?d=identicon)[expexes](/maintainers/expexes)

---

Top Contributors

[![kohutd](https://avatars.githubusercontent.com/u/15370664?v=4)](https://github.com/kohutd "kohutd (106 commits)")[![expexes](https://avatars.githubusercontent.com/u/21020331?v=4)](https://github.com/expexes "expexes (70 commits)")[![aquaminer](https://avatars.githubusercontent.com/u/17113289?v=4)](https://github.com/aquaminer "aquaminer (44 commits)")[![MykolaMatviiv](https://avatars.githubusercontent.com/u/25180229?v=4)](https://github.com/MykolaMatviiv "MykolaMatviiv (5 commits)")

---

Tags

apigraphqljson-rpclaravellumenphprestsymfony

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/storinka-invoke/health.svg)

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

###  Alternatives

[symfony/symfony

The Symfony PHP framework

31.4k87.2M2.2k](/packages/symfony-symfony)[api-platform/core

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

2.6k51.2M337](/packages/api-platform-core)[thecodingmachine/graphqlite

Write your GraphQL queries in simple to write controllers (using webonyx/graphql-php).

5733.3M47](/packages/thecodingmachine-graphqlite)[moonshine/moonshine

Laravel administration panel

1.3k253.1k81](/packages/moonshine-moonshine)[ecotone/ecotone

Enterprise architecture layer for Laravel and Symfony — CQRS, Event Sourcing, Durable Workflows (Sagas, Orchestrators), Projections, and Outbox messaging via PHP attributes.

564576.7k49](/packages/ecotone-ecotone)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)

PHPackages © 2026

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