Skip to content

Pass NS explicitly in ClassDecorator

Method \Nette\PhpGenerator\ClassType::getNamespace is soft-deprecated because the same ClassType can be used to produce identical classes in different namespaces. Currently implementations of ClassDecorator are forced to fetch the namespace from the ClassType instance using this deprecated method. I think we should update the ClassDecorator interface to pass the namespace explicitly.

This will also allow us to get rid of \Grifart\ClassScaffolder\Decorators\DecoratorTools::extractNamespace.

cc @jkuchar1

Edited by Jiří Pudil
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information