Getting Started#

The following page aids you in setting up one of many different development options. Of course, as with any other project, you can develop in any text editor or IDE of your choice. The following will only show you how to get the Znuny specific tools for development. This will not discuss setting up a LAMP stack, or installing all necessary requirements for running the instance.

Developer Environment#

- jump top -

To facilitate contributing to the project you will need requires a development environment and a fork of the project to develop against. For package builders, you may just clone the framework from the Znuny GitHub.

Pre-requisites#

  • A functioning Znuny installation

  • A Git client

  • A Git repository

If you haven’t yet, you should first set up Git. Don’t forget to set up authentication to GitHub.com from Git as well.

Znuny is available on GitHub along with all additional public modules. Currently we recommend Sublime for your IDE, as we use this internally and offer a package with an array of tools to make your coding experience faster and more convenient. Znuny4OTRS-Sublime

Clone Your Repository#

- jump top -

If you are not familiar with GitHub, forking is as easy as a click of your mouse. You can even use the web-based IDE for smaller changes. For larger changes, Add a source directory to your workstation or server to store the source code. Then, switch to the new directory using the command line and check them out by using the following command:

Important

Please replace git@github.com:znuny/Znuny.git with your own repository. If you complete the commands as below, you will just have a copy of the source code and will not be able to push branches or make pull requests based upon this clone. For more information about forking and working with GitHub see the section Quick Start in the GitHub documentation.

# for git dev
shell> git clone git@github.com:znuny/Znuny.git -b dev
# for a specific branch like Znuny 3.3
shell> git clone git@github.com:znuny/Znuny.git -b rel-3_3

Configure Znuny#

- jump top -

Please configure the Znuny system according to the chapter: Installation From Source (Linux, Unix) of the administrator handbook, skipping Step 1: Install .tar.gz

Module Tools Checkout#

- jump top -

Check out module-tools (from GitHub) for your development environment. It contains useful tools for developers.

shell> git clone git@github.com:Znuny/module-tools.git

Extension Development#

- jump top -

Extending Znuny with modules should be done using the module tools.

Separation of the Znuny framework and modules aids developers, especially when working on a cloned repository, by clearly separating module development from framework development. Linking a module facilitates module access to the framework without dirtying the framework tree. A module-tools script takes care of the heavy lifting here, lets look at an example.

Additional Tools Set#

- jump top -

We highly recommend using the following tools to Znuny developers.

ZnunyCodePolicy Fred.

Code Policy (ZnunyCodePolicy)#

- jump top -

ZnunyCodePolicy is a code quality checker. It enforces good coding practices. These practices are required by our code and merge and pull requests which fail will be rejected. Therefore, to make a contribution, this tool is required and not an optional part of any development environment.

You can use it as a standalone test script or even register it as a git commit hook. Please see the module documentation for details.

Fred#

- jump top -

Fred, be it installed or linked (as described below) into your development system, features several helpful optional modules.

Two Examlpe Features:

SQL Logger

Displays all SQL statements in the front-end.

STDERR console

Displays all STDERR messages in the front-end.

More details are documented in the module documentation.

Note

Call to Action

We make all of our tools open source; feel free to improve, fix, and expand theese tools as well.