A PHP tool to generate templateable markdown documentation from the docblocks or type-hints of your codebase.

Last update: Sep 8, 2021

Roster

Installation

To install, simply require the package using composer:

composer require "samsara/roster:^0.1"

Or include it in your composer.json file:

{
    "require-dev": {
        "samsara/roster": "^0.1"
    }
}

The project namespace is Samsara\Roster\*. You can view the project on Packagist.

Examples of Documentation Built With Roster

  • Roster: This console program! Of course Roster builds its own documentation. :)
  • Fermat: An arbitrary precision math library with trigonometry, statistics and more for PHP.

Documentation

After installing, from your project root on the command-line use:

php vendor/bin/roster [SOURCES_ROOT]

You can read the full documentation for Roster here.

GitHub

https://github.com/JordanRL/Roster
Comments
  • 1. Bug found in: First Run Errors

    Describe the bug When using php vendor/bin/roster the code tries use and undefined $oldConfig

    To Reproduce php vendor/bin/roster in a library for first time.

    Expected behavior Documentation generated

    PHP Version PHP 8.0.8 (cli)

    Additional context Stack:

    Warning: Undefined variable $oldConfig in /app/vendor/samsara/roster/src/Samsara/Roster/Roster.php on line 290
    
    Fatal error: Uncaught Error: Call to a member function get() on null in /app/vendor/samsara/roster/src/Samsara/Roster/Roster.php:290
    Stack trace:
    #0 /app/vendor/symfony/console/Command/Command.php(299): Samsara\Roster\Roster->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #1 /app/vendor/symfony/console/Application.php(978): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #2 /app/vendor/symfony/console/Application.php(295): Symfony\Component\Console\Application->doRunCommand(Object(Samsara\Roster\Roster), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #3 /app/vendor/symfony/console/Application.php(167): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #4 /app/vendor/samsara/roster/src/Samsara/Roster/App.php(32): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #5 /app/vendor/samsara/roster/bin/roster(25): Samsara\Roster\App->run()
    #6 {main}
      thrown in /app/vendor/samsara/roster/src/Samsara/Roster/Roster.php on line 290
    
    Reviewed by marioquartz at 2021-07-08 10:30
  • 2. Bug found in: installing by composer

    When using 'composer require "samsara/roster:^0.1"' I have found that installation is not posible, because is required a private repository

    The message is this:

      - Installing jetbrains/phpstorm-attributes (1.0): Cloning a7a83ae5df
    Cloning failed using an ssh key for authentication, enter your GitHub credentials to access private repos
    Head to https://github.com/settings/tokens/new?scopes=repo&description=Composer+on+d164b2fc805e+2021-07-08+0819
    to retrieve a token. It will be stored in "/root/.composer/auth.json" for future use by Composer.
    Token (hidden): 
    

    And, of course, my personal token is not valid (I have to test it). The action was realized using Docker

    As user of phpstorm I have interest in have support of my IDE.

    Reviewed by marioquartz at 2021-07-08 08:30
  • 3. Bug found in: docs

    Describe the bug The documentation seems to be off. It has composer require-dev "samsara/roster:^0.1", but require-dev is not defined.

    To Reproduce Steps to reproduce the behavior: Use composer with the following line: composer require-dev "samsara/roster:^0.1".

    Expected behavior An error with the following message: [Symfony\Component\Console\Exception\CommandNotFoundException] Command "require-dev" is not defined.

    PHP Version PHP 8.0

    Additional context In the github documentation it says to use the following command for composer: composer require "samsara/roster:^0.1". In the docs in says to use the following command: composer require-dev "samsara/roster:^0.1" (which causes the error).

    Reviewed by SDanDyS at 2021-07-16 20:41
  • 4. Expand --mkdocs to have a choice in themes

    Currently only supports the rtdtheme by default. Could also pretty easily support the material theme. This might necessitate a config save though so that the interactive menu sequence isn't so long every time, and to support tooling.

    Side note: maybe support tooling?

    Reviewed by JordanRL at 2021-07-06 09:23
  • 5. Create Options For Existing mkdocs.yml Files

    Currently, the existing mkdocs.yml file is overwritten with just the exported data, but it's likely that most people will have documentation besides the class map API that is generated from this tool.

    In that case, it would be useful to offer some options on how to proceed. The options will be:

    • Merge the Nav
      • Lets you choose to merge under an existing top level nav item
    • Save the old file as .old
    • Overwrite
    Reviewed by JordanRL at 2021-07-06 00:06
  • 6. Bug found in: document generator(?)

    Describe the bug Whenever I try to use the command-line to generate docs for my project it throws the following error: [ERROR] Could not create export path I run it like this: php vendor/bin/roster C:\xampp\htdocs\framework\classes

    To Reproduce Steps to reproduce the behavior:

    1. Open git-bash (Windows) in your root directory. In my case I want to generate documentation for the project framework, so I open git-bash in framework.
    2. I run it like this: php vendor/bin/roster C:\xampp\htdocs\framework\classes (classes is basically the src folder most people use for their classes etc.)
    3. results in: [ERROR] Could not create export path

    Expected behavior It will throw the following error: [ERROR] Could not create export path

    PHP Version 8.0

    Additional context I do have permission within the directory. I open my git-bash in the framework directory (which would be the root).

    Reviewed by SDanDyS at 2021-07-16 21:32
  • 7. Create from git tag

    It would be nice if the user could specify a tagged commit and have the program automatically checkout the tag, then run the documentation against it, then switch back to the original git context to write the files.

    Reviewed by JordanRL at 2021-07-06 00:25
  • 8. Support Doc Pages For Functions

    Currently the generator supports documentation for classes, traits, and interfaces, but not user defined functions.

    Though I don't see a very good way to inspect and support anonymous functions or global scoped closures, actual defined functions could be supported.

    Reviewed by JordanRL at 2021-07-06 00:21
