mathiasverraes/uptodocs
Generate always-up-to-date docs from your codebase. uptodocs extracts examples and API details directly from source, helping teams keep documentation accurate, searchable, and in sync with changes across projects.
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.
uptodocs to catch breaking changes or outdated APIs.uptodocs as integration tests.vendor/bin/uptodocs docs/**/*.md to your CI pipeline to fail builds if any documented snippet throws an error or warning.date_default_timezone_set, static properties) without cross-contamination.date_default_timezone_set() or putenv() inside the snippet if your code depends on environment variables.require __DIR__.'/vendor/autoload.php'; at the top of code blocks if your examples rely on Composer autoloaded classes.error_reporting(0) or use @ cautiously.Uptodocs\Output\OutputFormatter) or preprocessor hooks if you need global setup (e.g., mock services).How can I help you explore Laravel packages today?