Skip to content

Commit 3cd5ddc

Browse files
FIRE-1156-updated-readme (#1)
## Link to task > ## Notes for reviewer ## Checklist - [ ] The code is tested on staging - [ ] Migrations follow the [migration guidelines](https://www.notion.so/ageras/Deployment-guideline-039fbf8158f147df849db9ca65fe2120?pvs=4#d9d2c23743144aa990760f65d97aba62)
2 parents 13de835 + 28ded10 commit 3cd5ddc

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

README.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ Ageras ApS PHP Coding Standards
33

44
This document describes the coding standards for PHP code written by Ageras ApS.
55

6+
At Ageras ApS, we aim to maintain high-quality, consistent, and maintainable PHP code. These coding standards ensure compliance with PSR-12 and leverage modern tools to enhance code reliability and developer productivity.
7+
68
## Table of Contents
79
1. [Installation](#installation)
810
2. [Configuration](#configuration)
@@ -34,7 +36,8 @@ Add the following scripts to the `scripts` section of your `composer.json` file
3436
"scripts": {
3537
"csfixer:fix": "vendor/bin/php-cs-fixer fix",
3638
"csfixer:check": "vendor/bin/php-cs-fixer fix --dry-run -vv",
37-
"phpstan:analyse": "vendor/bin/phpstan analyse --memory-limit=1G"
39+
"phpstan:analyse": "vendor/bin/phpstan analyse --memory-limit=1G",
40+
"phpstan:generate-baseline": "vendor/bin/phpstan analyse --generate-baseline --memory-limit=1G"
3841
}
3942
}
4043
```
@@ -138,7 +141,7 @@ When working with legacy codebases, you may encounter many errors during static
138141

139142
Run the following command to generate a `phpstan-baseline.neon` file:
140143
```bash
141-
vendor/bin/phpstan analyse --generate-baseline
144+
composer phpstan:generate-baseline
142145
```
143146
This will save all current errors to `phpstan-baseline.neon`.
144147

@@ -178,6 +181,14 @@ composer phpstan:analyse
178181
```
179182
This command runs PHPStan to analyze the codebase and report any errors or inconsistencies.
180183

184+
### Static Code Baseline Generation
185+
186+
Generate a baseline file for PHPStan to temporarily ignore existing issues in the codebase. This is especially useful for legacy projects:
187+
```bash
188+
composer phpstan:generate-baseline
189+
```
190+
This command runs PHPStan with the `--generate-baseline` option and creates a `phpstan-baseline.neon` file to record the current issues.
191+
181192
---
182193

183194
## License

0 commit comments

Comments
 (0)