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.6: PHP ≥ 5.4.0; XH 1.7: PHP ≥ 5.6
  • 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.


  • install PHP and the webserver
  • install Xdebug, and add xdebug.max_nesting_level = 200 to your php.ini
  • 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

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 PEAR coding standard violations.

phing mess

Checks for unused variables. 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.

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.6.8 is to be released, we'll execute the following:

phing -Dversion=1.6.8 build
phing -Dversion=1.6.8 build-patch
phing -Dversion=1.6.8 build-patch
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