PHPackages                             1martinkarlsen/apilyser - 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. 1martinkarlsen/apilyser

ActiveLibrary[API Development](/categories/api)

1martinkarlsen/apilyser
=======================

API documentation and code validator

v0.0.1(6mo ago)091MITPHPPHP ^8.1CI passing

Since Dec 25Pushed 1mo agoCompare

[ Source](https://github.com/1martinkarlsen/apilyser-php)[ Packagist](https://packagist.org/packages/1martinkarlsen/apilyser)[ RSS](/packages/1martinkarlsen-apilyser/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (7)Dependencies (8)Versions (10)Used By (0)

Apilyser php
============

[](#apilyser-php)

A PHP static analysis tool to discover misalignment between the code and the OpenApi documentation

Getting started
---------------

[](#getting-started)

### Installation

[](#installation)

Install using composer
`composer require --dev 1martinkarlsen/apilyser`

### Configuration

[](#configuration)

After installation, a `apilyzer.yaml` file is required for the library to work.

ConfigurationdescriptioncodePathpath to the codeopenApiPathpath to the open api documentation yaml fileUsage
-----

[](#usage)

You can run the simple validation command by typing
`./vendor/bin/apilyser validate`

This command will analyse both the OpenApi dokumentation and the project code and run the alignment rules.

### Add custom routing parsers.

[](#add-custom-routing-parsers)

Apilyser allows you to add custom routing parsers to support different routing systems or frameworks.

To add a custom parser, create a class that implements the `RouteStrategy` interface and add it to your `apilyser.yaml` configuration:

```
codePath: src/
openApiPath: openapi.yaml
customRouteParser:
  - 'App\ApilyserExtensions\MyCustomParser'
  - 'App\ApilyserExtensions\AnotherParser'
```

Your custom parser class should implement the `RouteStrategy` interface and be autoloaded in your project.

Example custom parser:

```
namespace App\ApilyserExtensions;

use Apilyser\Parser\Route\RouteStrategy;

class MyCustomParser implements RouteStrategy
{
    public function canHandle(string $rootPath): bool
    {
        return true;
    }

    public function parseRoutes(string $rootPath): array
    {
        return $routes;
    }
}
```

Contribution
------------

[](#contribution)

Contributions are very welcome!
For major changes, please open an issue to discuss first. Otherwise feel free to create pull requests.

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance81

Actively maintained with recent releases

Popularity11

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity39

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.

###  Release Activity

Cadence

Every ~21 days

Total

7

Last Release

53d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/cb7f057f6636a41770e20fd8c01dce9209dd690dbd755aa048ae7f695dd81643?d=identicon)[1martinkarlsen](/maintainers/1martinkarlsen)

---

Top Contributors

[![1martinkarlsen](https://avatars.githubusercontent.com/u/11289682?v=4)](https://github.com/1martinkarlsen "1martinkarlsen (41 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/1martinkarlsen-apilyser/health.svg)

```
[![Health](https://phpackages.com/badges/1martinkarlsen-apilyser/health.svg)](https://phpackages.com/packages/1martinkarlsen-apilyser)
```

###  Alternatives

[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M196](/packages/sulu-sulu)[jolicode/castor

A lightweight and modern task runner. Automate everything. In PHP.

54642.4k4](/packages/jolicode-castor)[aeliot/todo-registrar

Register TODOs from source code in issue tracker

153.0k](/packages/aeliot-todo-registrar)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9317.2k55](/packages/open-dxp-opendxp)[forumify/forumify-platform

122.0k12](/packages/forumify-forumify-platform)

PHPackages © 2026

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