Skip to content

Commit 71cf71b

Browse files
committed
docs: add REQ-CS-007 PHP-FIG PSR evaluation
Document Adopted vs N/A PSR decisions in docs/PSR.md and link it from the README Documentation section.
1 parent fdebd83 commit 71cf71b

2 files changed

Lines changed: 38 additions & 0 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ cd demo/symfony8 && cp .env.example .env && make up # Symfony 8, port 8022
101101

102102
- [Installation](docs/INSTALLATION.md)
103103
- [Configuration](docs/CONFIGURATION.md)
104+
- [PSR evaluation (REQ-CS-007)](docs/PSR.md)
104105
- [Usage](docs/USAGE.md)
105106
- [Contributing](docs/CONTRIBUTING.md)
106107
- [Code of Conduct](CODE_OF_CONDUCT.md)

docs/PSR.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# PHP-FIG PSR evaluation (REQ-CS-007)
2+
3+
Package: `nowo-tech/word-to-pdf-bundle` (`symfony-bundle`)
4+
5+
This document records which [PHP-FIG PSRs](https://www.php-fig.org/psr/) apply to this package.
6+
Only contracts that add clear interoperability or maintainability value are **Adopted**.
7+
Others are **N/A** (or already covered by Symfony) so the decision stays auditable.
8+
9+
## Baseline (always)
10+
11+
| PSR | Decision | How |
12+
| --- | -------- | --- |
13+
| PSR-12 (coding style) | **Adopted** | `@PSR12` in `.php-cs-fixer.dist.php` (Nowo REQ-CS-001). |
14+
| PSR-4 (autoloading) | **Adopted** | `composer.json` `autoload` / `autoload-dev` PSR-4 map for package sources and tests. |
15+
16+
## Interface / contract PSRs
17+
18+
| PSR | Decision | Notes |
19+
| --- | -------- | ----- |
20+
| PSR-3 Logger | **Adopted** | Type-hint `Psr\Log\LoggerInterface` on services that log; injectable via Symfony DI. |
21+
| PSR-6 / PSR-16 Cache | **N/A** | No package-owned cache layer. |
22+
| PSR-7 / PSR-17 HTTP messages | **N/A** | Symfony HttpFoundation (or no HTTP messages API) is the correct surface; a PSR-7 bridge would not help consumers. |
23+
| PSR-18 HTTP client | **N/A** | No outbound HTTP client. |
24+
| PSR-11 Container | **N/A** | No container locator in the public API; constructor injection only. |
25+
| PSR-14 Event dispatcher | **Already satisfied via Symfony** | Uses Symfony `EventDispatcherInterface` / subscribers (PSR-14 compatible). No separate FIG dependency required. |
26+
| PSR-15 HTTP middleware | **N/A** | Uses Symfony kernel listeners/subscribers (or has no HTTP middleware pipeline). |
27+
| PSR-20 Clock | **N/A** | No time-sensitive domain logic requiring a clock SPI. |
28+
29+
## Summary
30+
31+
- **Adopted beyond baseline:** PSR-3 Logger
32+
- **Rule:** do not add `psr/*` Composer dependencies without matching type-hints and DI wiring.
33+
- **Re-evaluate** when the package gains logging, HTTP, cache, clock, or event SPIs.
34+
35+
---
36+
37+
_REQ-CS-007 evaluation date: 2026-08-21._

0 commit comments

Comments
 (0)