sublime-php-namespace icon indicating copy to clipboard operation
sublime-php-namespace copied to clipboard

Add psr-4 detection when building a namespace

Open jeremyworboys opened this issue 11 years ago • 12 comments

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.

jeremyworboys avatar Feb 25 '14 11:02 jeremyworboys

Hey @gl3n, is it possible to add this feature to the plugin ?

armandabric avatar Apr 25 '14 08:04 armandabric

Hi guys, I will work on this request next week.

gl3n avatar Apr 25 '14 09:04 gl3n

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 avatar Apr 25 '14 12:04 jum4

@jum4 I think integrating psr-4 detection in SublimePhpNamespace makes sense, but it should be a configuration option.

gl3n avatar May 05 '14 20:05 gl3n

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.

armandabric avatar May 12 '14 07:05 armandabric

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.

jum4 avatar May 12 '14 07:05 jum4

Ho! I've forget this file. Yes merge these two sources of config is a good idea.

armandabric avatar May 12 '14 08:05 armandabric

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

jum4 avatar May 12 '14 10:05 jum4

I know this is old, but it would be nice to have :)

arturolinares avatar Jul 19 '17 23:07 arturolinares

Yeah, This is one of my top packages whenever I install sublime, I hope this gets merged.

kapitanluffy avatar Oct 11 '17 09:10 kapitanluffy

Any update? This would be very cool.

Tom32i avatar Jan 28 '21 12:01 Tom32i

Project seems to be abandoned 😞

kapitanluffy avatar Jan 29 '21 01:01 kapitanluffy