goaop / framework

:gem: Go! AOP PHP - modern aspect-oriented framework for the new level of software development
go.aopphp.com
MIT License
1.66k stars 163 forks source link

Add PHP 8.0+ Union and Intersection type support on SelfValueVisitor #504

Closed samsonasik closed 4 months ago

samsonasik commented 4 months ago

Closes https://github.com/goaop/framework/pull/503

samsonasik commented 4 months ago

@lisachenko could you review this? Thank you.

lisachenko commented 4 months ago

PS. The more I look on the SelfValueVisitor/SelfValueTransformer classes - the more I think that they do very strange and incorrect job, which I would like to completely rewrite to enable pretty-printing and to switch to AST-only transformation.

FYI: I'm now in the process of slow refactoring of entire AST/transformation subsystem, so expect significant changes in this part soon )

Could you please check if current PR works with the latest master branch or not (try to rebase and check locally please)? I've some bad feeling that there is a regression issue from my recent refactoring of goaop/parser-reflection that renders 'self' now with '\self' (

samsonasik commented 4 months ago

Using dev-master seems working ok

Screenshot 2024-05-06 at 05 41 33

samsonasik commented 4 months ago

@lisachenko Ready to merge 👍

samsonasik commented 4 months ago

@lisachenko Ready to merge 👍

samsonasik commented 4 months ago

Also handled self usage in anonymous class

samsonasik commented 4 months ago

@lisachenko Ready to merge 👍

lisachenko commented 4 months ago

Squashed and merged into the main branch. Thanks!