ApiGen

PHP 7.1 ready Smart and Simple Documentation for your PHP project

OTHER License

Downloads
612.6K
Stars
2.1K
Committers
72

Bot releases are hidden (Show)

ApiGen - v7.0.0-alpha.6 Latest Release

Published by JanTvrdik over 1 year ago

Improved parallelization

  • supports parallel analysis in addition to parallel rendering
  • no longer requires pcntl extension
  • works on Windows as well

Other Improvements

Bugfixes

ApiGen - 7.0.0-alpha

Published by JanTvrdik over 2 years ago

Rewritten to be based on nikic/php-parser and phpstan/phpdoc-parser with full support of PHP 8.1 features.

Features

Install

With Docker

ApiGen is available as apigen/apigen Docker image which you can directly use.

docker run --rm --interactive --tty --volume "$PWD:$PWD" --workdir "$PWD" \
  apigen/apigen \
  src --output docs

With Phar

This will install ApiGen phar binary to tools/apigen.

mkdir -p tools
curl -L https://github.com/ApiGen/ApiGen/releases/download/v7.0.0-alpha/apigen.phar -o tools/apigen
chmod +x tools/apigen
tools/apigen src --output docs

With Composer

This will install ApiGen to tools/apigen directory with executable entry point available in tools/apigen/bin/apigen.

composer create-project --no-dev apigen/apigen:^7.0@alpha tools/apigen
tools/apigen/bin/apigen src --output docs
ApiGen - Released version 5.0 RC5

Published by TomasVotruba about 7 years ago

If you are interested in ApiGen behind-scene @tomasvotruba wrote a post about ApiGen 5 revival process: https://www.tomasvotruba.cz/blog/2017/09/04/how-apigen-survived-its-own-death/

Added

  • @vlastavesely added as a co-maintainer, thanks to his great additions to the project 👏

  • #971 Added resolving parent classes, Thanks to @vlastavesely

  • #987 Improve parsing by BetterReflection by Caching, make use of https://github.com/Roave/BetterReflection/pull/312; also decouple BetterReflection subpackage and turn static to DI

Changed

  • #977, #978 Updated to EasyCodingStandard 2.2.6 with new checkers
  • #990 Improve ProjectVendorSourceLocatorFactory readability, Thanks @simara-svatopluk

Fixed

  • #974 Deprecate all subelements of deprecated classes, interfaces and traits, Thanks to @vlastavesely
  • #980 Fixed line wraps in source code (css), Thanks to @vlastavesely
  • #972 Fixed __CLASS__ parsing, see https://github.com/Roave/BetterReflection/pull/298, Thanks to @vlastavesely

Full diff: https://github.com/ApiGen/ApiGen/compare/v5.0.0-RC4...v5.0.0-RC5

ApiGen - Released version 5.0 RC4 - DEMO is Back!

Published by TomasVotruba about 7 years ago

Added

Changed

  • #956 Reflection: allowed nullable filenames for internal reflections, Thanks @vlastavesely
  • #969 Upgraded to EasyCodingStandard 2.2

Fixed

  • #955 RelativePathResolver: fix for functions loaded from file source, Thanks @vlastavesely
  • #957 Parser: fixed file source loader, Thanks @vlastavesely
  • #954 Deprecated methods of deprecated interface, Thanks @vlastavesely
  • #969 Lock Roave\BetterReflection to specific commit to prevent breaking the code

Full diff: https://github.com/ApiGen/ApiGen/compare/v5.0.0-RC3...v5.0.0-RC4

ApiGen - Released version 5.0 RC3

Published by TomasVotruba over 7 years ago

Huge thanks to @vlastavesely for dozens of PR to this release!
Your work is pushing this repository fast forward.

Added

  • #944 Added support for FileLocator; Thanks to @vlastavesely
    vendor/bin/apigen generate src/Directory src/SomeClass.php --destination /api
    
  • #940 Added support for traits with properties; Thanks to @vlastavesely
  • #916 Added support different vendor analysis by adding a ComposerSourceLocator; Thanks to @vlastavesely
  • #946 Added highlighting of method's param default value; Thanks to @vlastavesely
  • #932 Added autocomplete search; Thanks to @vlastavesely and also to @POPSuL

