Skip to content

fix!: wire up or remove config keys nothing reads - #520

Merged
markshust merged 1 commit into
developfrom
feature/wire-or-remove-dead-config
Oct 6, 2026
Merged

markshust merged 1 commit into
developfrom
feature/wire-or-remove-dead-config

Conversation

@markshust

Copy link
Copy Markdown
Collaborator

Summary

  • admin-panel.page_title: now wired up. DashboardController injects AdminPanelConfigInterface and passes getPageTitle() to admin-panel::dashboard/index as pageTitle. The latte and twig base layouts already render it in <title>; until now they always fell back to their hard-coded default.
  • admin-panel.items_per_page / AdminPanelConfig(Interface)::getItemsPerPage(): removed. The panel has no listing to paginate.
  • layout.components / layout.layouts: removed, along with packages/layout/config/layout.php (they were its only keys). Layouts and components are discovered from attributes.
  • mail.sendmail: removed. No sendmail driver ships. The driver comment now names the drivers that do ship (smtp via marko/mail-smtp, log via marko/mail-log); it used to list sendmail and array, which don't exist.
  • Removed the five matching entries from tests/config-readers-allowlist.php, and dropped the removed keys from the admin-panel docs page and the build-an-admin-panel tutorial. Added a Configuration section for page_title to the docs.

Breaking

  • AdminPanelConfigInterface::getItemsPerPage() is gone. App code that called it, or a Preference that implements the interface, has to drop that method. Apps that need a page size should read their own config key.
  • DashboardController has a new constructor argument (AdminPanelConfigInterface $config). Autowiring handles it; a subclass or a manual new must pass it.
  • config/layout.php and the mail.sendmail block no longer ship. App-level overrides of those keys are harmless; they were never read.

Test plan

  • DashboardControllerTest: a new test proves the configured admin-panel.page_title reaches the template as pageTitle
  • AdminPanelConfigTest checks that the shipped config holds only page_title
  • Layout PackageStructureTest checks that the package ships no config directory
  • ConfigReadersTest passes without the five allowlist entries
  • composer test, cs:check and phpstan all green locally

Notes

Fixes #518

🤖 Generated with Claude Code

https://claude.ai/code/session_01KyjR4cJTfro54iFZ9CWkv1

- admin-panel.page_title: DashboardController now injects
  AdminPanelConfigInterface and passes getPageTitle() to the template as
  pageTitle, which the latte/twig base layouts already render in <title>.
- admin-panel.items_per_page / getItemsPerPage(): removed. The panel has
  no listing to paginate.
- layout.components / layout.layouts: removed along with config/layout.php.
  Layouts and components are discovered from attributes.
- mail.sendmail: removed. No sendmail driver ships; the driver comment now
  names the drivers that do (smtp, log).

The matching ConfigReadersTest allowlist entries are gone, and the docs
and tutorial no longer mention the removed keys.

Fixes #518

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KyjR4cJTfro54iFZ9CWkv1
@github-actions github-actions Bot added bug Something isn't working breaking Introduces a breaking change labels Oct 6, 2026
@markshust
markshust merged commit 2485500 into develop Oct 6, 2026
5 checks passed
@markshust
markshust deleted the feature/wire-or-remove-dead-config branch October 6, 2026 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking Introduces a breaking change bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove or wire up non-security config keys that nothing reads (layout.components, layout.layouts, mail.sendmail, AdminPanelConfig accessors)

1 participant