Development Environment

This guide shows some recommended settings of your development environment.

Quick Notes

  • Make sure you are using a Git/Composer HumHub installation
  • Make sure the debug mode is enabled (default), see Enable Production Mode
  • Disable caching under Administration -> Settings -> Advanced -> Caching -> None
  • Use file based mailing Administration -> Settings -> Advanced -> E-Mail

Since HumHub v1.3 makes heavy use of Queues you should configure the Instant or Sync Queue queue in your development environment. Otherwise you'll have to execute the queue/run command manually in order to test Notifications or other queued jobs.

Git/Composer Installation

The following guide describes a git based installation of the HumHub platform. Please note that this is only recommended for developers and testers and should not be used in production environments. For production environments, please follow the Installation Guide for Administrators.

Database Setup

Please follow the Database Setup Section of the administration installation guide.

Get HumHub

  • Install git
  • Clone the git repository:
git clone https://github.com/humhub/humhub.git
composer install

Note: You may have to execute the composer update again after a git pull. Read more about updating in the Manual Update Guide

Note: Since HumHub 1.3 you have to build the production assets manually. The production assets are used for example in acceptance tests. Please see the Build Assets Section for more information.

External Modules Directory

Custom modules can also be located outside of the default HumHub modules directory by adding a path to the moduleAutoloadPaths array parameter in your protected/config/common.php configuration. This separation can be useful while developing custom modules.

return [
    'params' => [
        'moduleAutoloadPaths' => ['/some/folder/modules'],        
    ],
]

Yii Debug Module

You may want to enable the Yii Debug Module for detailed request and query debugging.

Just add the following block to your local web configuration protected/config/web.php:

return [
    // ...
    'bootstrap' => ['debug'],
	'modules' => [
	    // ...
	    'debug' => [
	        'class' => 'yii\debug\Module',
	        'allowedIPs' => ['127.0.0.1', '::1'],
	    ],
            // ...
	]
];

Developer Tools Module

The devtools Module provides some useful showcases of widgets and a module generator based on Gii.