Setup PHP PrestaShop
| This documentation was generated with the assistance of AI. Please report any inaccuracies. |
Scaffold a PrestaShop module for PrestaShop 8.x and 9.x in the repository root, or bring an existing module up to this catalog’s toolchain, then prove the scaffold with its own unit, coverage, static-analysis, formatting and packaging gates.
Purpose
iru-setup-php-prestashop treats the repository as the module directory, named after the module’s technical name,
because PrestaShop requires the directory, the main file and $this→name to match. It writes the main class
extending Module (bootstrap, hook registration, Configuration defaults, new translation system), a tracked
config.xml, a placeholder logo.png, composer.json (type: prestashop-module, PSR-4 src/, pinned platform PHP)
with the catalog’s shared scripts, a sample displayFooter hook, a Symfony back-office configuration page compatible
with 8.x and 9.x (form type, data configuration, services, route, controller, Twig template), upgrade/,
translations/, index.php guards and license headers (AFL-3.0 by convention, or OSL-3.0, MIT, proprietary, other).
Tooling comprises prestashop/php-dev-tools, a stub-based PHPStan config that needs no shop, PHP-CS-Fixer, a PHPUnit
unit suite with Clover/JUnit output, an optional Integration suite with a Docker prestashop/prestashop plus MariaDB
dev shop, bin/package.sh for the distributable zip, and sonar-project.properties when Sonar is on, and browser UI tests per the catalog’s UI contract (see Building user interfaces): .ui-quality.yml, a test-only package.json with Playwright and @axe-core/playwright, playwright.config.ts pointed at a running shop through PS_BASE_URL (specs skip when it is unset), the shared tests/e2e/support/ui-screenshots.ts helper, and a FooterMessage spec that captures the hook template across left-to-right/right-to-left x light/dark with an accessibility check (with accessibility: none, no accessibility tooling is installed and the templates omit assistive-technology attributes). All of it is excluded from the module zip by .distignore. Dev-dependency
versions are resolved by Composer under the pinned PHP platform, with a documented fallback table. On an existing
module it adds tooling only and never the sample feature unless asked.
Plugin
Shipped by the iru-php plugin of the ai-catalog marketplace (install with /plugin install iru-php@ai-catalog; see Plugins).
Invocation
/iru-setup-php-prestashop
/iru-setup-php-prestashop
name: Acme Greeting
slug: acmegreeting
Inputs
Optional args, one key: value per line (supplied by iru-setup-php-repository).
| Argument | Required | Description | Default |
|---|---|---|---|
|
No |
Display name and technical name (lowercase letters and digits, starting with a letter; no hyphens). |
Read from an existing module, else derived and confirmed or asked. |
|
No |
Composer vendor and PSR-4 namespace. |
Git remote owner lowercased; |
|
No |
Module and author metadata. |
Asked when missing. |
|
No |
Module-manager category such as |
Asked; |
|
No |
AFL-3.0, OSL-3.0, MIT, proprietary or other; selects headers and the |
Asked; AFL-3.0 recommended. |
|
No |
PHP floor; sets |
Asked; 8.1 (supports PrestaShop 8 and 9) recommended. |
|
No |
Drive the Sonar recommendation and the closing notes. |
|
|
No |
|
|
|
No |
|
|
|
No |
|
|
|
No |
|
|
Outputs
-
The module skeleton and tooling files listed in the skill (main class,
config.xml,logo.png,composer.json,config/,src/,views/,upgrade/,translations/,phpunit.xml.dist, PHPStan configs and stubs,.php-cs-fixer.dist.php, the browser UI tests (.ui-quality.yml,package.json,playwright.config.ts,tests/e2e/support/ui-screenshots.ts,tests/e2e/specs/FooterMessage.spec.ts),.distignore,bin/package.sh, optionalsonar-project.properties), each created, updated, replaced or kept as is. -
Installed dev dependencies and verification results: Composer validation, PHP lint, unit tests, coverage line rate (or unverified when no PCOV/Xdebug), PHPStan, PHP-CS-Fixer, the packaged zip contents (checked to hold no
tests/,package.json,node_modules/orplaywright.config.ts), the Playwright tooling check (npx playwright test --list; unverified without Node), the.ui-screenshots/component/FooterMessage/captures from a shop run (unverified without a shop), and optionally the Docker shop check per PrestaShop major. -
A report starting with the setup mode and covering identity, license, PHP floor and its source, dependency versions (live or fallback), per-file action, gate results, distribution notes (PrestaShop Addons has no upload API; the validator and checklist reminders), and warnings (review files, add a
LICENSE, replace the logo, never install a-devzip on a real shop). -
It never writes
LICENSE,.gitignore,README.md,CHANGELOG.mdordocs/.
Execution flow
Dependencies
Invokes
None — this skill is a leaf: it uses Composer, PHP and Docker directly. Its conventions are the ones
iru-php-code-one-task (reference/prestashop.md) enforces later, and the gate skills iru-php-test,
iru-php-coverage, iru-php-code-quality and iru-php-phpdoc run on the result as is, but it does not call them.
Invoked by
-
Setup PHP Repository — Step 5, scaffold for a PrestaShop module, via the
iru-isolated-skill-executoragent.
Source
SKILL.md on GitHub — the file this page was generated from.