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

fix: prevent generating "namespace ;" for classes without declared namespace #490

Closed daniel-sc closed 8 months ago

daniel-sc commented 1 year ago

This fixes a bug when trying to work with classes that have no namespace declared - see updated unit test.

Note that the error comes as an rather unspecific

ParseError: syntax error, unexpected ';', expecting '{'

As the generated code includes namespace ;!

It would be very nice if this could be released as a bugfix soon :)

daniel-sc commented 1 year ago

@lisachenko Could you look into this PR? I'd be happy to address any issues!

scrutinizer-notifier commented 1 year ago

A new inspection was created.

lisachenko commented 8 months ago

Thanks! Finally, merged ⏳