Skip to content

feat: add server.type filter and sort to Installation, Site, Domain#76

Merged
turegjorup merged 3 commits into
developfrom
feature/server-type-filter
May 18, 2026
Merged

feat: add server.type filter and sort to Installation, Site, Domain#76
turegjorup merged 3 commits into
developfrom
feature/server-type-filter

Conversation

@turegjorup
Copy link
Copy Markdown
Contributor

Summary

Adds a Server type (Prod / Stg / DevOps / GPU) filter and makes the Type column header sortable on /admin/installation, /admin/site, and /admin/domain.

Files Changed

  • `src/Form/Type/Admin/ServerTypeFilter.php` — handle dotted property names by joining the relation; reuse the plain relation name as the join alias so combined filter+sort produces a single JOIN
  • `src/Controller/Admin/InstallationCrudController.php` — add ServerTypeFilter::new('server.type'); make ServerTypeField sortable
  • `src/Controller/Admin/SiteCrudController.php` — same
  • `src/Controller/Admin/DomainCrudController.php` — same

Test Plan

  • `/admin/installation` — Filters → "Server type" dropdown shows Prod / Stg / DevOps / GPU; selecting `Stg` returns only stg rows.
  • Click the right-side Type column header on the same page — rows reorder by server type alphabetically.
  • Combine filter + sort: `?sort[server.type]=ASC&filters[server:type]=stg` — only stg rows, single `LEFT JOIN server` in the generated SQL (verified via Symfony profiler).
  • Repeat the filter + sort spot-check on `/admin/site` and `/admin/domain`.
  • `docker compose exec phpfpm composer tests` — 37/37 green.
  • `docker compose exec phpfpm composer coding-standards-check` clean; PHPStan clean.

turegjorup added a commit that referenced this pull request May 18, 2026
@github-actions
Copy link
Copy Markdown

API Specification - Non-breaking changes

API Changelog 1.0.0 vs. 1.0.0

No changes detected

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (develop@038dea0). Learn more about missing BASE report.

Additional details and impacted files
@@            Coverage Diff             @@
##             develop      #76   +/-   ##
==========================================
  Coverage           ?   41.63%           
  Complexity         ?      866           
==========================================
  Files              ?      125           
  Lines              ?     2738           
  Branches           ?        0           
==========================================
  Hits               ?     1140           
  Misses             ?     1598           
  Partials           ?        0           
Flag Coverage Δ
unittests 41.63% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@turegjorup turegjorup self-assigned this May 18, 2026
Adds a "Server type" dropdown filter (Prod / Stg / DevOps / GPU via
ServerTypeType::CHOICES) and makes the Type column header clickable
to sort on those three admin lists.

ServerTypeFilter learned to handle dotted property names by joining
the relation itself — EasyAdmin doesn't auto-join for filters on
nested paths (EasyCorp/EasyAdminBundle#4120).
The filter reuses the plain relation name as the join alias to match
EA's own sort-side auto-join, so combining filter + sort on the same
association produces a single JOIN in the generated SQL.
@turegjorup turegjorup force-pushed the feature/server-type-filter branch from f5d09a4 to c303c0d Compare May 18, 2026 22:43
Codecov flagged 0% patch coverage on the new dotted-path handling.
Three KernelTest cases cover:

* flat property → no JOIN, compares on root alias
* nested property → auto-LEFT-JOINs the relation under the plain alias
* nested property when the alias already exists → no duplicate JOIN
@turegjorup turegjorup merged commit 7ca65cf into develop May 18, 2026
10 checks passed
@turegjorup turegjorup deleted the feature/server-type-filter branch May 18, 2026 22:47
@turegjorup turegjorup mentioned this pull request May 18, 2026
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants