-
Notifications
You must be signed in to change notification settings - Fork 0
Architecture
adumont-payplug edited this page Jul 6, 2026
·
2 revisions
PSR-4 autoloaded under the PayplugUnifiedCore\ namespace:
-
PayplugUnifiedCore\→src/(library code) -
PayplugUnifiedCore\Tests\→tests/(dev-only, test code)
src/ is organized into four top-level categories. New code should land in the matching
category rather than introducing new top-level directories:
| Directory | Purpose |
|---|---|
Contracts/ |
Interfaces shared across consuming plugins |
Exceptions/ |
Library-specific exception types |
Models/ |
Data/domain models |
Utilities/Helpers/ |
Stateless helper functions |
-
Runtime target: PHP 7.1+. The shipped code is bundled directly into plugin marketplace
ZIPs — there's no live
vendor/install on the merchant's server, and that server may run an older PrestaShop/PHP stack. No PHP 7.2+ syntax (typed properties, arrow functions, constructor property promotion,match,enum, ...) is allowed insrc/ortests/. -
Tooling floor: PHP 7.4+.
composer.json'srequire.phpreflects what's needed to run Composer/static analysis/tests during development and CI — not the runtime constraint above. The two are intentionally different and enforced separately (see Home for local commands).
| Tool | Purpose |
|---|---|
PHPStan (level 8, targeting phpVersion: 70100) |
Static analysis, reasoning about the code as PHP 7.1 |
PHP-CS-Fixer (@PSR12 + @PHP71Migration) |
Code style |
| PHPUnit | Unit tests |
| CaptainHook | Git hooks (e.g. code style check on commit) |
Two categories of checks run on pull requests:
-
Compatibility — lints every file in
src/andtests/withphp -lacross PHP 7.1/7.4/8.0/8.1/8.2, directly against the checked-out source (no Composer install involved). Proves the code parses on every supported runtime. - Quality — static analysis, code style, and unit tests on PHP 7.4 (the dev/CI tooling baseline).
Core foundations shared library for Payplug e-commerce plugins
Guides