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(7mo ago)091MITPHPPHP ^8.1CI passing

Since Dec 25Pushed 3mo agoCompare

[ Source](https://github.com/1martinkarlsen/apilyser-php)[ Packagist](https://packagist.org/packages/1martinkarlsen/apilyser)[ RSS](/packages/1martinkarlsen-apilyser/feed)WikiDiscussions main Synced 2d 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

34

—

LowBetter than 74% of packages

Maintenance74

Regular maintenance activity

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity40

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

Every ~21 days

Total

7

Last Release

98d 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

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k6.0M775](/packages/sylius-sylius)[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)[contao/core-bundle

Contao Open Source CMS

1301.7M3.0k](/packages/contao-core-bundle)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.8M666](/packages/shopware-core)[jolicode/castor

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

55344.7k5](/packages/jolicode-castor)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

86337.5k](/packages/flow-php-flow)

PHPackages © 2026

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