-
-
Notifications
You must be signed in to change notification settings - Fork 60
Description
Hello Coen! First of all, great work and thanks for making this tool. Helped me a lot, super easy to use!
I learned something when implementing it in my project. Not sure if I should call it a bug, but I wanted to share it with you regardless. When namespaces are specified in strings then it seems like Mozart is only able to prefix namespaces where the backslash is not escaped. See the example below.
Before namespace prefixing:
$baseNamespace = "\Example\Sdk\Endpoints";
$baseNamespace = "Example\\Sdk\\Endpoints";
$baseNamespace = "Example\Sdk\Endpoints";
$baseNamespace = '\\Example\\Sdk\\Endpoints';
$baseNamespace = '\Example\Sdk\Endpoints';
$baseNamespace = 'Example\\Sdk\\Endpoints';
$baseNamespace = 'Example\Sdk\Endpoints';
After namespace prefixing:
$baseNamespace = "\My\Dependencies\Example\Sdk\Endpoints";
$baseNamespace = "Example\\Sdk\\Endpoints";
baseNamespace = "My\Dependencies\Example\Sdk\Endpoints";
$baseNamespace = '\\Example\\Sdk\\Endpoints';
$baseNamespace = '\My\Dependencies\Example\Sdk\Endpoints';
$baseNamespace = 'Example\\Sdk\\Endpoints';
$baseNamespace = 'My\Dependencies\Example\Sdk\Endpoints';
Initially I thought this was related to the use of single- or double-quotes, but it only seems to be an issue when using escaped backslashes in the namespace string. Probably not the biggest issue, but it would probably be nice to also support escaped backslashes IMO.
Kind regards,
Robert Sæther