-
-
Notifications
You must be signed in to change notification settings - Fork 438
Closed
Labels
Description
maker-bundle/src/Generator.php
Line 137 in 0f060e9
| * $gen->createClassNameDetails('Cool\\Stuff\\Balloon', 'Controller', 'Controller'); |
In current implementation name either needs to be absolute, or to make it work generator code needs to change.
E.g. change line 150
maker-bundle/src/Generator.php
Line 150 in 0f060e9
| $className = rtrim($fullNamespacePrefix, '\\').'\\'.Str::asClassName($name, $suffix); |
to:
try {
Validator::classDoesNotExist($name);
$className = rtrim($fullNamespacePrefix, '\\').'\\'.Str::asClassName($name, $suffix);
} catch (RuntimeCommandException $e) {
$className = $name;
}
This would have edge case if there is match with class even if $name value is only partial. But that should be very rare.
Like Prototype\\DummyEntity may exist and we really want "App\Entity\Prototype\DummyEntity".