What code editor or IDE has code completion or support for Silverstripe?
Most modern IDEs should be able to manage the Silverstripe code and provide code completion, etc. so in many ways it comes down to what you like and what other facilities you want to support in your workflow (eg. native support for things like git, SCSS, composer, etc.)
PHP Storm is a very popular choice, Netbeans works pretty well too. I’m sure there will be plenty of other suggestions from devs on here who will all have their favourites
There’s a template-plugin for PHPStorm, but standard PHP is supported by NetBeans, if you don’t want to spend money on your IDE.
To help your IDE understand SilverStripe syntax (e.g. the private static $db
properties) better, you can install the IDEAnnotator module as a dev dependency with composer
I’m using VSCode. It’s free and has some silverstripe related packages available.
+1 for VSCode. I have these extensions installed currently for SS dev:
- Apache Conf
- Auto Close Tag
- Auto Rename Tag
- Bracket Pair Colorizer
-
change-case
- Select a variable and easily change it between camelCase CONSTANT_CASE kebab-case ‘Sentence case’ etc. I love this one.
-
Code Runner
- Highlight a bit of code and run it in VS Codes terminal. Great for quick tests of your code as you’re writing it.
- Color highlight
- DotENV
- EditorConfig for VSCode
-
GitLens
- This appends git blame info at the end of the currently selected line so you can see who last changed it and why.
- htmltagwrap
- PHP Debug
-
Php DocBlock Generator
- This one is good for creating a new doc block with a keyboard shortcut
-
PHP DocBlocker
- This one is good for editing existing doc blocks
- PHP Intelephense
- phpfmt - PHP formatter
- Rainbow CSV
- SilverStripe
-
Transformer
- Sort lines of text in place.
- Vagrantfile Support
Collectively they provide autocompletion, auto include (use
statements), snippets, definitions, formatting etc.
(Updated March 1 2019)
I find xdebug in vscode quite bad, it’s not as usable as NetBeans
Am using vscode but it always autocompletes template conditional codes with </div>
though
I use atom with a bunch of plugins. Works a charm and I even just worked out how to automagically add namespaces.
+1 for PhpStorm.
Have this plugin: GitHub - raket/idea-silverstripe: IDEA plugin for the SilverStripe framework
Completion is very good.
Am also using VSCode. Have added Ftp-sync to it, but am still looking for better options for synchronising local and remote files. Any recommendations? Ideally it would be a tool which recursively compares directories and files and allows users to run a file-diff/merge when changes are detected on a file…?
I think using VScode is little better
Macrabbit Espresso has a silverstripe extension that supports auto complete for .ss templates which is nice.
For all the VSCode lovers - any one using it on OSX? Any good?
Yes and Yes (it’s very good)
Thats a pretty solid list of extensions. The link to the silverstripe extension seems to be broken so here’s another link
Instead of the PHP IntelliSense plugin you mentioned, I’ve had better luck with PHP Intelephense which also does automatic namespace imports when you autocomplete a class name.
Yeah I actually switched to that a while back too. I’ll update my list!
We are using only git in all projects - team pushes to dev, if ready to publish, sync to master, and then on the server do a pull - works much better than FTP!
Any VS Code users found a way to format .ss files?