feat: add automation, linting and improve DX
feat: introduce self-documenting Makefile for package development
This update introduces a self-documenting Makefile as a single entry point for developers working on the package, streamlining the development process and enhancing usability.
feat: add pre-commit with multiple hooks for code quality assurance
Pre-commit has been added to the development workflow to automatically check and fix common issues before commits are made. The included hooks are:
-
trailing-whitespace: Removes trailing whitespace. -
end-of-file-fixer: Ensures files end with a newline. -
check-added-large-files: Prevents large files (>600KB) from being committed. -
fix-encoding-pragma: Adjusts files to have a proper encoding pragma. -
commitizen: Enforces conventional commit messages.
feat: implement commitizen for conventional commits
Commitizen has been integrated to facilitate the use of conventional commits, paving the way for an automated CHANGELOG.md via googleapis/release-please.
chore: reorganize CODE_OF_CONDUCT.md to .github directory
Moving CODE_OF_CONDUCT.md to the .github directory declutters the main folder and aligns with GitHub's best practices for repository organization.
feat: streamline environment setup with .env example and Makefile
Added .env.example and integrated .env building through Makefile, leveraging Docker to expedite environment setup for developers.
feat: add .yamllint.yaml for YAML file linting
Introduced a .yamllint.yaml configuration file to lint YAML files, enhancing code quality and consistency.
feat: replace StyleCI with local wayofdev/cs-fixer-config for PHP linting
Switched from cloud-based StyleCI to a local solution using wayofdev/cs-fixer-config, a php-cs-fixer wrapper package. This allows developers to perform PHP linting locally via Makefile, reducing reliance on cloud-based CI systems.
feat: update docker-compose for enhanced development and testing
Updated docker-compose.yaml to support PHP 8.2 and various database servers directly through Makefile and in tests, enabling developers to avoid local PHP installations.
Simplified Dev Workflow with make
This PR introduces a streamlined dev workflow using the make command. Running make locally sets up dev environment in a snap:
-
make env: Creates the.envfile from.env.example. -
make prepare: Sets up the.build/php-cs-fixerdirectory for caching. -
make install: Runscomposer installusing Docker withwayofdev/php-dev:8.2-cli-alpine-latest. -
make hooks: Installs pre-commit git hooks for linting and commitizen. -
make up: Starts the Docker environment with all the necessary databases.
No more manual setup or inconsistencies across dev environments! Check out the asciicast to see make in action:
Added make help command
This command prints available actions on this repository:
Let's make our dev lives easier with this addition!
I have added https://github.com/ergebnis/composer-normalize as a dev composer depdendency to lint and standardize existing composer.json files. It can be used to format composer.json files across all organization.