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

Blade Parser Laravel Package

stillat/blade-parser

Parse, analyze, and transform Laravel Blade templates with a robust PHP parser. stillat/blade-parser provides an AST, tokenization, and utilities to inspect directives, components, and expressions—ideal for linters, formatters, editors, and automated refactoring tools.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit: The package is purpose-built for Laravel's templating ecosystem, offering non-executing Blade analysis that aligns with Laravel's component-based design. It avoids runtime dependencies, making it suitable for tooling layers without affecting application performance.

Integration feasibility: High for Composer-based Laravel projects. Minimal boilerplate required to integrate, but requires careful handling of Blade version compatibility and edge cases like custom directives or legacy syntax.

Technical risk: Critical concerns include unknown repository (no public source code for audit), low community adoption (144 stars), and a future-dated release (2026-02-26) suggesting potential data inaccuracies. Likely compatibility gaps with newer Laravel versions due to sparse maintenance history.

Key questions:

  • What specific Laravel versions are officially supported?
  • Is there a public test suite demonstrating coverage of Blade syntax features?
  • How does the parser handle undocumented or deprecated Blade directives?
  • Why is the repository listed as "unknown" despite Packagist availability?

Integration Approach

Stack fit: Native compatibility with PHP/Laravel stacks. Ideal for embedding in CLI tools, IDE plugins, or CI pipelines where static analysis of Blade templates is required. Does not interfere with runtime execution or middleware layers.

Migration path: Replace regex-based parsing or ad-hoc string manipulation with structured node traversal. Start by parsing a subset of templates (e.g., error pages) to validate accuracy before scaling to full codebase.

Compatibility: Must validate against current Laravel version's Blade implementation. Known limitations may exist for newer features like @once or component slots if the parser hasn't been updated recently.

Sequencing:

  1. Local dev environment: Integrate for real-time linting during template edits.
  2. CI pipeline: Add as a pre-commit hook for syntax validation.
  3. Tooling expansion: Build refactoring utilities or documentation generators using parsed node data.

Operational Impact

Maintenance: High risk due to low community engagement and unverifiable repository. Internal team would need to maintain a fork if critical bugs emerge. No SLA or official support channels.

Support: Entirely community-dependent. Lack of issue tracker or contribution guidelines (due to unknown repo) makes troubleshooting difficult. Requires internal expertise to debug parser failures.

Scaling: Parsing thousands of templates may require batching due to memory constraints. No documented performance benchmarks—must test with production-scale template volumes.

Failure modes: Unhandled Blade syntax (e.g., custom directives) could cause parser crashes. No built-in fallback for malformed templates, risking pipeline failures during CI.

Ramp-up: Moderate learning curve for developers unfamiliar with AST traversal. Documentation appears sparse—requires studying source code directly (if accessible) to understand node types and traversal patterns.

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