Related tags
Docbook Tool for static documentation generation from Markdown files

Roave Docbook Tool Static HTML and PDF generator tool for generating documentation from Markdown files. Generates a deployable HTML file from Markdown

Aug 1, 2022
PHP based Markdown documentation viewer

PHP based viewer for Markdown files, to view them with fenced code highlighting and navigation.

Mar 31, 2022
Generate pseudo-static pages from markdown and HTML files for Flarum

Flarum Pages Generator This is not a Flarum extension. This package provides a Flarum extender that you can use in the local extend.php to define cust

Feb 21, 2022
Easily add routes to your Laravel app by creating Markdown or Blade files

Laravel Pages This package lets you create pages using Markdown or Blade without having to worry about creating routes or controllers yourself. Essent

Jul 6, 2022
PHP Documentation system.

PHP Documentation system Simple but powerful Markdown docs. Features Search within Markdown files Customizable Twig templates (Note: default design is

Jun 8, 2022
Better Markdown Parser in PHP
Better Markdown Parser in PHP

Parsedown Better Markdown Parser in PHP - Demo. Features One File No Dependencies Super Fast Extensible GitHub flavored Tested in 5.3 to 7.3 Markdown

Aug 11, 2022
Highly-extensible PHP Markdown parser which fully supports the CommonMark and GFM specs.
Highly-extensible PHP Markdown parser which fully supports the CommonMark and GFM specs.

league/commonmark league/commonmark is a highly-extensible PHP Markdown parser created by Colin O'Dell which supports the full CommonMark spec and Git

Aug 6, 2022
Convert HTML to Markdown with PHP

HTML To Markdown for PHP Library which converts HTML to Markdown for your sanity and convenience. Requires: PHP 7.2+ Lead Developer: @colinodell Origi

Aug 11, 2022
PHP Markdown Engine Support

PHP Markdown Version v1.x support all PHP version >=5.4 v2.x support all PHP version >=7.0 Cài đặt thư viện Thư viện này được cài đặt thông qua Compos

Jul 1, 2022
Rendering markdown from PHP code

JBZoo / Markdown Installing composer require jbzoo/markdown Usage Rendering Table <?php declare(strict_types=1); use JBZoo\Markdown\Table; echo (new

Dec 26, 2021
PHP Markdown & Extra

PHP Markdown & Extra An updated and stripped version of the original PHP Markdown by Michel Fortin. Works quite well with PSR-0 autoloaders and is Com

Jan 18, 2022
A simple regex-based Markdown parser in PHP

Slimdown A simple regex-based Markdown parser in PHP. Supports the following elements (and can be extended via Slimdown::add_rule()): Headers Links Bo

Jul 27, 2022
A super lightweight Markdown parser for PHP projects and applications.

A speedy Markdown parser for PHP applications. This is a super lightweight Markdown parser for PHP projects and applications. It has a rather verbose

May 31, 2022
A highly configurable markdown renderer and Blade component for Laravel
A highly configurable markdown renderer and Blade component for Laravel

A highly configurable markdown renderer and Blade component for Laravel This package contains: a Blade component that can render markdown a highly con

Aug 13, 2022
Render colored Markdown contents on console terminal
Render colored  Markdown contents on console terminal

cli-markdown Render colored markdown contents on console terminal Preview run demo by php example/demo.php Features support auto render color on termi

Jan 27, 2022
markdown wiki/blog
markdown wiki/blog

Kwiki markdown wiki/blog Usage Place your markdown files in the /wiki directory. Categories are directories and subcategories are subdirectories. If y

May 29, 2022
Symfony 5 bundle to easily create dynamic subpages with Markdown. Useful for help sections and wikis.

MarkdownWikiBundle This bundle allows you to create rich subpages in a Symfony project using Markdown. Pages are stored in a file cache and sourced fr

Apr 26, 2022
Gruik ! An open-source markdown note-taking web app. [ABANDONED PROJECT]

What is Gruik ? It's a free & open-source note-taking service. A space where you can store notes, tutorials, code snippets... by writing them in markd

Mar 31, 2022
Daux.io is an documentation generator that uses a simple folder structure and Markdown files to create custom documentation on the fly. It helps you create great looking documentation in a developer friendly way.

Daux.io - Deprecation Notice This repository is deprecated! Daux.io has been moved to an organization, to guarantee future development and support. So

Jul 30, 2022
Daux.io is an documentation generator that uses a simple folder structure and Markdown files to create custom documentation on the fly. It helps you create great looking documentation in a developer friendly way.

Daux.io Daux.io is a documentation generator that uses a simple folder structure and Markdown files to create custom documentation on the fly. It help

Aug 8, 2022