Add TYPO3 extension support and package search endpoint#45
Merged
Conversation
Extend the FAIR package system with a typo3-plugin package type and a
new GET /packages/{type} search endpoint with full-text search, tag
matching, trigram fallback, and pagination.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Joost de Valk <joost@altha.nl>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Joost de Valk <joost@altha.nl>
3b73f74 to
725b1ff
Compare
Eager load relations (releases, authors, tags, metas) in search queries to avoid lazy loading violations. Remove explicit id from withSpecificTags factory since HasUuids auto-generates it. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Joost de Valk <joost@altha.nl>
SvenLie
reviewed
Mar 20, 2026
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Joost de Valk <joost@altha.nl>
10 realistic TYPO3 extensions with tags for local testing. Runs as part of db:seed and skips if TYPO3 extensions already exist. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Joost de Valk <joost@altha.nl>
The requires field now only includes 'php', making the factory generic for all package types instead of WordPress-specific. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Joost de Valk <joost@altha.nl>
Add typo3() state to PackageReleaseFactory that sets requires with typo3 version (11.5/12.4/13.4) and PHP 8.1+. Use it in the TYPO3 extension seeder for realistic test data. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Joost de Valk <joost@altha.nl>
Aligns with the FAIR protocol extension registry (fairpm/fair-protocol#63) which defines all three TYPO3 types: typo3-core, typo3-extension, typo3-theme. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Joost de Valk <joost@altha.nl>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Joost de Valk <joost@altha.nl>
chuckadams
reviewed
Mar 20, 2026
Collaborator
chuckadams
left a comment
There was a problem hiding this comment.
Looks good overall. Using DTOs isn't a hard requirement, but it does help keep the controller and service in sync as the protocol evolves.
app/Http/Controllers/API/FAIR/Packages/PackageSearchController.php
Outdated
Show resolved
Hide resolved
Replace inline Laravel validation with a beacon-hq/bag DTO, keeping the controller and service in sync as the protocol evolves. Uses #[FromRouteParameter] for the type param and #[StripExtraParameters] to match existing project conventions. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Joost de Valk <joost@altha.nl>
|
I would like to filter for TYPO3 (and then it would be also possible for Wordpress) versions. |
chuckadams
approved these changes
Mar 20, 2026
Member
Author
|
adding filter as suggested by @SvenLie |
Filter packages by platform version via ?requires[typo3]=12.4 or ?requires[php]=8.1. Matches packages with at least one release whose required version is <= the specified version, using Postgres jsonb and array comparison for dotted version strings. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Joost de Valk <joost@altha.nl>
Replace inline response()->json() with a PackageSearchResponse DTO that transforms the paginator into the response structure, keeping both input and output using the beacon-hq/bag DTO pattern. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Joost de Valk <joost@altha.nl>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Joost de Valk <joost@altha.nl>
chuckadams
approved these changes
Mar 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
typo3-coreandtypo3-extensionto thePackageTypeenum, aligning with the FAIR protocol extension registry (Add Typo3 support to Protocol Extension Registry fair-protocol#63)GET /packages/{type}search endpoint with full-text search (tsvector + GIN), tag matching, and trigram fallback for fuzzy resultsrequiresversion filter — e.g.?requires[typo3]=12.4returns packages with a release requiring TYPO3 <= 12.4PackageType::values()so future types are automatically supportedPackageSearchRequestDTO (beacon-hq/bag) for request validationSearch API
Endpoint:
GET /packages/{type}Parameters:
qrequires[key]requires[typo3]=12.4orrequires[php]=8.1. Returns packages with at least one release whose required version is <= the specified versionpageper_pageExamples:
Demo data
A
Typo3ExtensionSeederis included with 10 realistic TYPO3 extensions (News System, Powermail, Solr, Mask, etc.), each with tags and releases that include TYPO3 version requirements (11.5/12.4/13.4).Test plan
php artisan migrate— new migration applies cleanlyphp artisan test tests/Feature/API/FAIR/PackageSearchControllerTest.php— all 11 tests passphp artisan test— no regressions (157 passed)php artisan db:seed --class=Typo3ExtensionSeedercurl /packages/typo3-extensionreturns listing of seeded extensionscurl /packages/typo3-extension?q=galleryreturns matching resultscurl "/packages/typo3-extension?requires[typo3]=12.4"filters by TYPO3 version🤖 Generated with Claude Code