Changed

  • #934 Disabled function param sorting + fixed function.latte; Thanks to @vlastavesely
  • #943 Minor improvement in 'finished' msg; Thanks to @nelson6e65
  • #933 Use local copy of jQuery; Thanks to @vlastavesely

Fixed

  • #950 Fixed link generation for type hints; Thanks to @vlastavesely
  • #952 Fixed @see/@link annotation for links and not elements.
  • #941 Fixed improper parent class retrieval; Thanks to @vlastavesely
  • #939 #953 Fixed strike outs for deprecated elements; Thanks to @vlastavesely
  • #925 Theme: fixed whitespace wrapping for long description; Thanks to @vlastavesely
  • #927 Fixed console progressbar overflow; Thanks to @vlastavesely

Full diff: https://github.com/ApiGen/ApiGen/compare/v5.0.0-RC2...v5.0.0-RC3

ApiGen - Released version 5.0 RC2

Published by TomasVotruba over 7 years ago

Added

  • #888 more informative information added on --version call in CLI; Thanks to @brunoaugusto
  • #895 implemented TraitMethodReflection::isDeprecated(); Thanks to @vlastavesely
  • #923 used local Bootstrap CSS for more flexible local development; Thanks to @vlastavesely
  • #919 added exception standalone page via ExceptionGenerator + separation from classes in NamespaceGenerator; Thanks to @vlastavesely

Changed

  • #918 use Coveralls for coverage over Scrutinizer

Fixed

  • #917 fixed removing internal classes for NamespaceGenerator
  • #905 StepCounter improvements; Thanks to @vlastavesely
  • #898 fixed source code highlighting templates; Thanks to @vlastavesely
  • #921, #892, #904 fixed autoloading for composer create-project ... and composer global require ... command and added tests for them; Thanks to @brunoaugusto and @nelson6e65
  • #891, #893 fixed trait name in template; Thanks to @vlastavesely

Thank you all guys for great work. I'm very happy to see such activity around this project! ❤️

Full diff: https://github.com/ApiGen/ApiGen/compare/v5.0.0-RC1...v5.0.0-RC2

ApiGen - Released version 5.0 RC1

Published by TomasVotruba over 7 years ago

Added

  • #863 Added Annotation package
  • Added Element package
  • Added ModularConfiguration package
  • Added Reflection package
  • #858 Added StringRouting package
  • Added .editorconfig to the project
  • #704 Added support for static type
  • #731 Added bitcoin link support via @link bitcoin:address
  • Added theme option to load theme from directory
  • Added phpDocumentor/TypeResolver for type resolving
  • Added phpDocumentor/ReflectionDocBlock for annotation parsing
  • Added Symplify/EasyCodingStandard to make coding standard powerful
  • Added phpstan for static analysis checks

Changed

  • #827 Changed PHP Token Reflection library from andrewsville/php-token-reflection to roave/better-reflection
  • Minimum PHP requirement was increased from 5.4 to 7.1
  • #880 Change DI library from Nette\DI to Symfony\DependencyInjection due to Symfony 3.3 new features and PSR-11
  • Project is now PSR-2 compatible
  • #64 UTF-8 is now a standard/default charset. [ApiGen] will expect UTF-8 encoded files by default
  • #771 Only relevant classes are generated in sidebar and source code pages
  • Enabled autocomplete for methods and properties
  • #814 #862 ThemeDefault and ThemeBootstrap merged to one local theme, with support of Bootstrap 3
    and mobile-friendly design
  • #823 @internal annotation cannot be ignored now
  • #826 Long and short description merged to one, since there was thin and not clear line between them
  • #818 #827 Class<Generator,Reflection> split to Class, Trait and Interface with own type-specific methods
  • #845 #845 SourceCodeGenerator dropped and moved to particular reflection generators (ClassGenerator...)
  • #855 Indirect and direct users/implementers/inheritors merged to one group
  • #858 Tree and Namespace filters simplified
  • #862 Standardize use of annotations
  • #860 Left sidebar removed, it duplicated main content and had complicated tree structures
  • #749 Don't fully qualify local members

