Index
> Installation ..................................................................... > Contributing ..................................................................... > Documentation ....................................................................
Installation
composer require chiiya/tmdb-api-php
Contributing
Contributions are welcome. To set up the project, run just setup
.
About just
Just is a command runner similar to make
with some advantages
and better cross-platform support. It should be installed both in Homestead and on your local system.
You can list all available commands in a project using just --list
.
Installation Ubuntu / WSL / Homestead:
curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | sudo bash -s -- --to /usr/local/bin
sudo chown $USER:$USER /usr/local/bin/just
Installation Windows (Git Bash):
# Download latest release from https://github.com/casey/just/releases
# Extract and copy just.exe to C:\Program Files\Git\mingw64\bin
# You can now use `just` from Git Bash
Installation Mac:
brew install just
Linting
To lint (and fix) your PHP code, run the following command:
just lint
Make sure your code passes before pushing, since otherwise the build will fail and your pull request won't be merged.
Pre-Commit
Since linting the files manually before each commit is cumbersome, a
pre-commit
configuration is available to run PHP CS Fixer before each commit.
If you have used pre-commit
before, then all you need to do is run
pre-commit install
once after cloning the project, and you're set. Otherwise,
install pre-commit
.
Workflow
git add .
git commit -m "Commit message"
# If fixes are done, stage and commit again:
git add -u && !!
Tests
Run the tests with just test
. This will run all unit tests. A code coverage
report can be generated with just coverage
. This will take significantly
longer than just running the tests normally.
Quality Assurance
A list of QA criteria has been defined for this project. When contributing, try to keep these goals in mind.
🟢 QA Criteria
- Linting Configuration
- Code Quality Configuration (Psalm)
- Pre-Commit Configuration
- CI Configuration: [Build, Lint, Test, Quality]
- JUSTFILE
- Documentation
- > 95% Test Coverage
Documentation
The documentation for this package can be found here.