fisharebest / webtrees

Online genealogy
https://webtrees.net
GNU General Public License v3.0
474 stars 301 forks source link

How to contribute? #1794

Closed Art4 closed 5 years ago

Art4 commented 6 years ago

I would like to contribute to webtrees to help this project moving forward. Unfortunly I have trouble to find a starting point.

I've read the Development Guidelines and the README. I've also read the discussion in #345, but there are many things unclear to me.

To make it easier for developers I would like to create a CONTRIBUTING.md file as a starting point where the main questions I have are answered:

1) How to setup the Environment? What is required? 2) How to running the tests? 3) Which Coding Standards or other Conventions should I follow? 4) How to submit a patch? Which branch should I use? 5) Is there a roadmap?

fisharebest commented 6 years ago

Sorry for taking so long to reply.

How to setup the Environment? What is required?

Same as any live server - MySQL and PHP.

On a Mac, I use Laravel Valet which is built on top of homebrew.

On Linux, I just use apt-get install nginx mysql php-fpm ...... and configure the server manually.

I have not used Windows for years, but I believe that XAMPP works well.

How to running the tests?

You need composer. Run composer install to install the dev tools, and then run vendor/bin/phpunit to run the test scripts.

There are a few custom commands in composer. For example, to compile the .PO files into .MO files. Run composer list and look for commands beginning with webtrees.

Which Coding Standards or other Conventions should I follow?

PSR-12

How to submit a patch? Which branch should I use?

For webtrees 2.0, use the master branch. For webtrees 1.7, use the 1.7 branch. Ignore the develop branch. This is mostly used for submitting code to the various analysis services (scrutinizer, insight, travis-ci, coveralls, etc.).

Is there a roadmap?

There are lots of things I want to do, but the priority is to create a new system for themes and modules.

Art4 commented 5 years ago

This is a first preview for the CONTIBUTING.md. I think it would be best having two different files in each branch (master and 1.7).

How to contribute

Thanks for taking the time to contribute!

The following is a set of guidelines for contributing to Webtrees. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.

How to submit a patch or feature

If you want to submit a patch or feature, please create a pull request on Github. There are different branches for different versions of webtrees:

Before submitting a pull request make sure you have tested the code and followed the coding conventions.

Please read more about setting up your environment for development.

How to start

You can start contributing by

How to setup the environment

You need

  1. Fork and clone the repository
  2. Run php -S localhost:8080 and open your browser at localhost:8080
  3. Go through the install process

How to test

Install PHPUnit by running composer install

Then run the tests with vendor/bin/phpunit

Coding conventions

Your code should follow the PSR-12 Extended coding style guide.

fisharebest commented 5 years ago

We also need instructions on using npm to build the CSS and JS files.

fisharebest commented 5 years ago

Contributing to translations

Art4 commented 5 years ago

Thank you 👍