Fixed

  • #520 Fixed an issue with temporary files not being removed upon exit (in cases where failure happens)
  • #631 Fixed an issue with generate command throwing an error
  • #804 Fixed tests (and hopefully compatibility) on Windows OS
  • Fixed deprecation checks when generating docs
  • Fixed issues with exception handling in low-level parser
  • Fixed an error on generating docs for non-existent traits
  • #668 Fixed an issue with handling paths on different OS. The paths should now be normalized and work on Windows
  • #740 Fixed an issue where ApiGen sometimes would incorrectly resolve return typehints for functions
  • #734 Fixed an issue when docblocks marked with @internal would be documented
  • #750 Fixed support of $this as return type hint
  • #848 Fixed missing methods in class
  • #717 Fixed duplicated function source code

PHP 5.5, 5.6 and 7 and parsing related Fixes

  • #620 Fixed composed trait methods
  • #774 Fixed default constant value and __DIR__ constant parsing
  • #751 Fixed broken function definition
  • #680 Fixed ::class parsing

Removed

  • #826 --main option dropped
  • #813 Magic elements dropped
  • --charset CLI option has been dropped (expecting UTF-8 now by default)
  • --skip-doc-path CLI option has ben dropped
  • #827 --template-config and --template-theme dropped
  • #853 --exclude and --extensions options dropped (use FinderInterface implementation instead)
  • Removed various deprecated generators (Robots, Sitemap) which weren't used
  • #809 Tree generator dropped
  • Dropped Zip generator, internet is quite fast nowadays.
  • Dropped PHAR support.
  • #827 Exception element dropped
  • Dropped element js toggling in page, was bugged and was causing confused page jumps.
  • Dropped support for global constant documentation, as BetterReflection doesn't support it out of the box yet.

Full diff: https://github.com/ApiGen/ApiGen/compare/v4.1.2...v5.0.0-RC1

ApiGen - Released version 4.0.1

Published by TomasVotruba over 7 years ago

Fixed

  • Fixed issued when parsing configuration array when using phar #564

Full diff: https://github.com/ApiGen/ApiGen/compare/v4.0.0...v4.0.1

ApiGen - Released version 4.1.1

Published by TomasVotruba over 7 years ago

Fixed

  • #590 Fix issue with ThemeConfigPathResolver for vendor

Full diff: https://github.com/ApiGen/ApiGen/compare/v4.1.0...v4.1.1

ApiGen - Released version 4.1.2

Published by jadb almost 9 years ago

ApiGen - Released version 4.1.0

Published by TomasVotruba over 9 years ago

Added

  • #573 --config now supports YAML format, thanks to @trong
  • #536 --source option now accepts single files
  • #539 --annotation-groups options added, to generate pages with single annotation (e.g. for todo: --annotation-groups=todo)
    • before:
      • --todo --deprecated (only these two)
    • now:
      • --annotation-groups todo,deprecated
      • --annotation-groups event,api

