You are here: start » development_environment

Development Environment

Setting up a development environment for CMSimple_XH 1.6 and up is rather simple: a webserver with PHP support and the CMSimple_XH sources are already sufficient for your private development. Of course you'll need your favorite editor/IDE as well.

If you want to participate in the general development of CMSimple_XH, you'll also need a Git client.

FIXME info regarding profiling


  • XH 1.7 and up: PHP ≥ 5.6 (including phpdbg)
  • a supported webserver
  • a Git client1)

To be able to use the CMSimple_XH build system (recommended), you'll need the following as well:

All other development dependencies will be installed via Composer.

Optional: Phan which requires PHP 7.1 and the php-ast extension.


  • install PHP and the webserver
  • PHP 5: install runkit, and add runkit.internal_override = 1 to your php.ini; PHP 7: install uopz
  • XH 1.6: install phpDocumentor 1; XH 1.7: install Doxygen
  • install Node.js
  • install JSDoc 3
  • install composer
  • clone the CMSimple_XH repo from Github
  • run composer install in the root folder of your cloned repo
  • add vendor/bin to your PATH (in Win: “.\vendor\bin”)

Phing targets

The CMSimple_XH build system is powered by Phing, and offers several targets which are described in the following. A brief help regarding the the available targets can be seen by executing phing without parameter.

In a recent version of Phing the default logger has changed to phing.listener.AnsiColorLogger, what will result in strange output in terminals which are not able to handle ANSI escape codes. You have to explicitly use phing.listener.DefaultLogger in this case, or on Windows you can use Ansicon as replacement for cmd.exe.

Static code analysis

phing sniff

Checks the core and the internal plugins (filebrowser, meta_tags and page_params) for coding standard violations.

phing mess

Checks for unused code. Only available in master, but not in release branches before 1.6.

phing compat

Checks the core and the standard plugins for compatibility with different PHP versions.

phing phan

Runs a general static code analysis. This target requires the command `phan` to be available in the path.

Test suites

phing unit-tests

Runs the unit test suite. Currently, that requires a “correct” configuration, especially language_default has to be set to “en”.

phing attack-tests

Runs the attack test suite. This requires the environment variable CMSIMPLEDIR to be set to the URL path of the development installation. For instance, if the URL is http://localhost/xh/, you have to set CMSIMPLEDIR to /xh/ (note the leading and trailing slashes).

phing validation-tests

Runs the validation test suite. CMSIMPLEDIR has to be set appropriately (see above). Note that this test suite uses the W3C validator, so sometimes the tests may fail due to unavailability of this service.

phing all-tests

Shortcut for running all three test suites.

Code coverage

phing coverage

Generates a code coverage report based on the unit test suite. The report is located in tests/unit/coverage/.


phing php-doc

Generates the PHP documentation from the sources and the tutorials in tutorials/. The documentation will be located in doc/php/.

phing js-doc

Generates the JS documentation from the sources. It will be located in doc/js/.

phing doc

A shortcut to generate the PHP and the JS documentation.


phing -Dversion=<version> build

Creates the full installation package as ZIP archive in the root folder, ready for release.

phing -Dversion=<version> -Dpatchee=<filename> build-patch

Creates an update package as ZIP archive in the root folder, ready for release. <filemame> is supposed to be the filename of the full installation package of the version the patch is to be build against.

So if CMSimple_XH 1.7.3 is to be released, we'll execute the following:

phing -Dversion="1.7.3" build
phing -Dversion="1.7.3" -Dpatchee="" build-patch
mv "" ""
phing -Dversion="1.7.3" -Dpatchee="" build-patch
mv "" ""
The generated ZIP archives may not be suitable for distribution because unzipping might result in too lax filesystem permissions. Therefore the ZIP may have to be re-zipped with an appropriate tool.


If you have any problems or find issues setting up the development environment or executing the Phing targets, you can contact other developers in the Open Development section of the CMSimple_XH Forum. Especially have a look at the how I ride the bullet - how I set up a testing environment thread.

on Windows TortoiseGit is recommendable
You are here: start » development_environment
Except where otherwise noted, content on this wiki is licensed under the following license: GNU Free Documentation License 1.3
Valid XHTML 1.0 Valid CSS Driven by DokuWiki