|
1 | 1 | # Development |
2 | 2 |
|
3 | | -This document describes development workflows and maintenance tasks for this repository. |
| 3 | +This document describes development workflows and maintenance tasks for the project. |
4 | 4 |
|
5 | | -## Local setup |
| 5 | +## Sync Metadata |
6 | 6 |
|
7 | | -Install dependencies: |
| 7 | +To keep configuration files synchronized with the latest template updates, use the `sync-metadata` command. This command |
| 8 | +downloads the latest configuration files from the template repository. |
8 | 9 |
|
9 | 10 | ```bash |
10 | | -composer install |
| 11 | +composer sync-metadata |
11 | 12 | ``` |
12 | 13 |
|
13 | | -## Project scripts |
| 14 | +### Updated Files |
14 | 15 |
|
15 | | -The project exposes a small set of Composer scripts for validation. |
| 16 | +This command updates the following configuration files: |
16 | 17 |
|
17 | | -| Script | Command | Purpose | |
18 | | -| ---------------------- | ----------------------------------- | ------------------------------------ | |
19 | | -| `test` | `composer run test` | Run the PHPUnit test suite | |
20 | | -| `psalm` | `composer run psalm` | Run static analysis | |
21 | | -| `easy-coding-standard` | `composer run easy-coding-standard` | Run ECS coding standards | |
22 | | -| `check-dependencies` | `composer run check-dependencies` | Verify declared runtime dependencies | |
| 18 | +| File | Purpose | |
| 19 | +| ------------------ | -------------------------------------------- | |
| 20 | +| `.editorconfig` | Editor settings and code style configuration | |
| 21 | +| `.gitattributes` | Git attributes and file handling rules | |
| 22 | +| `.gitignore` | Git ignore patterns and exclusions | |
| 23 | +| `.styleci.yml` | StyleCI code style analysis configuration | |
| 24 | +| `infection.json5` | Infection mutation testing configuration | |
| 25 | +| `phpstan.neon` | PHPStan static analysis configuration | |
| 26 | +| `phpunit.xml.dist` | PHPUnit test configuration | |
23 | 27 |
|
24 | | -## Notes |
| 28 | +### When to Run |
25 | 29 |
|
26 | | -- Keep changes minimal and consistent with existing code and behavior. |
27 | | -- Documentation and code comments are English-only. |
| 30 | +Run this command in the following scenarios: |
| 31 | + |
| 32 | +- **Periodic Updates** - Monthly or quarterly to benefit from template improvements. |
| 33 | +- **After Template Updates** - When the template repository has new configuration improvements. |
| 34 | +- **Before Major Releases** - Ensure your project uses the latest best practices. |
| 35 | +- **When Issues Occur** - If configuration files become outdated or incompatible. |
| 36 | + |
| 37 | +### Important Notes |
| 38 | + |
| 39 | +- This command overwrites existing configuration files with the latest versions from the template. |
| 40 | +- Ensure you have committed any custom configuration changes before running this command. |
| 41 | +- Review the updated files after syncing to ensure they work with your specific project needs. |
| 42 | +- Some projects may require customizations after syncing configuration files. |
0 commit comments