nette / php-generator

🐘 Generates neat PHP code for you. Supports new PHP 8.3 features.
https://doc.nette.org/php-generator
Other
2.11k stars 138 forks source link

How to use ->setType('OtherClass') within the same namespace #64

Closed accgit closed 4 years ago

accgit commented 4 years ago

Version: 3.4.0

Bug Description

The class then with a backslash reports that the class was not found if you have the same namespace.

Steps To Reproduce

Generates this: public \OtherClass $class

Expected Behavior

But in the same namespace I need this: public OtherClass $class;

JanTvrdik commented 4 years ago

Call setType with fully qualified name.

accgit commented 4 years ago

@JanTvrdik thank you very much!