Skip to content

Commit ed40cd0

Browse files
committed
fix(docs): Update command syntax in development.md and testing.md for clarity and consistency.
1 parent b46fd15 commit ed40cd0

File tree

4 files changed

+78
-38
lines changed

4 files changed

+78
-38
lines changed

CHANGELOG.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22

33
## 0.2.1 Under development
44

5+
- Bug #121: Update command syntax in `development.md` and `testing.md` for clarity and consistency (@terabytesoftw)
6+
57
## 0.2.0 January 24, 2024
68

79
- Enh #87: Refactor `SemverUtil::class` stability normalization logic (@terabytesoftw)
8-
- Bug #104: Add support for PHP 8.4 (@terabytesoftw)
10+
- Bug #104: Update nullable type hints for method parameters and properties for PHP 8.4 deprecated RFC nullable (@terabytesoftw)
911
- Enh #105: Update dependencies in `composer.lock` (@terabytesoftw)
1012
- Enh #106: Update composer dependencies for compatibility with newer versions (@terabytesoftw)
1113
- Bug #107: Force 4-space indentation when updating `package.json` (@terabytesoftw)
@@ -25,8 +27,8 @@
2527

2628
## 0.1.2 June 10, 2024
2729

28-
- Bug #64: Update docs, `composer.lock` and change directory in `Solver.php` (@terabytesoftw)
29-
- Enh #63: Add the ability to specify a custom directory for `package.json` (@terabytesoftw)
30+
- Bug #64: Update docs, `composer.lock` and directory in `Solver.php` (@terabytesoftw)
31+
- Enh #66: Add the ability to specify a custom directory for assets (@terabytesoftw)
3032
- Bug #69: Add `funding.yml` file (@terabytesoftw)
3133

3234
## 0.1.1 April 4, 2024
@@ -36,4 +38,4 @@
3638

3739
## 0.1.0 January 21, 2024
3840

39-
- Initial release.
41+
- Enh #1: Initial commit (@terabytesoftw)

README.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -105,14 +105,13 @@ Composer state preserved if the install fails.
105105

106106
## Documentation
107107

108-
- [Guide](resources/doc/index.md)
109-
- [Usage](resources/doc/usage.md)
110-
- [Configuration](resources/doc/config.md)
111-
- [Events](resources/doc/events.md)
112-
- [FAQs](resources/doc/faqs.md)
113-
- [Development Guide](docs/development.md)
114-
- [Testing Guide](docs/testing.md)
115-
- [Release Notes](https://github.com/php-forge/foxy/releases)
108+
- 📚 [Guide](resources/doc/index.md)
109+
- 💡 [Usage](resources/doc/usage.md)
110+
- ⚙️ [Configuration](resources/doc/config.md)
111+
- 📅 [Events](resources/doc/events.md)
112+
-[FAQs](resources/doc/faqs.md)
113+
- 🧪 [Testing Guide](docs/testing.md)
114+
- 🛠️ [Development Guide](docs/development.md)
116115

117116
## Package information
118117

docs/development.md

Lines changed: 30 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,42 @@
11
# Development
22

3-
This document describes development workflows and maintenance tasks for this repository.
3+
This document describes development workflows and maintenance tasks for the project.
44

5-
## Local setup
5+
## Sync Metadata
66

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.
89

910
```bash
10-
composer install
11+
composer sync-metadata
1112
```
1213

13-
## Project scripts
14+
### Updated Files
1415

15-
The project exposes a small set of Composer scripts for validation.
16+
This command updates the following configuration files:
1617

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 |
2327

24-
## Notes
28+
### When to Run
2529

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.

docs/testing.md

Lines changed: 35 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,82 @@
11
# Testing
22

3-
This package provides a consistent set of Composer scripts for local validation.
3+
This package provides a consistent set of [Composer](https://getcomposer.org/) scripts for local validation.
44

55
Tool references:
66

77
- [Composer Require Checker](https://github.com/maglnet/ComposerRequireChecker) for dependency definition checks.
88
- [Easy Coding Standard (ECS)](https://github.com/easy-coding-standard/easy-coding-standard) for coding standards.
9-
- [Psalm](https://psalm.dev/) for static analysis.
9+
- [Infection](https://infection.github.io/) for mutation testing.
10+
- [PHPStan](https://phpstan.org/) for static analysis.
1011
- [PHPUnit](https://phpunit.de/) for unit tests.
12+
- [Rector](https://github.com/rectorphp/rector) for automated refactoring.
13+
14+
## Automated refactoring (Rector)
15+
16+
Run Rector to apply automated code refactoring.
17+
18+
```bash
19+
composer rector
20+
```
1121

1222
## Coding standards (ECS)
1323

1424
Run Easy Coding Standard (ECS) and apply fixes.
1525

1626
```bash
17-
composer run easy-coding-standard
27+
composer ecs
1828
```
1929

2030
## Dependency definition check
2131

2232
Verify that runtime dependencies are correctly declared in `composer.json`.
2333

2434
```bash
25-
composer run check-dependencies
35+
composer check-dependencies
36+
```
37+
38+
## Mutation testing (Infection)
39+
40+
Run mutation testing.
41+
42+
```bash
43+
composer mutation
44+
```
45+
46+
Run mutation testing with static analysis enabled.
47+
48+
```bash
49+
composer mutation-static
2650
```
2751

28-
## Static analysis (Psalm)
52+
## Static analysis (PHPStan)
2953

3054
Run static analysis.
3155

3256
```bash
33-
composer run psalm
57+
composer static
3458
```
3559

3660
## Unit tests (PHPUnit)
3761

3862
Run the full test suite.
3963

4064
```bash
41-
composer run test
65+
composer tests
4266
```
4367

4468
## Passing extra arguments
4569

4670
Composer scripts support forwarding additional arguments using `--`.
4771

48-
Example: run a specific PHPUnit test or filter by name.
72+
Run PHPUnit with code coverage report generation.
4973

5074
```bash
51-
composer run test -- --filter AssetManagerTest
75+
composer tests -- --coverage-html code_coverage
5276
```
5377

54-
Example: run Psalm with a different memory limit.
78+
Run PHPStan with a different memory limit.
5579

5680
```bash
57-
composer run psalm -- --memory-limit=512M
81+
composer static -- --memory-limit=512M
5882
```

0 commit comments

Comments
 (0)