Closed (fixed)
Project:
Admin Toolbar
Version:
3.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
31 Jan 2026 at 03:18 UTC
Updated:
23 Nov 2026 at 21:30 UTC
Jump to comment: Most recent
As a result of the change of the minimum supported core version to 10.3 in parent issue #3565209: [Meta] Drop support for Drupal 10.2 and below, the minimum supported version of PHP should be 8.1, allowing to implement constants with PHP enum classes: Enumerations.
See how the trend is going with some Drupal core or contrib issues:
1 - Admin Toolbar Search:
2 - Admin Toolbar Tools:
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
dydave commentedQuick follow-up on this issue:
All the changes detailed in the issue summary have been implemented and described in the merge request MR !204 above at #2.
Since all the tests and jobs still seem to be passing 🟢, moving issue to Needs review as an attempt to get more testing feedback and reviews.
These changes require Drupal core 10.2 or higher and should probably be merged after related:
#3569351: Drop support for Drupal 10.2 and below
Feel free to let us know if you have any comments, questions or concerns on any aspects of this issue or the suggested changes in the merge request, we would surely be glad to help.
Thanks in advance!
Comment #4
dydave commentedComment #6
dydave commentedMerged, thanks!
The constants classes were converted to enums, following the Drupal core conventions (enums in an
Enumnamespace, UpperCamelCase cases):AdminToolbarSearchConstantsclass was removed and replaced with two backed enums inDrupal\admin_toolbar_search\Enum:AdminToolbarSearchHtmlId: the HTML IDs of the search tab, toolbar item, tray and input.AdminToolbarSearchCssClass: the CSS classes of the search field tab and input, used instead of IDs since some themes (Gin) render the toolbar twice.AdminToolbarToolsConstantsclass was replaced with two enums inDrupal\Tests\admin_toolbar_tools\Enum:AdminToolbarToolsEntityBundleOperation: the entity bundle operation keys, with alabel()method returning the expected link label.AdminToolbarToolsCssClass: the CSS classes used for testing the extra links.AdminToolbarSearchHtmlId::SearchInput->value,AdminToolbarToolsEntityBundleOperation::tryFrom(), etc.), instead of array constants. Some methods of the search JavaScript tests also got return and parameter types.Note: the
finalclassAdminToolbarSearchConstantswas internal, but it is removed from thesrcfolder of Admin Toolbar Search.All tests pass 🟢 on the tested core versions: 10.3.x, 10.6.x, 11.3.x, 11.4.x and 11.5.x.