Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
360 commits
Select commit Hold shift + click to select a range
40282a2
add removed testRemoveManufacturer test
MattKelvin Aug 29, 2025
cff85a9
fix and clean testBulkRemoveManufacturers test
MattKelvin Aug 29, 2025
d93c5ad
improve syntax
MattKelvin Aug 29, 2025
ef6fe80
change method to static
MattKelvin Sep 24, 2025
c5aa581
add iframe validation
MattKelvin Sep 24, 2025
f8a8e4e
fix mapping
MattKelvin Nov 20, 2025
26019b8
remove manufacturer detail endpoint (currently blocked by core)
MattKelvin Nov 22, 2025
5ef7a32
apply rector rules
MattKelvin Nov 23, 2025
7176669
feat: [Discount]add bulk-update-status and bulk-delete endpoints + ad…
mattgoud Dec 17, 2025
10a587d
feat: [Discount] throw bulkDiscountExeption for bulk update status, i…
mattgoud Dec 19, 2025
beecb9f
feat: [Discount][bulk-update-status] replace CQRSUpdate by CQRSPartia…
mattgoud Dec 19, 2025
616a490
tests: [Discount][bulk-update-status] fix typos + remove useless test
mattgoud Dec 19, 2025
a0e25a6
tests: [Discount] try fix integration tests + remove useless CQRSUpda…
mattgoud Dec 19, 2025
756c5f6
tests: [Discount] change error code for testBulkDeleteWithMissingPara…
mattgoud Dec 19, 2025
40f2a15
tests: [Discount] using helper functions
mattgoud Dec 22, 2025
144e98b
tests: [Discount] add http error response arg in bulkDeleteItems method
mattgoud Dec 23, 2025
8b22fd5
tests: [Discount] add http error response arg (404) in bulkDeleteItem…
mattgoud Dec 23, 2025
b26aa07
tests: [Discount] edge case missing parameter : this test specificall…
mattgoud Dec 23, 2025
fed00ec
chore: cs fixer
mattgoud Dec 23, 2025
5788128
chore: cs fixer
mattgoud Dec 23, 2025
928a7de
Merge pull request #130 from mattgoud/bulk-enable-disable-delete-disc…
jolelievre Dec 30, 2025
d8006ba
Add endpoint to duplicate a discount
boherm Dec 18, 2025
bfac6c1
Add test for duplication of discount
boherm Dec 18, 2025
bac3e5f
Fix rector rule
boherm Dec 18, 2025
34ad0b0
Make nullable discount quantity and quantity per user
boherm Nov 25, 2025
0e57b9a
Merge pull request #119 from boherm/make-nullable-discount-quantity-a…
jolelievre Jan 9, 2026
3a50fa1
Merge pull request #129 from boherm/duplicate-discount-endpoint
boherm Jan 14, 2026
cd62fb7
Revise contributing guidelines for API improvements
kpodemski Jan 15, 2026
00cd1d8
Improve README language and formatting
kpodemski Jan 15, 2026
e90ec80
Update README.md
kpodemski Jan 15, 2026
90bd0dd
Merge pull request #132 from kpodemski/updated-readme
jolelievre Jan 15, 2026
4d2c527
Improve local config to run test from shop
jolelievre Jan 5, 2026
e738c6d
Merge andpoint for conditions into the single endpoint ones, add miss…
jolelievre Jan 5, 2026
440a2f0
Merge pull request #131 from jolelievre/discount-refacto
jolelievre Jan 16, 2026
c52b2a5
Add combinations endpoint
sebajps Nov 24, 2025
d84967e
Add endpoint to generate combinations
jolelievre Jan 20, 2026
812a2be
Handle endpoints to list combination IDs
jolelievre Jan 20, 2026
0a1513a
Add endpoint that list product combinations with details
jolelievre Jan 20, 2026
9439ad3
Implement GET endpoint for single combination
jolelievre Jan 20, 2026
ae64220
Update integrations tests for all new combination endpoints
jolelievre Jan 20, 2026
6517f31
Update PS min version
jolelievre Jan 20, 2026
71144bf
Update tests that have been impacted by recent changes
jolelievre Jan 20, 2026
86e4747
Add mising openapi details
jolelievre Jan 20, 2026
ea599e2
Fix license headers
jolelievre Jan 22, 2026
4eb24ac
Merge pull request #121 from sebajps/add-combinations-endpoint
jolelievre Jan 22, 2026
f7d7202
Add resource for Discount Type
nicosomb Jan 20, 2026
ce6a489
Add check if discount class exists
nicosomb Feb 2, 2026
534bdac
Added endpoints for domain "ShowcaseCard"
Oct 22, 2025
b280a1a
Merge pull request #133 from PrestaShop/add-discountType-resource
nicosomb Feb 3, 2026
ec7b33b
Exclude folders from being autoindexed during artifact build
jolelievre Feb 4, 2026
c590cda
Bump version 0.3.1
jolelievre Feb 4, 2026
abea4c6
Merge pull request #136 from jolelievre/fix-build-artifact
jolelievre Feb 4, 2026
07b135c
Bump version 0.4.0
jolelievre Feb 4, 2026
5d9146a
Merge pull request #137 from jolelievre/bump-040
jolelievre Feb 4, 2026
3e5671c
Merge pull request #89 from Progi1984/showcaseCard
jf-viguier Feb 4, 2026
f217f73
Added endpoints for domain "Tax"
Oct 1, 2025
06daa13
Merge pull request #82 from Progi1984/tax
jf-viguier Feb 9, 2026
63b8510
Added coverage
Nov 27, 2025
2875a06
Merge pull request #120 from Progi1984/coverage
jf-viguier Feb 16, 2026
1d2091d
Bump 0.5.0 version
jolelievre Feb 18, 2026
990c1c6
Merge pull request #139 from jolelievre/bump-050
jolelievre Feb 18, 2026
a8fb36d
Add dynamic PHP matrix generation to use less runners on each PR, the…
jolelievre Feb 18, 2026
c239b22
Merge pull request #141 from jolelievre/optimize-ci-matrix
jolelievre Feb 19, 2026
c74a019
Make validTo nullable
nicosomb Feb 24, 2026
1131fcf
Introduce new PHPStan and associated Rector rules to enforce that Api…
jolelievre Feb 27, 2026
a6140e6
Add PHPStan rule to prevent adding normalizers and API Platform provi…
jolelievre Mar 2, 2026
b1d4573
Clean useless normalizers and processors, adapt integration tests and…
jolelievre Mar 3, 2026
37937a9
github: new workflow to add issue to project
ga-devfront Mar 2, 2026
07d7baf
Merge pull request #145 from ga-devfront/github/add-issue-to-project
jolelievre Mar 3, 2026
09cb32b
Merge pull request #144 from jolelievre/add-new-ci-restrictions
jolelievre Mar 4, 2026
fdc382c
Update src/ApiPlatform/Resources/TaxRulesGroup/TaxRulesGroup.php
Kaikina Mar 4, 2026
0e61a0d
Update TaxRulesGroupEndpointTest.php
Kaikina Mar 4, 2026
a946622
Update TaxRulesGroupEndpointTest.php
Kaikina Mar 4, 2026
117ca39
Merge pull request #142 from PrestaShop/change-validto
jolelievre Mar 12, 2026
8acbc15
add get country single /countries/{countryId}
kseghair Mar 12, 2026
f3e301b
Remove zipcodeformat from query mapping
kseghair Mar 12, 2026
dc04698
Add claude skill to generate endpoints
kseghair Mar 12, 2026
e17f0e1
Merge pull request #153 from kseghair/country-get-single
Quetzacoalt91 Mar 12, 2026
216fce3
Add POST /countries endpoint to create a country
mattgoud Mar 12, 2026
cb8f95f
Fix expected validation message for names field in CountryEndpointTest
mattgoud Mar 16, 2026
30ae45c
Add README
kseghair Mar 18, 2026
183fec3
Add Normalizer to avoid touching the core
boherm Mar 11, 2026
81b64ac
Fix search alias endpoints
boherm Mar 11, 2026
09d080d
Fix tests
boherm Mar 11, 2026
7aeac58
Merge pull request #149 from boherm/fix-searchalias-endpoints
jolelievre Mar 20, 2026
83b9023
Update tests/Integration/ApiPlatform/CountryEndpointTest.php
mattgoud Mar 20, 2026
73692a2
feat(api): add country must return id
mattgoud Mar 20, 2026
8b9d73f
Add new function to test admin api bulk command with expected errors
boherm Mar 19, 2026
d566ec0
Fix bulk error status code
boherm Mar 18, 2026
e66d804
Merge pull request #161 from boherm/fix-bulk-error-status-code
boherm Mar 24, 2026
e010ecd
feat(search-engine): Add create endpoint for search-engines
cnavarro-prestashop Mar 12, 2026
e6a5738
search-engine-delete
Mar 12, 2026
ed8c0e3
add tests
Mar 12, 2026
fa3419c
Fix search engines endpoints
boherm Mar 18, 2026
7e310c9
Fix search engines tests
boherm Mar 18, 2026
67ff569
Merge pull request #154 from kseghair/claude-skill-for-endpoint-creation
jolelievre Mar 24, 2026
8b73320
Merge pull request #40 from PrestaShop/dependabot/composer/symfony/pr…
jolelievre Mar 25, 2026
09330a0
Bump phpunit/phpunit from 10.5.38 to 10.5.62
dependabot[bot] Mar 25, 2026
1315964
Bump symfony/process from 6.4.15 to 6.4.33
dependabot[bot] Mar 25, 2026
61931a1
Product category endpoints
Codencode Nov 5, 2025
8e72af2
Add API response for product category
Codencode Nov 13, 2025
29ddef4
Update product category endpoints tests
Codencode Nov 13, 2025
d2048ed
Refactor: Align code with CQRS API guidelines
Codencode Nov 24, 2025
ea6e9c6
Refactor product category write endpoints to remove custom normalizer
Codencode Mar 11, 2026
c0bda2d
Merge pull request #163 from PrestaShop/dependabot/composer/phpunit/p…
jolelievre Mar 25, 2026
a8772f1
Merge pull request #164 from PrestaShop/dependabot/composer/symfony/p…
jolelievre Mar 25, 2026
8de741a
feat: add SearchCartRules Query
MatthieuCutin Mar 30, 2026
5555598
Merge pull request #157 from mattgoud/create-country
mattgoud Mar 31, 2026
20c5182
add du delete des country
AureRita Mar 12, 2026
b98df57
Add test Remove Country
AureRita Mar 12, 2026
c21b285
resolve conflict
AureRita Mar 31, 2026
894f103
change CQRS Delete to use scopes wirte
AureRita Mar 13, 2026
050640b
add a create country on the remove to remove this new country
AureRita Mar 31, 2026
e1ddadb
Remove support for 9.0.x
Progi1984 Apr 7, 2026
61a7f4d
Merge pull request #189 from Progi1984/remove90x
Progi1984 Apr 7, 2026
88675a2
feat: Add Profile API Platform resource with CQRS GET and CREATE oper…
tblivet Mar 12, 2026
68014c8
refactor: remove avatarUrl property from Profile API resource.
tblivet Mar 12, 2026
2c1bbc3
refactor: update profile endpoint tests to use locale keys for names …
tblivet Mar 12, 2026
4723d8e
🐾 add delete endpoint
ingridusta Mar 12, 2026
a026bc1
test: update locale code from en-EN to en-US in profile endpoint test
tblivet Mar 12, 2026
1947bca
test: Add integration test for the profile DELETE endpoint.
tblivet Mar 12, 2026
df81ad1
chore: lint
tblivet Mar 12, 2026
381d876
chore: cs fixer
tblivet Mar 12, 2026
c2aa3d6
feat: add language
tblivet Mar 12, 2026
7cfebc9
chore: fix CI
tblivet Mar 13, 2026
67d6366
Refacto ApiTestCase to automatically setup an additional fr
jolelievre Mar 31, 2026
8e5101a
Merge pull request #152 from tblivet/feat/profile-api
jolelievre Apr 9, 2026
f2e8747
Add AI context and rework on the skill endpoint
boherm Apr 13, 2026
c5724d1
Merge pull request #162 from boherm/search-engine-endpoints
boherm Apr 13, 2026
cfb790c
Fix after comments
boherm Apr 15, 2026
024a657
fix(category): rename parentId to parentCategoryId
alexll Apr 15, 2026
49ca174
Merge pull request #190 from boherm/#188-add-ai-context
jolelievre Apr 15, 2026
52c29ac
now it should be good
AureRita Apr 15, 2026
5fd3fca
CS fixer used
AureRita Apr 15, 2026
5637893
Add Claude AI pre-review workflow and enrich CONTEXT.md
jolelievre Apr 16, 2026
9b75135
change addcountry on remove country to a @depends
AureRita Apr 17, 2026
505e5d2
Add listing endpoint field alignment checks to CONTEXT.md and REVIEW_…
jolelievre Apr 22, 2026
0ac585c
Merge pull request #192 from jolelievre/ai-prereview
jolelievre Apr 22, 2026
2172996
Update the url for the check guard action
jolelievre Apr 22, 2026
1f2b531
Add debug-secrets job and temporarily use fork guard workflow for tes…
jolelievre Apr 22, 2026
690c30d
Use pull_request_target event to access org secrets on fork PRs and r…
jolelievre Apr 22, 2026
1249be9
Merge pull request #194 from jolelievre/use-official-action
jolelievre Apr 22, 2026
d587478
Temporarily use fork guard workflow with debug output for testing
jolelievre Apr 22, 2026
4ffd401
Use official guard workflow from PrestaShop/.github@master
jolelievre Apr 22, 2026
d53d1b4
Add explicit failure when guard check is not fulfilled
jolelievre Apr 22, 2026
75ade61
Remove unnecessary comment
jolelievre Apr 22, 2026
058e9fd
Remove Need AI review label when guard check fails
jolelievre Apr 22, 2026
81b546b
Merge pull request #195 from jolelievre/test-debug-guard-workflow
jolelievre Apr 22, 2026
a2a9896
Fix claude-code-action inputs and update label management
jolelievre Apr 22, 2026
0c08213
Add validation step to detect Claude action internal failures
jolelievre Apr 22, 2026
31a2907
Merge pull request #196 from jolelievre/fix-claude-action-inputs
jolelievre Apr 22, 2026
7f5c03a
Increase max turns, add missing tools, focus prompt on PR diff, and i…
jolelievre Apr 22, 2026
6da46dd
Increase max turns to 25 and improve execution report in summary
jolelievre Apr 22, 2026
e297fe2
Increase max turns to 30
jolelievre Apr 22, 2026
4a46fe2
Merge pull request #197 from jolelievre/improve-claude-review-config
jolelievre Apr 22, 2026
ad49a95
Fix jq parsing: execution file is a JSON array, result is last element
jolelievre Apr 22, 2026
e1884b5
Handle both JSON array and single object formats in execution file
jolelievre Apr 22, 2026
82faa78
Merge pull request #198 from jolelievre/fix-execution-file-parsing
jolelievre Apr 22, 2026
457056e
Simplify workflow to use reusable ai-guarded-review from .github
jolelievre Apr 23, 2026
a6c0d11
Merge pull request #199 from jolelievre/use-guarded-review-workflow
jolelievre Apr 23, 2026
9ca29ed
Add job display names and upgrade actions/checkout to v6
jolelievre Apr 23, 2026
29037df
Merge pull request #200 from jolelievre/improve-workflow-display
jolelievre Apr 23, 2026
498724b
Merge pull request #158 from AureRita/add_delete_country
boherm May 7, 2026
d07ce65
Merge pull request #125 from Kaikina/settaxrulesgroup
boherm May 7, 2026
bebf22c
Merge pull request #191 from alexll/fix/category-parent-category-id
boherm May 7, 2026
bd789b8
Merge pull request #63 from MattKelvin/add-manufacturer-endpoint
nicosomb May 7, 2026
e906dea
Merge pull request #124 from Kaikina/dev
nicosomb May 7, 2026
030aa75
Merge pull request #104 from Codencode/product-category-endpoints
nicosomb May 7, 2026
8ff9e1a
Implement [PATCH] Country
Quetzacoalt91 May 8, 2026
e9d975c
Add projection of coverage after merging PRs from queue
kpodemski May 12, 2026
4dd6e2e
Merge pull request #204 from kpodemski/improvements-to-tracking-table
kpodemski May 12, 2026
13ba6c1
Merge pull request #203 from Quetzacoalt91/country-edit-command
tleon May 18, 2026
1d92974
Document admin_api_multistore feature flag prerequisite
jolelievre May 20, 2026
4ab4382
Document DateTimeImmutable as a second allowed property type
jolelievre May 20, 2026
56a5397
Merge pull request #205 from jolelievre/docs/multi-shop-feature-flag
jolelievre May 20, 2026
057d45b
Merge pull request #187 from MatthieuCutin/dev
tleon May 20, 2026
af9a0f1
Bump 0.7.0
jolelievre May 21, 2026
3cb84ef
Merge pull request #206 from jolelievre/bump-070
jolelievre May 21, 2026
74d00ac
Country API: add edit endpoint, ValidAddressFormat constraint, chaine…
jolelievre May 7, 2026
a3a7d10
Make ValidAddressFormat backward-compatible with PS 9.0/9.1
jolelievre May 7, 2026
6327512
Restore testAddCountryWithInvalidData
jolelievre May 7, 2026
16d146d
Fix tests after rebase from dev branch
jolelievre May 21, 2026
74f8a94
Fix CountryEndpointTest: scope Update validation group + reorder delete
jolelievre May 25, 2026
62ddabc
add experimental to discount endpoints
tleon May 29, 2026
ad5fa83
Merge pull request #202 from jolelievre/feature/41324-country-address…
jolelievre Jun 1, 2026
3770c51
Merge pull request #209 from tleon/Issue-41109-make-discount-enpoint-…
jolelievre Jun 2, 2026
7f719cb
Add OrderMessage resource
PrestaEdit Jun 10, 2026
73164fa
Add GET /countries collection listing endpoint
mattgoud Jun 12, 2026
0cfbbf0
Fix flaky enabled filter assertion in testListCountries
mattgoud Jun 12, 2026
0695eec
Add OrderReturnState Admin API resource with full CRUD
mattgoud Jun 15, 2026
77d8b83
Allow product images to be replaced
Quetzacoalt91 Jun 15, 2026
59a1676
Add Customer required-fields endpoint
PrestaEdit Jun 15, 2026
96971e1
Add GET and PATCH /order-returns/{orderReturnId} endpoints
nicosomb Jun 15, 2026
d46d943
Merge pull request #238 from PrestaShop/merchandise-return-endpoint
nicosomb Jun 16, 2026
b59720e
Remove redundant read/output false defaults on OrderReturnState opera…
mattgoud Jun 16, 2026
2218ff7
Merge pull request #230 from mattgoud/issue-41676-country-list
mattgoud Jun 18, 2026
99a8c23
Merge pull request #233 from mattgoud/feature/41679-order-return-stat…
mattgoud Jun 18, 2026
917ca34
Merge pull request #234 from Quetzacoalt91/add-missing-image-in-product
mattgoud Jun 19, 2026
ad88325
Address review: list endpoint, messages-only PATCH test, language reset
PrestaEdit Jun 22, 2026
4878a32
Merge pull request #216 from PrestaEdit/add-ordermessage-resource
Touxten Jun 24, 2026
23238b5
Add Attachment read endpoints to the Admin API
mattgoud Jul 3, 2026
350372c
Add cart send-to-customer endpoint
PrestaEdit Jul 6, 2026
dc08b06
Address review: strict_types, 404 test, non-empty cart
PrestaEdit Jul 6, 2026
9cfabc2
Fix AI pre-review being cancelled by unrelated label events
mattgoud Jul 6, 2026
d8e64a8
Restore cart tables in test setUp/tearDown to avoid row leakage
PrestaEdit Jul 6, 2026
2c71cb9
Document why the 422 CartException mapping is not tested here
PrestaEdit Jul 6, 2026
ec2f082
Address review: map exceptions to 422, default requiredFields, expand…
PrestaEdit Jul 7, 2026
d531daa
Address review: use valid required-field values in tests and examples
claude Jul 8, 2026
13b2888
Bootstrap CI for 9.2.x
github-actions[bot] Jul 9, 2026
9bdc7f7
Merge pull request #345 from PrestaShop/bootstrap/92x
jolelievre Jul 9, 2026
ff91fbe
Merge pull request #237 from PrestaEdit/add-customer-required-fields-…
mattgoud Jul 9, 2026
ec7c535
Merge pull request #322 from mattgoud/fix/ai-prereview-concurrency-group
mattgoud Jul 20, 2026
b52ad19
Merge pull request #311 from mattgoud/feat/41946-attachment-api-endpo…
kpodemski Jul 22, 2026
2ccf8f4
Merge pull request #314 from PrestaEdit/add-cart-send-to-customer
mattgoud Jul 22, 2026
cd6b488
Filter endpoints based on core version compatibility
jolelievre Jul 29, 2026
4f2124b
Add GET/POST/DELETE /tax-rules endpoints, safe on PrestaShop < 9.2
nicosomb Jul 27, 2026
214c4ca
Merge pull request #242 from PrestaShop/taxrules-list
nicosomb Jul 31, 2026
d11e23b
Merge pull request #401 from jolelievre/admin-api-version-compatibility
jolelievre Jul 31, 2026
f75178a
Add GET operation to the Customer required-fields endpoint
mattgoud Jul 9, 2026
da7e21f
Adapt tests and endpoint for minVersion 9.2.0
jolelievre Aug 3, 2026
dd8ff98
fix: break circular reference in version compatibility decorator
jolelievre Aug 3, 2026
6daa240
Merge pull request #348 from mattgoud/feat/41986-customer-required-fi…
jolelievre Aug 3, 2026
58dec6f
Add GetAttributeGroupList Admin API endpoint (rich aggregate)
PrestaEdit Jul 13, 2026
7b9d310
Address review: drop 'localized' prefix from API contract, strengthen…
PrestaEdit Jul 13, 2026
6b27d71
Address Claude review: identifier, mappings, type rename, test tighte…
PrestaEdit Jul 28, 2026
22bdf1b
Fix nested attribute field names in test and OpenAPI context
PrestaEdit Jul 28, 2026
3fea23d
Address review feedback on PR #390
PrestaEdit Jul 29, 2026
5c49f2f
Make AttributeGroupWithAttributes test resilient to fixture drift
PrestaEdit Jul 30, 2026
4aa3075
Remove .DS_Store from project .gitignore
PrestaEdit Jul 30, 2026
e2271ba
Fix nested locale keys + full-structure test (PR #390 review)
PrestaEdit Jul 31, 2026
876ea23
Rebuild AGWA test on controlled data + CS-Fixer alignment
PrestaEdit Jul 31, 2026
30b736d
Little refacto to used the LocalizedValueUpdater service from the cor…
jolelievre Aug 3, 2026
add5def
Merge pull request #390 from PrestaEdit/add-attribute-groups-with-att…
jolelievre Aug 4, 2026
da1b92e
More condensed content
kpodemski Jul 21, 2026
f883b2a
Merge pull request #405 from PrestaShop/fix-handling-open-prs-in-summ…
kpodemski Aug 4, 2026
1fb8852
Add possibility to ignore commands / queries from endpoint to create …
Aug 4, 2026
450f8e0
Add new reason to ignore commands in tracking table report and ran PH…
Aug 4, 2026
ea852df
Handle more than 100 PRs opened
kpodemski Aug 5, 2026
828f414
Make the table's content even more condensed
kpodemski Aug 5, 2026
57e79a3
Report the PR author instead of the assignee in the tracking table
kpodemski Aug 5, 2026
aad8e02
Merge pull request #406 from PrestaShop/feat/ignore-endpoints-trackin…
kpodemski Aug 5, 2026
8915ff5
Replace 9.1.x branch with 9.1.4 tag in CI
jolelievre Aug 6, 2026
d5ce5d8
Rename phpstan file for 9.1.4
jolelievre Aug 6, 2026
c10c12b
Merge pull request #407 from jolelievre/update-ci-9.1.x-to-9.1.4
jolelievre Aug 6, 2026
98f0942
Bump squizlabs/php_codesniffer from 3.7.2 to 3.13.6
dependabot[bot] Aug 8, 2026
17b0acb
Merge pull request #408 from PrestaShop/dependabot/composer/squizlabs…
Progi1984 Aug 10, 2026
ea8a3f1
Expose GetTaxRuleList as GET /tax-rules-groups/{id}/tax-rules
PrestaEdit Aug 11, 2026
19dcfdf
Gate GetTaxRuleList endpoint for PS < develop
PrestaEdit Aug 11, 2026
35afb12
Drop stray identifier annotation on TaxRuleList
PrestaEdit Aug 11, 2026
dab0125
Skip yield on PS versions missing GetTaxRuleList
PrestaEdit Aug 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
156 changes: 156 additions & 0 deletions .claude/REVIEW_PROMPT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
REPO: ${REPO}
PR NUMBER: ${PR_NUMBER}
PR TITLE: ${PR_TITLE}
PR AUTHOR: ${PR_AUTHOR}

You are performing an AI-assisted **pre-review** of a pull request on the `ps_apiresources` module.
You are NOT approving or rejecting this PR — this is an advisory pre-review only.

## Critical: read the repository guidelines first

The file `CONTEXT.md` at the repository root is the **source of truth** for all
conventions, architecture rules, property naming, mapping directions, multi-shop
handling, forbidden practices, testing expectations, and canonical examples.
**You must read `CONTEXT.md` before starting your review.** Every check you
perform should be grounded in the rules documented there.

## How to inspect the PR

**Your review must focus on the code changed in the PR — not the entire codebase.**
Start by fetching the diff and PR metadata:
- `gh pr diff $PR_NUMBER --repo $REPO` — the changed lines are your primary review scope
- `gh pr view $PR_NUMBER --repo $REPO` — PR description and metadata

Only read other files when directly referenced or imported by the changed code.
Focus on PHP and YAML files under `src/ApiPlatform/**`,
`tests/Integration/ApiPlatform/**`, and `config/**`.
Ignore `vendor/`, `*.lock`, binary files, and asset files.

**Do not explore the full repository.** Use `Grep` or `Glob` only to verify
specific conventions or check related code referenced by the diff.

## Additional references

Beyond `CONTEXT.md`, consult these external references when needed:
- Official contribution guide: https://devdocs.prestashop-project.org/9/admin-api/contribute-to-core-api/
- CQRS API guidelines ADR: https://github.com/PrestaShop/ADR/blob/master/0023-cqrs-api-guidelines.md

## Common pitfalls to watch for

These are frequent mistakes that are easy to miss — flag them explicitly:
- `QUERY_MAPPING` keys inverted (using API field name as key instead of QueryResult field name)
- Missing `CQRSQuery` on `CQRSCreate` when the full object must be returned
- Using `Response::HTTP_BAD_REQUEST` (400) instead of `HTTP_UNPROCESSABLE_ENTITY` (422) for constraint violations
- Identifier property named `$id` instead of `${entity}Id`
- Missing `#[ApiProperty(identifier: true)]` on the ID property
- `$isEnabled`, `$isActive`, `$active` instead of `$enabled`
- `$localizedNames` instead of `$names` (with `#[LocalizedValue]`)
- Custom normalizer or processor added in the module (always flag as a **hard blocker**)
- Test asserting only the identifier without checking the rest of the response fields

### Listing endpoints (`PaginatedList` / `CQRSPaginate`)

When the PR adds or modifies a list endpoint, cross-check the DTO against
the data source (see "Field alignment" in `CONTEXT.md`):

- Trace the `gridDataFactory` to its query builder; compare SQL SELECT
fields with DTO properties. Flag missing DTO properties (data the grid
returns but the API silently drops) and orphan DTO properties (no
matching query field → always `null`).
- When a SQL column name differs from the DTO property, verify an
`ApiResourceMapping` entry covers the rename.
- Check `filtersMapping` covers every filterable field whose API name
differs from the grid filter name.
- For `CQRSPaginate`: same checks, but against the CQRS query result DTO
instead of the query builder.

## Output format

Post a **single comment** using `gh pr comment $PR_NUMBER --repo $REPO` with the following
structured format. Use Markdown with `<details>` for the longer sections.
Start the comment body with `<!-- ai-prereview -->` on the very first line.

```markdown
<!-- ai-prereview -->
> 🤖 **Claude AI Pre-Review** — Automated analysis. Does not replace human review.

## 📋 Summary of changes
[2–4 sentences: which endpoint(s) are added/modified, which CQRS entity is exposed]

## ⏱️ Estimated review time
[X–Y minutes — brief justification]

## 🎯 Scope
- **Exposed operations:** GET / POST / PATCH / DELETE / list
- **CQRS entity:** [Command/Query name from the Core]
- **Integration test:** yes / no / partial

<details>
<summary>🧱 API Platform / CQRS architecture compliance</summary>

[Verify against CONTEXT.md rules: URI conventions, operation attributes, property
naming, scope naming, mapping directions, exception handling, validation groups,
multilang handling, multi-shop handling, forbidden practices]

</details>

<details>
<summary>💡 Improvement suggestions</summary>

[Actionable suggestions: naming, null guards, missing fields, etc.]

</details>

## ✅ Pre-review checklist

Check each item against the PR. Mark items as checked when compliant,
leave unchecked when violated or not applicable.
Base every check on the rules from `CONTEXT.md`.

**URI & routing**
- [ ] URI is plural, lowercase, kebab-case
- [ ] Identifier uses domain name + `Id` suffix
- [ ] Sub-resources follow parent path
- [ ] Bulk operation URI uses `bulk-` prefix and plural `Ids` parameter

**Operations & scopes**
- [ ] Correct operation attribute per HTTP method
- [ ] Scope format: `{entity_snake_case}_read` / `_write`, singular form

**API Resource properties**
- [ ] All properties strictly typed, scalars/arrays only (no Value Objects)
- [ ] Naming conventions respected (no `is` prefix, `enabled` not `active`, no `localized` prefix)
- [ ] `#[ApiProperty(identifier: true)]` on ID property
- [ ] `#[LocalizedValue]` on localized fields, `#[DefaultLanguage]` with correct `fieldName`

**CQRS mapping**
- [ ] `QUERY_MAPPING` direction: QueryResult field → API field
- [ ] `CQRSCommandMapping` direction: API field → Command parameter
- [ ] `CQRSQuery` present on `CQRSCreate`/`CQRSPartialUpdate` when full object must be returned
- [ ] No `SerializedName` — mappings only

**Forbidden practices (CI-enforced)**
- [ ] No custom normalizers or processors in the module
- [ ] No Value Objects in properties

**Exception handling & validation**
- [ ] `ConstraintException` → 422, `NotFoundException` → 404
- [ ] Correct `validationContext` groups on Create / Update operations

**Multi-shop**
- [ ] `shopIds` present and mapped if entity is shop-associated, absent otherwise
- [ ] Shop context (`[_context][shopId]`, `[_context][shopConstraint]`) passed when needed

**Listing field alignment** (when PR includes a list endpoint)
- [ ] DTO properties match fields from the grid query builder / CQRS query result
- [ ] `ApiResourceMapping` covers every name mismatch between source fields and DTO
- [ ] `filtersMapping` covers every filter name that differs from the API field name
- [ ] No orphan DTO property (property with no matching source field → always `null`)

**Integration test**
- [ ] Extends `ApiTestCase`, `@depends` chain, asserts all fields
- [ ] `testInvalid*` with `assertValidationErrors`
- [ ] `getProtectedEndpoints()` lists all URIs
- [ ] `DatabaseDump::restoreTables()` covers all affected tables
- [ ] `declare(strict_types=1)` present
```
68 changes: 68 additions & 0 deletions .claude/skills/ps-api-endpoint/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# ps-api-endpoint skill

Generates new PrestaShop Admin API endpoints for the `ps_apiresources` module — specifically, an **ApiResource PHP class** and a matching **integration test** — following the module's CQRS patterns and contribution guidelines.

## Trigger

Claude invokes this skill automatically when you express intent to:

- Add a new REST endpoint to the Admin API
- Expose a new entity via the Admin API
- Contribute a new resource to `ps_apiresources`
- Wire up a CQRS command or query to an API endpoint in PrestaShop 9

Example phrases: `"I want to add TaxRule to the API"`, `"create an endpoint for Warehouse"`, `"how do I expose AttributeGroup via the Admin API?"`

## Prerequisites

Have the following ready before invoking:

1. **Entity name** — PascalCase singular (e.g. `TaxRule`, `Warehouse`)
2. **Operations** — which HTTP methods are needed: GET, POST, PATCH, DELETE, list (paginated), bulk operations
3. **PrestaShop core path** — absolute path to a local PS 9.x checkout (e.g. `/home/user/prestashop-90x`), so the skill can discover CQRS classes. You can skip this if you already know the CQRS class names.

## What it generates

| File | Path |
|------|------|
| ApiResource class | `src/ApiPlatform/Resources/{Entity}/{Entity}.php` |
| Integration test | `tests/Integration/ApiPlatform/{Entity}EndpointTest.php` |

The **ApiResource class** contains:
- `#[ApiResource]` attribute with all requested operations (`CQRSGet`, `CQRSCreate`, `CQRSPartialUpdate`, `CQRSDelete`, `PaginatedList`)
- Public properties with strict types and Symfony validation constraints
- `QUERY_MAPPING` — maps CQRS query result fields to API response fields
- `CREATE_COMMAND_MAPPING` / `UPDATE_COMMAND_MAPPING` (or a shared `COMMAND_MAPPING`) — maps API request fields to CQRS command parameters
- OAuth2 scopes (`{entity}_read`, `{entity}_write`) and exception-to-HTTP-status mappings

The **integration test** contains:
- Full CRUD test methods chained via `@depends`
- A `testInvalid*` method covering validation errors
- `getProtectedEndpoints()` verifying all endpoints require authentication
- `setUpBeforeClass`/`tearDownAfterClass` with table restoration via `DatabaseDump`

## Usage example

```
User: I want to add a GET and POST endpoint for TaxRule.
My PS core is at /home/dev/prestashop.

Claude: [invokes ps-api-endpoint skill]
— Asks for confirmation of operations and fields
— Reads /home/dev/prestashop/src/Core/Domain/TaxRule/...
— Generates src/ApiPlatform/Resources/TaxRule/TaxRule.php
— Generates tests/Integration/ApiPlatform/TaxRuleEndpointTest.php
— Reports file locations and how to run the tests
```

## Skill file structure

```
.claude/skills/ps-api-endpoint/
├── README.md # This file — human-facing orientation
├── SKILL.md # Skill logic executed by Claude (step-by-step instructions,
│ # templates for ApiResource class and integration test)
└── references/
└── conventions.md # Naming and structural conventions (URI format, scope naming,
# property rules, mapping patterns, forbidden practices)
```
Loading
Loading