-
- Notifications
You must be signed in to change notification settings - Fork 74
Closed
Description
Hello if I use trait Nette\StaticClass the extension Search automatically register the class like a service to container.
There are two ways:
-
in trait Nette\StaticClass change visibility of constructor from final public to private. The ReflectionClass::isInstantiable will work fine. I prefer
-
add exception for this trait to Search extension
I know if you have registered static classes, it doesn't matter, because these classes are not in constructors, but this is no reason to register in container.
Example of bad behavior:
namespace Uget; use Nette\StaticClass; final class Tools { use StaticClass; }In Container i see
public function createService017(): Uget\Tools { return new Uget\Tools; // throw exception }I must add to ignore
search: exclude: classes: - Uget\ToolsMetadata
Metadata
Assignees
Labels
No labels