Thank you for considering contributing to Ultimate Warfare. This document contains some guidelines to explain the contributing process and hopefully answer some common questions.
Do note that almost nothing is set in stone. Feel free to even contribute to this document!
- For code contributions, make sure you have a GitHub account
- Make sure you read, understand and agree to the Code of Conduct
Collaboration and contributing will be primarily done through GitHub.
War game, economy, world map, strategy, free and fun!
The source code of Ultimate Warfare is playable on this beta server. Enjoy the game and please report all issues/suggestions in the issue tracker.
You can report bugs to the issue tracker.
Please search the issue tracker first if the particular bug already has an open issue. If it does, add your message to the existing issue instead of opening a new issue.
If a closed or resolved issue exists for your particular bug, reopen it. If in doubt, just open a new issue.
First, make sure the changes you're going to do adhere to the vision of UltimateWarfare.
Fork the repository on GitHub, make a new branch off develop and start from there. Separate features isolated from each other should go in their own branch. Branch names should preferably adhere to the Git Flow workflow using a feature/FeatureName
or hotfix/HotfixName
notation.
When making changes, add or modify relevant tests with your changes if it involves game mechanic-related code.
Once you're satisfied with your modifications, send me a pull request. I will review it, edit it as needed and merge it with the develop branch.
- You have PHP 8.0 or higher installed and in your path.
- You have Composer installed and in your path.
- You have a basic understanding of the Symfony framework.
Ultimate Warfare is built on the Symfony framework, using modern PHP as language and twig as templating language.
I'm developing Ultimate Warfare in PhpStorm myself, but you're of course free to use whatever you see fit.
$ git pull https://github.com/FrankProjects/UltimateWarfare.git UltimateWarfare
$ cd UltimateWarfare
# Composer stuff
$ composer self-update
$ composer install --prefer-source
$ bin/console doctrine:database:create
$ bin/console doctrine:schema:create
$ bin/console doctrine:migrations:migrate
UltimateWarfare/
├─ assets/
├─ bin/
│ └─ console
├─ config/
├─ public/
│ └─ index.php
├─ src/
│ ├─ Kernel.php
│ ├─ Command/
│ ├─ Controller/
│ ├─ DataFixtures/
│ ├─ Entity/
│ ├─ EventSubscriber/
│ ├─ Form/
│ ├─ Repository/
│ ├─ Security/
│ └─ Twig/
├─ templates/
├─ tests/
├─ translations/
├─ var/
│ ├─ cache/
│ ├─ log/
│ └─ ...
├─ vendor/
└─ .env
You can run tests with:
$ vendor/bin/phpunit
There are two test suites, named as follows:
- Feature Tests
- Unit Tests
Feature tests can be seen as user stories if you're familiar with Agile.
Unit test classes are tests that generally correspond to a single source class to test the implementation of the business logic. Unit tests methods should correspond to a matching source class method under test using a testNameOfMethodUnderTest
naming convention.
Consult PHPUnit's manual for running specific test suites or individual files.
For updating your local development environment, do a git pull
, optionally followed by a composer install
, depending on which files have changed.
PHP code should be in PSR12-style.
Please add relevant unit tests or feature tests if possible.