Ausgefallen gut ins Netz!

Hinter dem Namen Wicked Software stehen ausgefallen gute und begeisterte Entwickler, für die Software wesentlich mehr ist als funktionierender Code. Wicked Software hat sich auf Joomla! spezialisiert und bietet moderne und flexible Erweiterungen.

Wir schreiben in unseren Blog mit und über Joomla!, unsere Software, Tricks & Tipps und alles was uns in den Sinn kommt und uns nützlich erscheint.

  • joomla-v4
  • developer
  • installation

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.

But now a switch has been turned and the development of Joomla has been raised to a new level. Starting with version 4, the package consisting of a lot of files, libraries, javascripts, CSS files is built with a package manager . For delivered packages like the nightly builds this is done at release and the users don't notice anything and don't have to do anything. But a developer who works on a fork from Joomla has to use two tools:

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)
  • composer
  • git

Downloading and installing this software depends on the operating system.

For Win10: Download and install software

Node.js

Download: node.js
The result is a .msi file. Double-click it to run it and install node.js (and thus npm).

Git

Download: Git
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.

Composer

Download: composer
Install Composer by double-clicking on the downloaded .exe file.

LDAP

If you work with xampp: Open the file php/php.ini in your xampp directory. Find the line
extension=ldap
If there is a ";" at the beginning of the line, remove it. Save php.ini, stop apache and restart.

Check all installations

Check Software via version check

Check if everything is there:

For Newbies:
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

InGo to your root directory
composer install

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.

npm install

Command:npm install
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.