Contribute

Since phpMyFAQ is an Open Source project we encourage developers to contribute patches and code for us to include in the main package of phpMyFAQ. However, there are a few rules and limitations when doing so and this page lists them.

  1. Contributed code will be licensed under the MPL 2.0 license.
  2. Copyright notices will be changed to phpMyFAQ Team. But contributors will get credit for their work!
  3. All third party code will be reviewed, tested and possible modified before being released.

These basic rules makes it possible for us to earn a living of the phpMyFAQ project but it also ensures that the code remains Open Source and under the MPL 2.0 license. All contributions will be added to the changelog and on the phpMyFAQ website.

How to contribute?

Contributing to phpMyFAQ is quite easy - just fork the project on GitHub, work on your copy and send pull requests.

Setup a phpMyFAQ development environment

Before working on phpMyFAQ, setup an environment with the following software:

Configure your Git installation

Set up your user information with your real name and a working e-mail address:

$ git config --global user.name "Your Name"
$ git config --global user.email you@example.com
$ git config core.autocrlf # if you're on Windows

How to get the phpMyFAQ source code?

Clone your forked phpMyFAQ repository locally:

$ git clone git@github.com:USERNAME/phpMyFAQ.git

Add the upstream repository as remote:

$ cd phpMyFAQ
$ git remote add upstream git://github.com/thorsten/phpMyFAQ.git

Please check our coding standards before sending patches or pull requests.

Run Docker Compose

The Dockerfile provided in the phpMyFAQ repository only builds an environment to run any release it's for development purpose. It does not contain any code as the phpmyfaq folder is meant to be mount as the /var/www/html folder in the container.

For development purposes you can start a full stack to run your current PhpMyFAQ source code from your local repository.

$ docker-compose up

The command above starts 5 containers as following.

Specific images started once to prepare the project:

  • composer: update composer dependencies
  • yarn: update yarn dependencies

Running using named volumes:

  • mariadb: image with xtrabackup support
  • elasticsearch: Open Source Software image (it means it does not have XPack installed)
  • phpmyadmin: a PHP tool to have a look on your database.

Running apache web server with PHP 8.2 support:

  • phpmyfaq: mounts the phpmyfaq folder in place of /var/www/html.

Then services will be available at following addresses:

  • phpMyFAQ: (http://localhost:8080)
  • phpMyAdmin: (http://localhost:8000)

Fetch 3rd party libraries and install phpMyFAQ

After cloning your forked repository, you have to fetch the 3rd party libraries used in phpMyFAQ:

$ cd phpMyFAQ
$ curl -s https://getcomposer.org/installer | php
$ php composer.phar install
$ yarn install
$ yarn build

Then just start a normal, local phpMyFAQ installation.

If you changed some JavaScript code, you have to merge the .js files into one with the following yarn task:

$ yarn build

Rebase your Patch

Before submitting your patch, please update your local branch:

$ git checkout 3.2
$ git fetch upstream
$ git merge upstream/3.2
$ git checkout YOUR_BRANCH_NAME
$ git rebase 3.2

Make a Pull Request

You can now make a pull request on the phpMyFAQ Github repository.

Branches

  • Maintenance 3.2 is the stable branch for bugfixes
  • Development main is the development branch for the next version based on 4.0
  • Unsupported 2.0, 2.5, 2.6, 2.7, 2.8, 2.9, 3.0, and 3.1 are old, unsupported branches

Contributors

Here's a list of contributors to phpMyFAQ since we host our repository on Github.