Changed

  • #550 wiping out destination is now protected by asking
  • #523 when page from --annotation-groups has no items, info message is displayed
  • #504 themes decoupled to standalone packages
  • [https://github.com/ApiGen/ThemeBootstrap/pull/3] Bootstrap theme was updated to Twitter Bootstrap 3, thanks to @olvlvl
  • #507 use Box for PHAR compiling

Fixed

  • #545 missloading of class list in layout panel
  • #526 Exceptions were displayed instead of interfaces, thanks to @jrnickell
  • #530 --source-code options should be --no-source-code, thanks to @yoosefi
  • #538 spaces from apigen.services.neon removed, thanks to @ramsey
  • #575 function link fixed

Docs

Full diff: https://github.com/apigen/apigen/compare/v4.0.1...v4.1.0

ApiGen - Released version 4.0.0

Published by TomasVotruba almost 10 years ago

Why Skip 3.0?

Version 3.0 was skipped, because master branch had 3.0-dev alias with code
base similar to 2.8. Since then there were many BC breaks, thus major version was bumped to 4.0.


This release closes refactoring of version 2.8. Its aim was to improve code base, provide fairly high code coverage (from 0 % in 2.8) to improve further development and close old pull-requests. Now it's at 84 %, which really makes changes easier.

Saying that, next version will focus on:

  • new features based on issues/PR from you, end users.
  • website management
  • package decoupling
  • documentation

Changes

Bugfixes

  • [#490] reading options from apigen.neon fixed
  • [#434] PHAR installation simplified and fixed for cross platform
  • [#465] relative path on Windows fixed
  • [#375] constant version returned, so now it's available in composer installed packages as well

Full diff: https://github.com/apigen/apigen/compare/v4.0.0-RC5...v4.0.0


How to Upgrade

  • Default command generate added:

    Before:

    apigen -s source -d destination

    After:

    apigen generate -s source -d destination

  • New command self-update added, to upgrade .phar file.

    Before:

    manual update

    After:

    apigen self-update

  • Bool options for arguments passed via CLI are off when absent, on when
    present.

    Before:

    ... --tree yes # tree => true

    ... --tree no # tree => false

    After:

    ... --tree # tree => true

    ... # tree => false

  • Options with values for arguments passed via CLI now accept multiple formats:

    Before:

    ... --access-levels public --access-levels protected

    After:

    ... --access-levels public,protected

    or

    ... --access-levels="public,protected"

    or

    ... --access-levels public --access-levels protected

  • Some CLI options were dropped. To see what the available ones are, just run apigen generate --help.

    • --skip-doc-prefix was dropped, use --skip-doc-path instead
    • --allowed-html was dropped
    • --autocomplete was dropped; autocomplete now works for classes, constants and functions by default
    • --report; use Php_CodeSniffer for any custom checkstyle
    • --wipeout; now wipes out everytime
    • --progressbar; now always present
    • --colors; now always colors
    • --update-check; update manually by apigen self-update (new version is released every ~ 2 months)
  • Some CLI options were renamed and reversed.

    • --source-code was off by default, now it on by default; to turn it off, add --no-source-code
ApiGen - Pre-release version 4.0.0-RC5

Published by TomasVotruba almost 10 years ago

New features

Changes

Bugfixes

  • [#373] escaped HTML code in parameter list
  • [#423, #437] Reflection: functions are never loaded https://github.com/apigen/apigen/commit/493aff0d49e6e16066fa846c82a2ba225112e46d
  • [#445] 'mixed' is not 'undefined'
  • [#475] Function with arguments throws exception
  • [#473] The option "autocomplete" does not exist.
  • [#467] Generator not working: mb_substr_count expects at most 3 parameters, 4 given
  • [#466] Composer install failing on OS X

Full diff: https://github.com/apigen/apigen/compare/v4.0.0-RC4...v4.0.0-RC5

ApiGen - Pre-release version 4.0.0-RC4

Published by TomasVotruba almost 10 years ago

New features

Changes

Bugfixes

Full diff: https://github.com/apigen/apigen/compare/v4.0.0-RC3...v4.0.0-RC4

ApiGen - Pre-release version 4.0.0-RC3

Published by TomasVotruba about 10 years ago

New features

  • [#382] selfupdate command for phar added, will download most up-to-date stable version
  • [#364] --working-dir option added, same functionality as Composer

Changes

Bugfixes

Full diff: https://github.com/apigen/apigen/compare/v4.0.0-RC2...v4.0.0-RC3

ApiGen - Pre-release version 4.0.0-RC2

Published by TomasVotruba about 10 years ago

Changes:

  • SourceCodeHilighter: new method highlightAndAddLineNumbers() decoupled from highlight() method bool param

Bugfixes:

  • [#366] Filter 'resolveElement' is not defined + test added
  • [#365] Undefined variable: namespaces + test added
  • [#362] Problems with default values + test added
  • GenerateCommand error output broken style

Full diff: https://github.com/apigen/apigen/compare/v4.0.0-RC1...v4.0.0-RC2

ApiGen - Pre-release version 4.0.0-RC1

Published by TomasVotruba about 10 years ago

New features

BC breaks

  • default markup is now Markdown using michelf\php-markdown
  • dropped PEAR support
  • dropped options:
    • allowed-html
    • source-code (link to source code is now always displayed)
    • report
    • wipeout
    • quiet
    • progressbar (always displayed)
    • colors
    • update-check

Full diff: https://github.com/apigen/apigen/compare/v2.8.1...v4.0.0-RC1

ApiGen - Released version 2.0.1

Published by TomasVotruba about 10 years ago

  • Updated TokenReflection library to 1.0.0beta5
  • Requires FSHL 2.0.0RC
  • Fixed url in footer
Package Rankings
Top 0.51% on Packagist.org
Top 8.17% on Proxy.golang.org