erichard/SublimePHPCompanion — pull request #24 by ronanchilvers (2014-09-03 12:42:43+00:00)
Title: Namespace prefixes and project settings

Hi there

Thanks for the great extension!! This is a simple patch to:

* Allow the use of per-project settings
* Allow a namespace prefix when adding namespace declarations

I have a project with a PSR4 library that doesn't have the full namespace in its file path so adding a namespace prefix is extremely handy. You use it by editing your project file and adding something this:

"phpcompanion": {
"namespace_prefix": "VendorName\Project\Foo\Bar"
}

The resulting namespace for a file with the path src/One/Two.php would be

namespace VendorName\Project\Foo\Bar\One\Two;

Project settings also have the nice side effect of being able to override any of the settings per project - I'm already using this it exclude_dir for example.

Hope this adds something useful to a great Sublime plugin. Thanks for all the work!

Cheers

Ronan