generator-phab v1.5.0
PHAB
A Yeoman generator for PHP with the ability to resolve namespaces from a Composer file.

Installation
First make sure you have installed Yeoman. If not, install Yeoman using:
npm install -g yoNext install the generator using:
npm install -g generator-phabUsage
To see a list of all the available generators use the following:
yo phabSpecific generators can also be called directly. E.g.:
yo phab:classGenerators
Available generators are listed below. These will by default ask the least amount of questions; to access advanced options use the --advanced option.
phab:class <class_name>
Creates an empty class.
The following command will create the class
Models\MyModelrelative to the working directory:yo phab:class Models/MyModelphab:interface <interface_name>
Creates an empty interface.
The following command will create the interface
Api\MyInterfacerelative to the working directory:yo phab:interface Api/MyInterfacephab:callable <class_name>
Creates a callable class using the
__invoke()function.The following command will create a callable class
Controller\MyControllerrelative to the working directory:yo phab:callable Controller/MyControllerphab:document <document_name>
Creates an empty document.
The following command will create
document.phprelative to the working directory:yo phab:document
Opening a File
It is possible to open a generated file using the option -o. This requires the environment variable EDITOR to point to the default editor. E.g.:
EDITOR=$(which code) yo phab:document -oComposer Support
If a Composer file is found in any of the parent directories generators will use the autoload configuration from this file to resolve the namespace for the location where the command is called and prepend that to a class or interface.
Default values for author and license will also be read from the Composer file.