Developer IDE and server software setup guides

Here at XenForo, we like to keep our development environments up-to-date and as useful as possible, and from time to time we include some of our findings in our online documentation.

macos-debugging.jpg


Recently, we've published an easy setup guide for a Windows-based development environment and now we've added both a guide for building a very flexible macOS-based system and instructions for setting-up a similar multi-PHP deployment in Linux.

Multiple, simultaneous PHP versions​


The macOS and Linux installation guides bring the ability to simultaneously run multiple versions of PHP with Xdebug without having to switch the active version.

This can be invaluable for developers who want to build new code with PHP 8, but also want to maintain add-ons written for legacy software like XenForo 1.5.

macos-php-versions.png


Step debugging with Xdebug​


Furthermore, we've provided setup instructions to get step debugging working with Visual Studio Code and Xdebug. If you're not already using Xdebug as part of your PHP development system, it's time to start!

While the guides describe step-debugging in VS Code, the principles can be applied to PhpStorm or any other step-debug-capable IDE.

Video guides​


Both the Windows and macOS guides can be found in the XenForo 2 Dev Docs, and have accompanying videos to help you through the setup process.

macOS - multiple simultaneous PHP versions

How to install Apache, MariaDB, ElasticSearch, MailHog, ImageMagick and three versions of PHP to run simultaneously under macOS


Ubuntu / Debian Linux - PHP 8.0, 7.4 and 5.6 at the same time

Configure Linux with three versions of PHP to run from a single Apache server at the same time


Windows - super-easy setup

Install Apache, MySQL, PHP and Xdebug in just a few minutes


Visual Studio Code - setup for PHP and Xdebug

Read the guide in the dev docs

linux-debugging.jpg
 
Last edited:

pegasus

Well-known member
I agree completely, and PhpStorm is our daily driver here at XF, but as a free option, VS Code is brilliant.
PhpStorm is really nice based on the trials I've done. It catches a lot of errors that Eclipse misses. We've been stuck on Eclipse for a while now. How have you managed / worked around PhpStorm's auto-save "features"?

It really bugs me that it automatically saves everything that's open every few seconds, and without prompting on exit, and that the developers of PhpStorm seem to be against allowing the auto-save to be disabled. In my experience, this kind of "Save all" has led to unintentional overwrites (leading to additional development time rewriting the same code over) and saving of uncompleted file edits (leading to parse errors when I just want to test something else I had open).
 

Forsaken

Well-known member
PhpStorm is really nice based on the trials I've done. It catches a lot of errors that Eclipse misses. We've been stuck on Eclipse for a while now. How have you managed / worked around PhpStorm's auto-save "features"?

It really bugs me that it automatically saves everything that's open every few seconds, and without prompting on exit, and that the developers of PhpStorm seem to be against allowing the auto-save to be disabled. In my experience, this kind of "Save all" has led to unintentional overwrites (leading to additional development time rewriting the same code over) and saving of uncompleted file edits (leading to parse errors when I just want to test something else I had open).
This may be of interest to you: https://gist.github.com/d1i1m1o1n/13845f4f8b0564a58d9753cf28e197b2

Not sure how well it'll work for you, but one of my developers found that when he switched to other Jetbrain products.
 
Top