Skip to content
adumont-payplug edited this page Jul 6, 2026 · 1 revision

unified-plugin-core

Core foundations shared library for Payplug e-commerce plugins (e.g. PrestaShop).

This is a PHP library that provides shared building blocks — contracts, exceptions, models, and helper utilities — used across Payplug's e-commerce plugins. It is distributed via Composer for plugin development, but the shipped code is bundled directly into plugin ZIPs (no live vendor/ install on the merchant's server).

Requirements

  • Docker — the only local requirement; PHP and Composer run inside a dev container, no local PHP install needed.
  • The library targets PHP 7.1+ at runtime. composer.json's require.php (>=7.4) reflects the build-tooling floor for consuming plugins, not the runtime the shipped code executes on.

Getting started

make install

Builds the dev Docker image (PHP 7.4-cli + Composer) and runs composer install inside it.

Command Description
make install Install dependencies + git hooks
make test Run the PHPUnit suite
make stan PHPStan static analysis (level 8)
make cs-lint Code style check (dry-run)
make cs-fix Code style auto-fix
make quality cs-lint + stan + test
make shell Interactive shell in the dev container

Project structure

PSR-4 autoloaded under the PayplugUnifiedCore\ namespace, rooted at src/:

src/
├── Contracts/          interfaces
├── Exceptions/         exception types
├── Models/             data/domain models
└── Utilities/
    └── Helpers/        stateless helper functions

Tests live under tests/ (namespace PayplugUnifiedCore\Tests\).

Compatibility

Code under src/ and tests/ must not use PHP syntax newer than 7.1 (no typed properties, arrow functions, constructor property promotion, match, enum, etc.), since the shipped code must run on older PHP hosts. This is enforced in CI by linting every file directly with php -l across PHP 7.1–8.2.

License

MIT

PayPlug

unified-plugin-core

Core foundations shared library for Payplug e-commerce plugins


Guides


Back to repository

Clone this wiki locally