# Contributing to MokoStandards-Template-Joomla-Module Thank you for your interest in contributing to this project! This document provides guidelines and instructions for contributing. ## Table of Contents - [Code of Conduct](#code-of-conduct) - [Getting Started](#getting-started) - [Development Process](#development-process) - [Coding Standards](#coding-standards) - [Commit Guidelines](#commit-guidelines) - [Pull Request Process](#pull-request-process) - [Reporting Issues](#reporting-issues) - [Questions and Support](#questions-and-support) ## Code of Conduct This project and everyone participating in it is governed by our [Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to hello@mokoconsulting.tech. ## Getting Started ### Prerequisites Before contributing, ensure you have: - PHP 7.4 or higher installed - Composer installed (for dependency management) - PHP CodeSniffer installed (`composer global require squizlabs/php_codesniffer`) - A working Joomla installation for testing - Git installed and configured ### Setting Up Your Development Environment 1. **Fork the repository** on GitHub 2. **Clone your fork**: ```bash git clone https://github.com/your-username/MokoStandards-Template-Joomla-Module.git cd MokoStandards-Template-Joomla-Module ``` 3. **Add the upstream remote**: ```bash git remote add upstream https://github.com/mokoconsulting-tech/MokoStandards-Template-Joomla-Module.git ``` 4. **Configure git commit template**: ```bash git config commit.template .gitmessage ``` 5. **Install development dependencies**: ```bash composer install ``` ## Development Process ### Branching Strategy - `main` - Stable, production-ready code - `feat/*` - New features - `fix/*` - Bug fixes - `docs/*` - Documentation updates - `refactor/*` - Code refactoring - `chore/*` - Maintenance tasks ### Workflow 1. **Create a branch** from `main`: ```bash git checkout main git pull upstream main git checkout -b feat/your-feature-name ``` 2. **Make your changes** following our coding standards 3. **Test your changes**: ```bash make validate # Run linters and code standards checks make build # Build the module package ``` 4. **Commit your changes** using conventional commits (see below) 5. **Push to your fork**: ```bash git push origin feat/your-feature-name ``` 6. **Open a Pull Request** from your branch to `main` ## Coding Standards ### PHP Standards - Follow [Joomla Coding Standards](https://developer.joomla.org/coding-standards.html) - Use tabs for indentation (width: 2 spaces) - Use UTF-8 encoding without BOM - Use LF (Unix) line endings - Include proper DocBlocks for classes, methods, and properties - Use type hints where applicable ### File Headers All PHP files should include the following header: ```php ():