kunicmarko/sonata-annotation-bundle
A Symfony bundle that lets you configure Sonata Admin classes with PHP annotations instead of YAML or PHP config. Define admin services plus list, form, show, and datagrid fields directly in annotations, keeping your admin setup compact and close to your entities.
DatagridField and DatagridAssociationField now accept a position option, so column ordering in the datagrid is declared alongside the field rather than in separate Sonata config. This is a small but concrete confirmation that "admin layout belongs with the field declaration" is a workable ergonomic — useful evidence for the in-house convention's design, not a reason to adopt.Consider it (narrowly) when all of the following hold:
Look elsewhere — or decline — when any of these hold:
position option on datagrid fields) is a drive-by feature addition, not a signal of revival — there is still no community, no CVE coverage, and no commitment to upstream fixes. Every bug remains ours, and the release cadence is now less predictable than a hard archive, not more.Net: treat this as a reference implementation and pattern source, not an adoptable dependency. The defensible recommendation is unchanged — decline adoption, and if the problem is real for us, spend a short spike cloning the convention (field ordering included) onto native attributes.
To executives: This is a small, MIT-licensed helper that reduces repetitive back-office configuration by letting engineers describe admin screens directly on their data classes. It is cheap and does one thing well — but it has essentially no users, a single maintainer, and only sporadic fixes (the newest release is a minor field-ordering option after a long dormancy). So the recommendation is not to adopt it as a dependency. Instead, if back-office setup speed is a bottleneck, we take the idea (a few days of engineering, no license cost) and implement it on modern PHP features we control. That converts an unsupported dependency into an owned, maintainable internal convention with no vendor risk and no recurring cost.
To engineering: Scope check first — this is Symfony/Sonata Admin only, irrelevant to our Laravel services. Where it applies, it maps entity-level annotations to Sonata admin service definitions, form/datagrid field declarations, filters, and routes, replacing per-entity YAML; 1.2.1 adds a position option to DatagridField / DatagridAssociationField so column order is declared with the field. That is the whole delta — no breaking changes, no deprecations, no new framework support. It remains single-maintainer with zero dependents, so assume we own every line and every incompatibility. Proposed path: one-day spike against our Sonata version, fork and pin if we proceed, keep it behind our own bundle boundary, and target native PHP attributes as the replacement so the boundary can be deleted rather than maintained. If the spike shows the boilerplate saving — including field ordering — is under a day per quarter, we stop there and do nothing.
How can I help you explore Laravel packages today?