PHP FilesThe creator and first maintainer of this project is Vsevolod Vietluzhskykh Extension that adds naive IDE-like file creation. !IMPORTANT! For now tested only under *nix and Windows 7. A Story BehindI like using Visual Studio Code. But I was not satisfied with the process of creating PHP files. It always involves at least two steps: creation of the file and creation of the content. Even if you use snippets or templates you have to provide name twice. Even further, if you follow PSR-4 (and nowadays you should try to always follow it) you have to add namespace yourself. FeaturesAutomatic Namespace ResolutionFor now this feature is available to you if you place
I'm going to provide the ability to retrieve namespaces from Files creationFor now you have the following options for creating files from Explorer context menu: New PHP Class
New PHP Interface
New PHP Trait
Extension SettingsThis extension contributes the following settings:
Known IssuesWhen you create new files a bunch of new lines created in the end of it. I will investigate this. As a temporary solution you can set file of the vscode itself to remove them on save settings:
TODO
AcknowledgmentsAll the hardcore PHP AST staff is done by php_writer, which itself uses following great libraries: I cannot thank the creators and contributers of those packages enough! |