- This repository contains code tools you can use in your project.
- It is a collection of tools and scripts that help us to maintain our codebase.
- EditorConfig helps maintain consistent coding styles for multiple developers working on the same project across various editors and IDEs. The EditorConfig project consists of a file format for defining coding styles and a collection of text editor plugins that enable editors to read the file format and adhere to defined styles. EditorConfig files are easily readable and they work nicely with version control systems.
- Learn more about
.editorconfig
at official page here.
- This project uses PHP-CS-Fixer to automatically format and fix PHP code according to defined coding standards. It helps maintain clean, consistent, and readable code across the codebase.
- PHP_CodeSniffer is a set of two PHP scripts; the main
phpcs
script that tokenizes PHP, JavaScript and CSS files to detect violations of a defined coding standard, and a secondphpcbf
script to automatically correct coding standard violations. PHP_CodeSniffer is an essential development tool that ensures your code remains clean and consistent. - Though the usage of this tool is not mandatory, it is highly recommended to use it to ensure the quality of the codebase.
- Learn more about PHP_CodeSniffer at official page here.
- Rector is a tool that automatically upgrades and refactors your PHP code. It is a tool that helps you to keep your code up-to-date and clean.
- Learn more about Rector at official page here.
- Though each tool can be used "out-of-the-box", this is a helper script that allows you to copy configuration files of each, or all, tools to your project so you can customize them.
- This is a helper script that allows you to run PHP commands inside a local Kubernetes pod without having to connect to it via a terminal manually.
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/kununu/code-tools.git",
"no-api": true
}
]
}
You can use this library by issuing the following command:
composer require --dev kununu/code-tools --no-plugins
- The
--no-plugins
is used to avoid the composer plugins to be executed and prevent generating unwanted configuration files, specially in projects withsymfony/flex
installed.
- .editorconfig instructions.
- PHP-CS-Fixer instructions.
- PHP_CodeSniffer instructions.
- Rector instructions.
- bin/code-tools instructions.
- bin/php-in-k8s instructions.