Commit d0e76dc
committed
Integrate Fluent, FluentGen and FluentAnalysis
Replace the internal code generation and builder infrastructure with
Respect/Fluent for runtime method resolution, Respect/FluentGen for
mixin interface generation, and Respect/FluentAnalysis for PHPStan
type narrowing.
ValidatorBuilder now extends Fluent's Append builder with
ComposableMap for prefix composition at runtime.
Each validator is annotated with:
- #[Assurance] declaring the type it narrows to (100+ validators)
- #[AssuranceParameter] on constructor params used for dynamic type
resolution (Instance)
- #[Composable] with class-string references for prefix composition
constraints (Not, All, Key, Property, NullOr, UndefOr, Min, Max,
Length, and 29 validators with with/without constraints)
- #[ComposableParameter] on promoted prefix parameters (Key, Property)
Removes the internal CodeGen infrastructure (MethodBuilder,
MixinGenerator, PrefixMapGenerator, etc.) in favor of FluentGen.
Adds type inference tests validating PHPStan narrowing for type
validators, val variants, composites (allOf, anyOf, oneOf, noneOf,
when), modifiers (not, nullOr, undefOr), element narrowing (each,
all), value/member narrowing (identical, in), parameter narrowing
(instance), and chain intersection.1 parent ab992b4 commit d0e76dc
File tree
177 files changed
+3421
-1012
lines changed- src-dev
- CodeGen
- FluentBuilder
- Commands
- src
- Mixins
- Transformers
- Validators
- tests
- inference
- assertions
- src/Validators
- unit
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
177 files changed
+3421
-1012
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
39 | | - | |
| 40 | + | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| 47 | + | |
| 48 | + | |
46 | 49 | | |
47 | 50 | | |
48 | 51 | | |
| |||
71 | 74 | | |
72 | 75 | | |
73 | 76 | | |
74 | | - | |
| 77 | + | |
| 78 | + | |
75 | 79 | | |
76 | 80 | | |
77 | 81 | | |
| |||
84 | 88 | | |
85 | 89 | | |
86 | 90 | | |
| 91 | + | |
87 | 92 | | |
88 | 93 | | |
89 | 94 | | |
| |||
92 | 97 | | |
93 | 98 | | |
94 | 99 | | |
| 100 | + | |
95 | 101 | | |
96 | 102 | | |
97 | 103 | | |
| |||
0 commit comments