Problem/Motivation
This issue is a break down of its parent task #3565209: [Meta] Drop support for Drupal 10.2 and below so that its merge request could be broken down into smaller pieces.
This is the key BC breaking issue of #3565206: [Meta] Roadplan for Admin Toolbar 3.7:
With the recent release of D11.3.0, we should be looking at creating a new LTS support minor release which will be compatible with D12.
In which case, we would be dropping support for core versions below 10.3 and thus drop support for D9.5:
Currently: ^9.5 || ^10 || ^11
Proposed: ^10.3 || ^11
This would allow us to start modernizing module's code base and leverage more recent versions of PHP and Drupal Core APIs.
Steps to reproduce
Proposed resolution
Changing the version to 10.3 minimum would imply PHP 8.1 minimum, see:
https://www.drupal.org/docs/getting-started/system-requirements/php-requ...
As per change record: Drupal 10 minimum PHP requirement raised to PHP 8.1.
Among some of the changes expected:
- Remove BC (backward compatibility) code: search for occurrences of
\Drupal::VERSION - Use PHP Attributes where possible
- Fix missing return types (void)
- More changes to be added...
Remaining tasks
User interface changes
API changes
Data model changes
Issue fork admin_toolbar-3569351
Show commands
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:
Created initial merge request !202 above at #2 which should complete the first step towards dropping support for D10.2 and below:
It contains the bare minimum, with the changes to the core version requirements and the removal of all the version_compare code for backward compatibility.
But also a few additional changes:
The Admin Toolbar Links Access Filter module can't be just removed like that from the code base....
Because users upgrading from versions lower than 10.3 might still have the module enabled.
Therefore if the module is removed from the code base it will most likely create issues for uninstalling the module.
The Admin Toolbar Links Access Filter module will have to be removed after the Admin Toolbar module has dropped support for versions lower than 10.3.
So the module will still need to be kept in the next 3.7 minor release and should be removed in the following one (maybe 3.8?!), which should probably have some kind of version constraint preventing a direct update from versions lower than 3.7 (?!).
This should prevent from having issues with sites running db updates (upgrading), unable to uninstall the module since it would have been removed from the code base.
But for the time being: All the code of the module file was removed.
Renamed the admin_toolbar_tools module library
toolbar.icontoadmin_toolbar_tools.Moved constants class
AdminToolbarToolsConstantsback under the tests folder since it now seems to be supported.Added missing return types to functions where possible.
Refactored CSS file
admin_toolbar.sticky_behavior.cssto use cascading style.Since all the jobs and tests are still passing 🟢, moving issue to Needs review for now, as an attempt to get more testing feedback and code reviews.
Feel free to let us know if you have any questions or concerns on any of the suggested code changes or this issue in general, we would surely be happy to help.
Thanks in advance! 😊