Problem/Motivation
We should now be able to delete swaths of code from Config Enforce and Config Enforce Devel now that we are using an Off-Canvas dialog (or separate page for non-JS users) to manage enforcement settings. See #3188474: Move the config_enforce form to an off-canvas dialog.
This issue is only for Config Enforce, the Config Enforce Devel issue is: #3556243: Remove unused code after switching to off-canvas dialog form
Proposed resolution
Delete unused code.
First, #3556243: Remove unused code after switching to off-canvas dialog form needs to happen on the Config Enforce Devel side, because many classes depend on classes that we want to delete here.
Legend
- ❌ = class/method to be deleted
- ✅ = update needed
- ⚠️ = resolution unclear, needs discussion and careful handling
- 📄 = docs updates needed
Classes to deprecate in 1.x, delete in 2.x
- ❌ Drupal\config_enforce\Form\AbstractEnforceForm
- ❌ Drupal\config_enforce\Form\EnforceForm (extended by)
- ❌ Drupal\config_enforce_devel\Form\EmbeddedEnforceForm (extended by)
- ❌ Drupal\config_enforce_devel\Form\ModalEnforceForm (extended by)
- 📄 Referenced in inline docs
- ❌ Drupal\config_enforce\Form\EnforceForm
- ✅ Drupal\config_enforce\FormHandler\EnforceFormHandler (referenced by, reference to be removed)
- ✅ config_enforce_config_enforce_form_denylist() (referenced by, reference to be removed)
Methods to deprecate in 1.x, delete in 2.x
- ❌ Drupal\config_enforce\FormHandler\AbstractEnforceFormHandler::addEnforceForm()
- ✅ Drupal\config_enforce\FormHandler\EnforceFormHandler::alter() (called from, call needs to be removed)
Classes that will be refactored; likely to have methods deprecated in 1.x, deleted in 2.x
(form helper trait updates moved to #3556977: Clean up/refactor FormHelperTrait).
Other considerations
- Would it make sense to deprecate then remove
hook_config_enforce_form_denylist()?- It was added in #3164887: Implement a deny-list of spurious forms
- Should probably be addressed in a follow-up issue (to be created)
Remaining tasks
- Delete code
- Test manually
- Run automated tests and consider adding more tests
User interface changes
Should be none.
API changes
There will be removed classes, methods, etc. which we could mark as deprecated on the 1.0.x branch.
Data model changes
Should be none.
Issue fork config_enforce-3556298
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
star-szrComment #4
star-szrNext step: In our new config enforce form, bring back the attributes defined in
Drupal\config_enforce\Template\ConfigEnforceAttributesInterfaceso that we preserve the behaviour of our current test suite.Comment #5
star-szrMoving to 1.0.x to consider adding deprecation notices, created #3556977: Clean up/refactor FormHelperTrait to follow up on FormHelperTrait.
Comment #6
star-szrActually, we should merge the changes to 2.0.x first...
Comment #7
star-szrComment #10
star-szrComment #12
star-szrComment #13
star-szr