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

valkyrjaio / sindri-php / 24949085513 / 1
100%
26.x: 100%

Build:
DEFAULT BRANCH: 26.x
Ran 26 Apr 2026 05:23AM UTC
Files 79
Run time 1s
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

26 Apr 2026 05:22AM UTC coverage: 100.0%. Remained the same
24949085513.1

push

github

web-flow
[Sindri] Emit constant references for route names, paths, and array keys (#32)

# Description

Route names, paths, and routing-data array keys that originate from
class-constant references (e.g. `CommandName::HELP`) were being emitted
as quoted string literals in generated files. The root cause was that
`extractExprValue` normalises a `ClassConstFetch` AST node to the string
`"FQN::CASE"`, and every downstream code-generation path then
unconditionally wrapped that string in single quotes or passed it
through `buildStringExpr`.

Fixed by routing all name, path, and array-key values through
`buildEnumCaseExpr`, which already knows to produce a `ClassConstFetch`
node when the string contains `::` and fall back to `String_` otherwise.
The same fix is applied to the route-name values stored inside the HTTP
`paths` / `dynamicPaths` / `regexes` nested arrays.

---

## Types of Changes

- [ ] Improvement _(non-breaking change which improves code)_
- [x] Bug fix _(non-breaking change which fixes an issue)_
- [ ] 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

- **`src/Sindri/Ast/CliRouteAttributeReader.php`** — `name:` named arg
now uses `buildEnumCaseExpr` instead of `buildStringExpr`
- **`src/Sindri/Ast/HttpRouteAttributeReader.php`** — `name:` and
`path:` named args now use `buildEnumCaseExpr` instead of
`buildStringExpr`
- **`src/Sindri/Generator/Abstract/AstFileGenerator.php`** — added
`buildEnumCaseExpr` helper (mirrors the one in `AstReader`) so both
concrete generators can use it
- **`src/Sindri/Generator/Ast/Cli/AstCliDataFileGenerator.php`** —
`getRoutesAsContent()`: array key printed via
`prettyPrintExpr(buildEnumCaseExpr($key))` instead of `'$key'`
- **`src/Sindri/Generator/Ast/Http/AstHttpDataFileGenerator.php`** —
same key fix in ... (continued)

1532 of 1532 relevant lines covered (100.0%)

16.36 hits per line

Source Files on job 24949085513.1
  • Tree
  • List 79
  • Changed 5
  • Source Changed 5
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 24949085513
  • 1d709b5b on github
  • Prev Job for on 26.x (#24948067444.1)
  • Next Job for on 26.x (#24949105721.1)
  • 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