Since PHP 8 Attributes are currently not supported (see #73 ) but PHP Parser can handle them, I tried to find a way to add an attribute to a ClassMethod.
Unfortunately, there is no way to get access to the low-level PHP Parser functionality. For my use case the easiest extension point would be to inject my own method generator, but it is a final class. No way to decorate it or exchange with a custom implementation.
Hence my suggestion to use more interfaces in combination with default implementations so that users of the library can inject custom logic if needed.
Since PHP 8 Attributes are currently not supported (see #73 ) but PHP Parser can handle them, I tried to find a way to add an attribute to a ClassMethod.
Unfortunately, there is no way to get access to the low-level PHP Parser functionality. For my use case the easiest extension point would be to inject my own method generator, but it is a final class. No way to decorate it or exchange with a custom implementation.
Hence my suggestion to use more interfaces in combination with default implementations so that users of the library can inject custom logic if needed.