sublime-php-namespace
sublime-php-namespace copied to clipboard
Add psr-4 detection when building a namespace
It's been a fair few year since I have used Python (back in the 2.6 days) so my apologies if this is poor quality code.
This fixes #9 that I opened previously.
Hey @gl3n, is it possible to add this feature to the plugin ?
Hi guys, I will work on this request next week.
Hi, Are you sure that using composer.json file is a good idea ? What about projects which not use composer ? We could also set our psr-4 settings in sublime project's file, or allowing both options ?
@jum4 I think integrating psr-4 detection in SublimePhpNamespace makes sense, but it should be a configuration option.
Are you sure that using composer.json file is a good idea ? What about projects which not use composer ? We could also set our psr-4 settings in sublime project's file, or allowing both options ?
Using the JSON file is mandatory for this feature. Using user config is maybe complicated to use with multiple project.
Sublime Text also has one JSON config file per project. In "Project"->"Edit project", I just suggest that we should search in the both file if the 'psr-4' parameter is defined, but we can merge this and add this feature later.
Ho! I've forget this file. Yes merge these two sources of config is a good idea.
Oh, sorry but I just see that this PR broke psr-0 compatibility : there is no treatment if the psr-4 parameter is not set. Moreover, my first test with the example given in https://getcomposer.org/doc/04-schema.md#psr-4 was a failure, I had to replace "src/" by "src" to make it work. I think there is still some work before accepting this PR, I have no time right now but I'll try to fix it ASAP
I know this is old, but it would be nice to have :)
Yeah, This is one of my top packages whenever I install sublime, I hope this gets merged.
Any update? This would be very cool.
Project seems to be abandoned 😞