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.
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.
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.
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.
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.
Note: I have updated the docs with an explanation of how to build the ImageMagick extension for PHP 8 manually, as the
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.
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 macOSNote: I have updated the docs with an explanation of how to build the ImageMagick extension for PHP 8 manually, as the
pecl install imagick
command still doesn't work for PHP 8 - KierUbuntu / 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 timeWindows - super-easy setup
Install Apache, MySQL, PHP and Xdebug in just a few minutesVisual Studio Code - setup for PHP and Xdebug
Read the guide in the dev docs
Last edited by a moderator: