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

Uptodocs Laravel Package

mathiasverraes/uptodocs

Keep project documentation in sync with your codebase. Uptodocs checks whether docs are up to date, helping teams catch stale or missing docs early and maintain reliable README and guides as the application evolves.

Deep Wiki
Context7

Getting Started

Start by installing via Composer (composer require mathiasverraes/uptodocs) and creating a Markdown file (e.g., docs/usage.md) with fenced PHP code blocks. Each block is treated as a standalone script—prefix with <?php if needed. Run vendor/bin/uptodocs docs/usage.md to validate and execute snippets. The first use case is testing documentation examples: write a guide with runnable examples, and uptodocs ensures they don’t bitrot by verifying they execute successfully in CI.

Implementation Patterns

  • Living Documentation: Embed executable examples in READMEs or docs; CI runs uptodocs to catch breaking changes or outdated APIs.
  • Test-Driven Docs: Write usage examples first as Markdown code blocks, then implement the code, running uptodocs as integration tests.
  • CI Workflow: Add vendor/bin/uptodocs docs/**/*.md to your CI pipeline to fail builds if any documented snippet throws an error or warning.
  • Isolation: Leverage per-block process isolation to test code that modifies global state (e.g., date_default_timezone_set, static properties) without cross-contamination.

Gotchas and Tips

  • Timezone & Environment: Each snippet runs in a fresh process—configure date_default_timezone_set() or putenv() inside the snippet if your code depends on environment variables.
  • No Autoloading by Default: Include require __DIR__.'/vendor/autoload.php'; at the top of code blocks if your examples rely on Composer autoloaded classes.
  • Exit Codes & Output: Uptodocs exits non-zero on any output to STDERR or exceptions; suppress expected warnings with error_reporting(0) or use @ cautiously.
  • Staleness Risk: Since the last release was in 2020, verify compatibility with modern PHP versions (8.0+)—test locally before trusting CI.
  • Extensibility: Extend the runner via custom output formatters (implement Uptodocs\Output\OutputFormatter) or preprocessor hooks if you need global setup (e.g., mock services).
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
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
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