• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

valkyrjaio / sindri-php / 24872431353
100%

Build:
DEFAULT BRANCH: 26.x
Ran 24 Apr 2026 04:36AM UTC
Jobs 1
Files 72
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

24 Apr 2026 04:34AM UTC coverage: 100.0% (+100.0%) from 0.0%
24872431353

push

github

web-flow
[Generator] Add AST-based static analysis generators (#23)

## Description

Introduces a static-analysis-based code generation pipeline to Sindri,
built on PHP-Parser. Instead of instantiating a live container or using
reflection, all readers accept file paths and parse PHP source files
directly as an AST. This makes the generators faster, fully portable,
and independent of autoloader state.

The pipeline consists of three layers:

- **AST readers** (`Sindri\Ast\`) — parse PHP source files and extract
route attributes, listener bindings, service providers, component
providers, and config. Class-name → file-path resolution is the caller's
responsibility, keeping the readers free of any framework coupling.
- **Generate orchestration** (`Sindri\Generate\`) — walks a set of
component providers via `GenerateDataFromAst`, collects AST reader
output, and drives each file generator.
- **File generators** (`Sindri\Generator\Ast\`) — emit PHP data files
for CLI routes, HTTP routes, container bindings, and events.

A `generate:data` CLI command (`GenerateDataFromConfigCommand`) exposes
the full pipeline, and the new `SindriCommandServiceProvider` /
`SindriCliRouteProvider` are registered in `SindriComponentProvider`.

---

## Types of changes

- [ ] Improvement *(non-breaking change which improves code)*
- [ ] Bug fix *(non-breaking change which fixes an issue)*
- [x] New feature *(non-breaking change which adds functionality)*
- [ ] Deprecation *(breaking change which removes functionality)*
- [ ] Breaking change *(fix or feature that would cause existing
functionality to change)*
- [ ] Documentation improvement

---

## Changes

### AST Readers

- `src/Sindri/Ast/Abstract/AstReader.php` — abstract base with shared
PHP-Parser utilities (namespace unwrapping, use-map building, method
indexing, value resolution)
- `src/Sindri/Ast/CliRouteAttributeReader.php` — reads `#[CliRoute]`
attributes from handler files, extracting argument and option parameter
metadata
- `... (continued)

1485 of 1485 new or added lines in 37 files covered. (100.0%)

1493 of 1493 relevant lines covered (100.0%)

15.29 hits per line

Jobs
ID Job ID Ran Files Coverage
1 24872431353.1 24 Apr 2026 04:36AM UTC 72
100.0
GitHub Action Run
Source Files on build 24872431353
  • Tree
  • List 72
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #24872431353
  • 11652c4a on github
  • Prev Build on 26.x (#24794563459)
  • Next Build on 26.x (#24872733974)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc