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