docs: map existing codebase with PAUL

- stack.md - PrestaShop 1.7.x, PHP, Smarty, SCSS, modules
- architecture.md - MVC + hooks, override mechanism, CQRS in src/
- structure.md - Directory layout, key file locations
- conventions.md - PHP/Smarty/SCSS/JS conventions, PS patterns
- testing.md - No automated tests in custom modules
- integrations.md - Allegro, Empik, BaseLinker, shipping, payments
- concerns.md - Override fragility, EOL risk, missing CI/CD
- db_schema.md - Custom tables, modified core tables

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-04-27 12:41:05 +02:00
parent c5d0a259c7
commit b1e8bb3d12
14 changed files with 1069 additions and 0 deletions

67
.paul/codebase/testing.md Normal file
View File

@@ -0,0 +1,67 @@
# Testing Patterns
**Analysis Date:** 2026-04-27
## Test Framework
**Runner:** None — no unit/integration test framework in custom modules
**Static Analysis:**
- PHPStan (level 5) present only in `modules/blockreassurance/tests/php/phpstan/phpstan.neon`
- Not configured for custom modules (`customfeaturetab`, `AddOrderExtraFields`)
**Run Commands:**
```bash
# No test commands defined
# Only available for blockreassurance (pre-installed PS module):
# modules/blockreassurance/tests/php/phpstan/
```
## Test File Organization
**Custom modules — no tests found:**
- `modules/customfeaturetab/` — no tests directory
- `modules/AddOrderExtraFields/` — no tests directory
- `modules/addcolumninlist/` — no tests directory
**Pre-installed modules with static analysis only:**
- `modules/blockreassurance/tests/php/phpstan/` — PHPStan config only
**Core PrestaShop:**
- `classes/ConfigurationTest.php` — system configuration checker (not unit tests)
## Coverage
**Requirements:** None enforced
**Current state:** No automated test coverage for custom code
## Testing Approach in This Project
Since there is no automated test suite, verification is done manually:
1. **Deploy to production via FTP** (`.vscode/ftp-kr.json`)
2. **Clear PrestaShop cache** — Admin → Advanced Parameters → Performance
3. **Manual browser testing** of affected pages
4. **Check admin panel** for errors after module changes
## Recommendations for Adding Tests
If implementing tests in the future:
**For PHP modules:**
- PHPUnit 9.x (compatible with PHP 7.x)
- Composer dev dependency in module
- Test location: `modules/{name}/tests/`
**For static analysis:**
- PHPStan level 5+ with PrestaShop stubs
- Config: `modules/{name}/phpstan.neon`
**For Smarty templates:**
- Manual verification only (no template test framework)
---
*Testing analysis: 2026-04-27*
*Update when test patterns change*