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(4mo ago)084MITPHPPHP ^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 1mo 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

37

—

LowBetter than 83% of packages

Maintenance83

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

Recently: every ~5 days

Total

7

Last Release

72d 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.4k5.6M651](/packages/sylius-sylius)[behat/behat

Scenario-oriented BDD framework for PHP

4.0k96.8M2.0k](/packages/behat-behat)[silverstripe/framework

The SilverStripe framework

7213.5M2.5k](/packages/silverstripe-framework)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[simplesamlphp/simplesamlphp

A PHP implementation of a SAML 2.0 service provider and identity provider.

1.1k12.4M193](/packages/simplesamlphp-simplesamlphp)[sulu/sulu

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

1.3k1.3M152](/packages/sulu-sulu)

PHPackages © 2026

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