Repository navigation
Commit 72e4979
authored
Several Bug and edge cases resolve found in running noctud/collection (#133)
* Enhance type inference and validation in ParamChecker, TemplateManager, and RuntimeTypeChecker; add tests for iterable object handling and ignore tag support in callables Find in noctud collection report..
* Enhance ParamChecker and TemplateManager with improved type inference; add UnboundGeneratorTemplateTest for verifying template behavior in generators
* Add ConditionalReturnGenericsTest for filterNotNull and flatten behaviors in generic collections
* Add GenericMapFixture and tests for factory reconstruction variance in generics
* Refactor TemplateManager to simplify type matching logic and add UnionBoundSpecializationTest for lazy closure template inference
* Improve type annotations and formatting in various tests and TemplateManager for better clarity and consistency
* Refactor ParamChecker to simplify traversable type resolution; add SpuriousTemplateBleedTest for verifying template behavior in generic collections
* Enhance ParamChecker to utilize class templates in type substitution for improved generic handling
* Enhance ParamChecker to support class alias substitution in traversable type resolution; add tests for aliased generics handling
* Enhance ParamChecker to support class templates in template inference; add tests for generic map construction and inference
* Enhance FunctionContractInjector and RuntimeTypeChecker to support scope management; add ScopeCleaner for template binding; introduce GenericStreamPipeline with tests for generator interleaving and template isolation
* Fix formatting in FunctionContractInjector by adding spaces in anonymous class definitions for improved readability
* Enhance ParamChecker to support ObjectShapeNode in template inference; add TuplePairStore with tests for heterogeneous key unification and template upper bounds enforcement
* Add tests for cloned store template widening in immutable collections and maps
* Refactor ParamChecker to improve return type handling and add NullableClosureAndTemplateDefaultInference tests for enhanced type inference
* Enhance template inference by adding generator support in ParamChecker and TemplateManager; improve test coverage for nullable closures and template defaults
* Refactor TemplateManager to utilize WeakMap for instance template bindings; add SelfPreserving subtype variance tests for enhanced type safety in generics
* Enhance ParamChecker and TemplateManager with improved call binding handling; add propagation logic for instance properties and introduce LazyProxy and ClonedStore tests for type inference validation
* Enhance propagateBindingsToInstanceProperties method to prevent premature initialization of uninitialized lazy objects; improve property inspection logic for better handling of lazy properties.
* Implement generics for map and set structures, including immutable and mutable hash maps, with comprehensive type checking and tests for entries and keys views. Add Noctud-style entries view tests to ensure type consistency after accessing values.
* Add caching for generic object contexts and template variances in ParamChecker and TemplateManager
* Fix formatting by adding missing newlines in ParamChecker and TemplateManager
* Fix PHP version check placement in ReturnGenericReificationTest
* Add generic iterable and animal producer classes with tests for type inference across namespaces
* Refactor contract cache handling in checkers and enhance method hierarchy resolution with dynamic class name support
* Enhance ConstantAndEnumEvaluator with enum support and add comprehensive soundness tests
* Refactor ArrayLiteralEvaluator to improve non-empty array and list checks, and add hasConcreteItem method for better item validation. Introduce ArrayLiteralSpreadSoundnessTest for comprehensive spread expression testing.
* Refactor DocblockNormalizer to quote unquoted class constant keys in array/object shapes for phpdoc-parser compatibility. Add tests for conditional class constants and enums in various scenarios.
* Enhance ContractVisitor with side-effect detection and hoisting for impure targets. Add tests for foreach and by-reference array item write contexts, ensuring proper handling of static properties and contract violations.
* Enhance ContractVisitor and TemplateManager with improved generic type handling and add Nullable and Union Generic Pre-binding tests
* Enhance InlineChecker and SpecialTypeResolver with namespace extraction and improved file metadata handling; add MultiNamespaceAndEnumTraitMetadataTest for comprehensive coverage of multi-namespace and trait use cases.
* Refactor FunctionContractInjector to simplify return statement checks; add UnannotatedNativeReturnInjectionTest for verifying native return type injection behavior in standalone classes.
* Add active call order tracking to TemplateManager and implement tests for re-entrant call stack behavior
* Enhance DocblockNormalizer to support nested angle brackets and callable generics; add comprehensive tests for preservation and normalization of complex types.
* fix code styling
* Enhance ReportCommand output to include detailed report file information and summary statistics for violations and affected files.
* Fix missing newline at end of file in ReportCommand.php1 parent 66f5f2f commit 72e4979
64 files changed
Lines changed: 9419 additions & 448 deletions
File tree
- src/Internal
- Ast
- Elimination/Evaluator
- Checker
- Cli
- Docblock
- Generics
- Io
- Resolver
- Validator
- Wrapper
- tests
- Fixtures
- Consumer
- Domain
- Sub
- Generics
- Internal
- Ast
- Elimination
- Docblock
- Io
- TypeChecking
- CallablesAndIterators
- Conditionals
- Generics
- InheritanceAndAttributes
- Unit
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
132 | | - | |
| 131 | + | |
| 132 | + | |
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| |||
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
187 | | - | |
| 187 | + | |
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
| |||
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
219 | | - | |
| 219 | + | |
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
| |||
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
279 | | - | |
| 279 | + | |
280 | 280 | | |
281 | 281 | | |
282 | 282 | | |
| |||
342 | 342 | | |
343 | 343 | | |
344 | 344 | | |
345 | | - | |
| 345 | + | |
346 | 346 | | |
347 | 347 | | |
348 | 348 | | |
| |||
356 | 356 | | |
357 | 357 | | |
358 | 358 | | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
359 | 373 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
| |||
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
28 | 42 | | |
29 | 43 | | |
30 | 44 | | |
31 | 45 | | |
32 | | - | |
| 46 | + | |
33 | 47 | | |
34 | | - | |
| 48 | + | |
35 | 49 | | |
36 | 50 | | |
37 | 51 | | |
| |||
60 | 74 | | |
61 | 75 | | |
62 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
63 | 81 | | |
64 | 82 | | |
65 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
66 | 88 | | |
67 | 89 | | |
68 | 90 | | |
| |||
73 | 95 | | |
74 | 96 | | |
75 | 97 | | |
76 | | - | |
77 | | - | |
78 | | - | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
79 | 101 | | |
80 | | - | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
81 | 105 | | |
82 | 106 | | |
83 | | - | |
| 107 | + | |
84 | 108 | | |
85 | 109 | | |
86 | 110 | | |
87 | 111 | | |
88 | 112 | | |
89 | | - | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
90 | 123 | | |
91 | 124 | | |
92 | 125 | | |
| |||
107 | 140 | | |
108 | 141 | | |
109 | 142 | | |
110 | | - | |
| 143 | + | |
111 | 144 | | |
112 | 145 | | |
113 | 146 | | |
114 | 147 | | |
115 | 148 | | |
116 | 149 | | |
117 | 150 | | |
118 | | - | |
| 151 | + | |
119 | 152 | | |
120 | 153 | | |
121 | 154 | | |
| |||
129 | 162 | | |
130 | 163 | | |
131 | 164 | | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
132 | 206 | | |
133 | 207 | | |
134 | | - | |
135 | | - | |
| 208 | + | |
| 209 | + | |
136 | 210 | | |
137 | | - | |
| 211 | + | |
138 | 212 | | |
139 | 213 | | |
140 | | - | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
141 | 245 | | |
142 | 246 | | |
143 | 247 | | |
| |||
0 commit comments