Audit object model
Prestashop Developer Skills
npx -y skills add jeffsenso/prestashop-skills --skill audit-object-modelAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 4 stars4 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Read the legacy ObjectModel class for the domain and extract its database schema, field definitions, multilingual fields, and validation rules. This is the authoritative source for what columns the Doctrine repository must handle.
SKILL.md
1.7 KB, as published. Nobody here has run it
audit-object-model
Instructions
- Open
classes/{Domain}.php— read the$definitionarray fully. - Extract the
tablename — this is the primary DB table. - List every field in
$definition['fields']: field name, type, validate rule, required flag, lang flag, shop flag. - Identify multilingual fields (
'lang' => true) — these needTranslatableTypein the form and multilingual handling in handlers. - Identify shop-scoped fields (
'shop' => true) — these require multistore-aware repository methods. - If
classes/lang/{Domain}Lang.phpexists, read it and confirm the lang table structure. - Note any
hasManyorhasManyToManyrelations defined — these become sub-resources (handled by dedicated commands and repositories when the domain is non-trivial). - Record every
$validateFields()rule — these inform ValueObject validation. - Output: structured schema map (table, columns, lang columns, shop columns, relations, validation rules).
Rules
- Never modify ObjectModel files — read-only audit
- Flag any field with a custom validate method (
Validate::isXxx) — these need a custom ValueObject - Note
$identifierfield name — it becomes the{Domain}IdValueObject - Relations declared in ObjectModel that link to another entity's table are sub-resource candidates