Repository navigation
refactor(generation)!: replace nette/php-generator with a php-parser based engine - #2324
Conversation
Benchmark ResultsComparison of Open to see the benchmark results
Generated by phpbench against commit ecc47be |
|
Fixed the CI issue by readding |
|
Looks great. As far as I'm considered, I think we can merge this as a minor despite the breaking change. However, is there a way we can catch it with Rector and do something reasonable with it just in case someone used it on the project/package level? |
Not really, not reliably. In my opinion it's fine to merge as-is. |
Replacing
nette/php-generatorwith our in-house engine.This is breaking, because I removed the
manipulate()method. It ran string edits on the printed code, which then required printing, reparsing and printing again. This is also one of the reasons why we pinned the package version in the first place, since we lost comments, had weird imports, etc. Stub replacements now apply to the source before parsing. If you want to change generated classes, use the proper model methods from now on:setNamespace(),addMethod(),removeClassAttribute()and so on.