Joomla Version 4.0 is coming soon. Developers and testers are working around the clock (there is no virtue in it, as they are spread all over the world). But more testers are needed - and especially testers with programming skills. For them there is now something new: composer and npm.
For normal tests, there is a nightly build nightly builds. Anyone can download it, install it and start testing. Anyone can also report found issues and test patches. German only: Die Joomla Bug Chain: Issues melden, Patches testen.
Testers who want to participate in the development pull a fork from Joomla on github, check out the Branch 4.0 and get started. That was the standard until recently.
Composer integrates external libraries into Joomla.
npm is an open source software that manages the vast amount of scss, css, js and other files that buzz around in Joomla.
To make a Joomla fork installable, php, composer, git and npm (included in node.js) must be installed on the local PC.
The Joomla developers have written a tutorial for this: J4.x:Setting_Up_Your_Local_Environment. For volunteer testers who use Win10 and are less familiar with the system stuff, I'll describe how I built the development environment.
I assume that xampp and therefore php is already installed. If not: install xampp
- node.js (contains npm)
Downloading and installing this software depends on the operating system.
For Win10: Download and install software
The result is a .msi file. Double-click it to run it and install node.js (and thus npm).
The result will be a .exe file which will be started as usual. Select the default options so that Git is installed on C://Programs/Git.
Install Composer by double-clicking on the downloaded .exe file.
If you work with xampp: Open the file php/php.ini in your xampp directory.
Find the line
If there is a ";" at the beginning of the line, remove it. Save php.ini, stop apache and restart.
Check all installations
Check if everything is there:
We need the command prompt: Click on Windows Search in the lower left corner and type "cmd" - open the command prompt. To see if everything is installed you can query the version of the software. When the version number is displayed, the software is present. Note the upper and lower case! (-v oder -V)
On this screen the version numbers of my first installation are shown. If you install now you can already have newer numbers.
Prepare the Joomla! Installation
Go to the root directory of your installation.
For newbies: First enter the drive letter, followed by a colon (for me D:). Then enter cd (change directory) and target path. My repo is located in xampp/htdocs/joomla-fork
Command: composer install
Composer will now fetch all external libraries if necessary. If composer has been run before and nothing has changed in the package, like here, a corresponding message appears. The first run takes a while - there are many elements to merge.
Composer is a one-time affair. Normally you don't need to repeat this once the application is installed. In general, you can ignore yellow warnings.
After that we let npm finish the complete package.
This also takes a while.
Now everything is ready and Joomla can be installed as usual.
But - you always have to keep in mind: Every change to namespaces, js or scss requires a new run of npm. Every change to libraries requires a new run of composer. Also every time you test a patch that contains such changes, you have to run npm. And after resetting the patch, of course. When testing, it is best to leave the prompt window open.
Where we used to say, "You got a problem? Have you tried restarting?"
We now say "Something's wrong? Have you tried composer & npm?"
The Joomla developers have also provided some scripts for npm. I will not list them here, they are described in the Joomla documentation.
Just one thing: If you are sure that only css has changed, you can speed things up considerably with the command npm run build:css , because only the css files are regenerated.