PHPackages                             ruvents/annotation-md - 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. ruvents/annotation-md

ActiveLibrary

ruvents/annotation-md
=====================

This library parses phpdoc annotations and generates md document that can be parsed by slate

0.1.0(7y ago)0578MITPHPPHP ^5.6 || ^7.0

Since Jan 27Pushed 7y ago3 watchersCompare

[ Source](https://github.com/ruvents/annotation-md)[ Packagist](https://packagist.org/packages/ruvents/annotation-md)[ RSS](/packages/ruvents-annotation-md/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (10)Used By (0)

Возможности
-----------

[](#возможности)

- **Phpdoc** — Документация оформляется в виде коментариев phpdoc. Из которых генерируется .md файл.
- **Slate docker** — Формат сгенерированного .md поддерживается [slate](https://github.com/lord/slate)

Установка
---------

[](#установка)

`composer require ruvents/annotation-md`

Использование
-------------

[](#использование)

```
$controllersPath = PATH_TO_CONTROLLERS;
$buildPath = BUILD_PATH;

$params = [
            "title"     => "Заголовок",
            "baseUrl"   => "http://api.yoursite.com"
        ];

$parser = new Parser($controllersPath, $buildPath, $params);
$parser->parse();
```

- **$controllersPath** - Путь к папке, в которой будет происходить поиск контроллеров.
- **$buildPath** - Путь к папке где будет сохранен постронный .md

Аннотации
---------

[](#аннотации)

Поддерживаемые аннотации:

- **ApiController** — Описывает контроллер. Раздел в документации.
- **ApiContent** — Произвольный блок контента. В документации представляет собой раздел.
- **ApiError** — Блок с описанием ошибок. Добавляется в конце документации.
- **ApiAction** — Действие контроллера. Подраздел раздела в документации.
- **Sample** - Пример кода на одном из языков - javascript, php, shell, ruby, python
- **Request** - Описывает запрос.
- **Param** - Параметр запроса.

Вкладка json используется примера ответа сервера на запрос.

```
/**
 * @ApiController(
 *     title="Пользователь",
 *     description="Описаие методов для работы с пользователем"
 * )
 * @ApiContent(
 *     title="Авторизация",
 *     description="Описание процесса авторизации"
 *  )
 * @ApiError(code="400", description="Bad Request – Your request sucks.")
 * @ApiError(code="401", description="Unauthorized – Your API key is wrong.")
 */
class User
{
    /**
      * @ApiAction(
      *     title="Список пользователей",
      *     description="Возвращает список пользователей",
      *     samples={
      *          @Sample(lang="javascript", code="alert('123');"),
      *          @Sample(lang="php", code="phpinfo();")
      *     }
      *     request=@Request(
      *          method="GET",
      *          url="/users",
      *          body="",
      *          params={
      *              @Param(title="param1", type="type1", defaultValue="val", description="descr"),
      *              @Param(title="param1", type="type1", defaultValue="val", description="descr")
      *          }
      *         response=@Response(body="json encoded array")
      *     )
      * )
      */
     public function listAction() {}
}
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.7% 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 ~92 days

Recently: every ~184 days

Total

9

Last Release

2648d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/61151e00b05c30fe0324c6a17d010994832d3b46c67ab8cc1cf895455c08e59b?d=identicon)[RUVENTS](/maintainers/RUVENTS)

---

Top Contributors

[![nastradamus39](https://avatars.githubusercontent.com/u/3934351?v=4)](https://github.com/nastradamus39 "nastradamus39 (12 commits)")[![vudaltsov](https://avatars.githubusercontent.com/u/2552865?v=4)](https://github.com/vudaltsov "vudaltsov (5 commits)")[![fgh151](https://avatars.githubusercontent.com/u/645524?v=4)](https://github.com/fgh151 "fgh151 (1 commits)")

---

Tags

phpdocannotationsslate

### Embed Badge

![Health badge](/badges/ruvents-annotation-md/health.svg)

```
[![Health](https://phpackages.com/badges/ruvents-annotation-md/health.svg)](https://phpackages.com/packages/ruvents-annotation-md)
```

###  Alternatives

[dereuromark/cakephp-ide-helper

CakePHP IdeHelper Plugin to improve auto-completion

1862.1M26](/packages/dereuromark-cakephp-ide-helper)[nettrine/annotations

Doctrine Annotations for Nette Framework

193.0M7](/packages/nettrine-annotations)[piotrooo/wsdl-creator

PHP WSDL creator using PHPdoc (annotations, reflections).

84158.3k2](/packages/piotrooo-wsdl-creator)[kdyby/annotations

Doctrine Annotations integration into Nette Framework

101.3M18](/packages/kdyby-annotations)[superbrave/gdpr-bundle

A Symfony bundle for using entity annotations according to GDPR requirements and anonymizing/exporting data

1120.0k](/packages/superbrave-gdpr-bundle)[proai/lumen-annotations

Route and event binding annotations for Laravel Lumen

1012.4k](/packages/proai-lumen-annotations)

PHPackages © 2026

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