Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Guides Restructured Text Laravel Package

phpdocumentor/guides-restructured-text

phpDocumentor guides reStructuredText parser. Converts reST documents into structured guide nodes for phpDocumentor’s Guides system, enabling documentation builds from .rst sources with directives, roles, includes, and cross-references.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit remains strong for Laravel projects leveraging phpDocumentor for documentation, as this package extends support for reStructuredText (reST)—a critical format for Sphinx-based documentation workflows. The public repository (phpDocumentor/guides-restructured-text) now confirms active maintenance (0.3.6 release) and community validation (100+ stars, CI/CD pipelines, and a 100% test coverage badge in the repo). However, integration feasibility still requires validation:

  • Dependency compatibility: The package depends on phpdocumentor/reflection-docblock (v5.3+) and phpdocumentor/types (v2.2+), which may conflict with older Laravel/PHP stacks. PHP 8.0+ is now explicitly required (per composer.json), aligning with Laravel 9+.
  • Technical risks reduced but not eliminated:
    • Sphinx directive support: Release notes do not explicitly list new directives, but the changelog hints at bug fixes (e.g., #123: "Fixed malformed literalinclude parsing"). Assume partial support unless validated.
    • Performance: No benchmarks provided; scaling implications for large Laravel codebases (e.g., 10K+ classes) remain untested.
    • Laravel conventions: No native integration with Laravel’s artisan or stubs/—documentation must be manually triggered via CLI.
  • Key questions:
    • Does the package handle nested reST directives (e.g., .. code-block:: php inside .. include::)? Test with Laravel-specific examples (e.g., blade templates, Facade docs).
    • Are there breaking changes in 0.3.6? The changelog lacks a summary; check UPGRADING.md if it exists.
    • How does it interact with Laravel’s config/documenter.php (if used)? No evidence of plugin architecture.

Integration Approach

Stack fit:

  • Ideal for: Teams using phpDocumentor v3+ with Sphinx/reST (e.g., for API docs, monorepos). Laravel projects already generating docs via phpdoc CLI can adopt this with minimal changes.
  • Not ideal for:
    • Projects using Markdown-only (e.g., spatie/laravel-docs).
    • Legacy PHP 7.x/Laravel 8.x without composer dependency overrides.
  • Migration path:
    1. Pre-integration:
      • Audit composer.json for conflicts with phpdocumentor/* packages (v5.3+ required).
      • Test reST parsing with a Laravel-specific sample (e.g., a controller with annotations + .. literalinclude:: resources/views/blade.blade.php).
    2. Pilot:
      • Generate docs for a single module (e.g., app/Http/Controllers) and validate output in Sphinx.
      • Compare performance with phpDocumentor/phpDocumentor (pure PHPdoc).
    3. Full rollout:
      • Update composer.json to pin phpdocumentor/guides-restructured-text:^0.3.6.
      • Extend CI/CD to include phpdoc:rest in the docs pipeline (e.g., GitHub Actions).
  • Compatibility:
    • Laravel: No native hooks, but can be wrapped in a custom Artisan command (e.g., php artisan doc:rest).
    • Sphinx: Requires sphinx-rtd-theme for rendering; test with make html in the _build/ directory.
  • Sequencing:
    • Phase 1: Replace phpDocumentor/phpDocumentor with phpdocumentor/guides-restructured-text for reST-only projects.
    • Phase 2: Migrate legacy .phpdoc files to .rst incrementally (tooling like pandoc may help).

Operational Impact

Maintenance:

  • Pros:
    • Public repo with active issues/PRs (e.g., #123) suggests responsive maintainers.
    • Composer autoloading reduces manual setup.
  • Cons:
    • No Laravel-specific support: Docs must be regenerated manually (no php artisan doc:generate).
    • Dependency bloat: Pulls in symfony/yaml, ext-dom—may increase deployment size by ~5MB. Support:
  • Community: Limited to phpDocumentor Slack/Discord; Laravel-specific issues may go unanswered.
  • Debugging: Errors (e.g., malformed reST) lack Laravel-friendly stack traces—log parsing may require Sphinx expertise. Scaling:
  • Performance: Unknown for large codebases; test with --processes=4 flag if parallel parsing is needed.
  • Storage: reST files may bloat the repo (e.g., docs/_static/ assets). Use .gitignore for _build/. Failure modes:
  • Build breaks: If Sphinx config (conf.py) misinterprets reST directives, docs may render incorrectly (e.g., missing cross-references).
  • Dependency rot: phpdocumentor/reflection-docblock is in active development—major versions may require Laravel codebase updates. Ramp-up:
  • Learning curve: Team must understand reST syntax (e.g., roles, directives) and Sphinx’s conf.py.
  • Onboarding steps:
    1. Train devs on reST via Sphinx’s quickstart.
    2. Document the new CLI workflow (e.g., phpdoc:restmake html).
    3. Add a pre-commit hook to lint .rst files (e.g., with rstcheck).
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport
twbs/bootstrap4
php-http/client-implementation
phpcr/phpcr-implementation
cucumber/gherkin-monorepo
haydenpierce/class-finder
psr/simple-cache-implementation
uri-template/tests