Hey there! It's great you want to help out! This tool is built on Laravel Zero, so it would be best to start with their documentation.
In order to contribute to this project you must have the following installed:
- php version ^7.3 (7.4 recommended)
- The php-intl extension enabled with
extension=intl.so phar.readonly=0set in your php.ini- PCOV: for calculating test coverage.
- If you have a pre
soclone of SquareOne, copy your existing SSL certificates fromdev/docker/global/certsfolder to the~/.config/squareone/global/certsfolder. - Stop all your existing containers
docker stop $(docker ps -aq). git clone https://github.com/moderntribe/square1-global-docker.- Run
composer installin the cloned folder. - Back up your
~/mysql_datafolder in the event of any data loss. - Back up your
~/.config/squareonefolder. - Run
bash -c "(export SO_DEV=true; ./install/install.sh)"from the root of the project. - type
sodevin your terminal.
When not packaged as a phar, there are some additional commands available to you to aide in development:
| Command | Description |
|---|---|
| sodev app:build | Ignore this and use composer build to build a phar. |
| sodev app:create-migration | Creates a migration class that you can then customize. |
| sodev app:install | Install Laravel Zero add-ons. |
| sodev app:rename | Renames the application. You shouldn't use this. |
| sodev app:test | Runs automated tests. |
- In the project folder, run
./so app:testto run all Feature and Unit tests. - Run
composer coverage-htmlto create thecoveragefolder in the root of the project that can be opened in a browser, so you can see which code is missing tests. - Run
composer badgeto generate a new svg badge to display code coverage % in the main README.md when your feature is complete.
- Update the version in the app.php file.
- Run
composer buildto package a phar to the builds directory, commit any changes made to the autocompletion files and push those up. - Create a new release on GitHub and the Release Phar GitHub action will automatically build the phar and attach it to the release.
All configuration for this project is stored in ~/.config/squareone.
There are a few options to override the configuration options.
- Run
so config:copywhich will save the latest config file to~/.config/squareone/squareone.yml - Placing a
squareone.ymlfile in the root of your local SquareOne project will override all other configuration options.
Run so config:copy-compose to save the latest docker-compose.yml to ~/.config/squareone/global/docker-compose.override.yml for customization.
Note: The original docker-compose.yml will always load first, only change what you need in the override and delete the rest, so you continue to get important updates.