Currently @internal annotations on non-namespaced/global namespace functions have no use at all.
Instead methods and properties should be set internal to that class (EDIT: I see this is already implemented for properties)
For classes and functions the behavior should invert to allow them ONLY in global namespace (since we can obviously not restrict them to anything else, since otherwise the class would be restricted to itself, which makes no sense) - these non-namespaced internals generally happen on legacy code and reverting the behavior ensures these won't be used in any "new" code that uses namespaces.
https://psalm.dev/r/6907cff962https://psalm.dev/r/bdc6c78d1a
Currently @internal annotations on non-namespaced/global namespace functions have no use at all.
Instead methods and properties should be set internal to that class (EDIT: I see this is already implemented for properties)
For classes and functions the behavior should invert to allow them ONLY in global namespace (since we can obviously not restrict them to anything else, since otherwise the class would be restricted to itself, which makes no sense) - these non-namespaced internals generally happen on legacy code and reverting the behavior ensures these won't be used in any "new" code that uses namespaces. https://psalm.dev/r/6907cff962 https://psalm.dev/r/bdc6c78d1a