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

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.

Command icon 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

star-szr created an issue. See original summary.

star-szr’s picture

Status: Active » Needs work
star-szr’s picture

Next step: In our new config enforce form, bring back the attributes defined in Drupal\config_enforce\Template\ConfigEnforceAttributesInterface so that we preserve the behaviour of our current test suite.

star-szr’s picture

Version: 2.0.x-dev » 1.0.x-dev
Issue summary: View changes

Moving to 1.0.x to consider adding deprecation notices, created #3556977: Clean up/refactor FormHelperTrait to follow up on FormHelperTrait.

star-szr’s picture

Version: 1.0.x-dev » 2.0.x-dev

Actually, we should merge the changes to 2.0.x first...

star-szr’s picture

Status: Needs work » Needs review

  • star-szr committed 4d5207bf on 2.0.x
    [#3556298] docs: Update ConfigEnforceAttributesInterface to reference...

  • star-szr committed b6936ca3 on 2.0.x
    [#3556298] refactor: Removal of old embedded enforce form code
    
star-szr’s picture

Version: 2.0.x-dev » 1.0.x-dev
Status: Needs review » Needs work

star-szr’s picture

Status: Needs work » Needs review
star-szr’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • star-szr committed a31df764 on 1.0.x
    [#3556298] chore: Only test this branch against Drupal 10
    

  • star-szr committed 872e7956 on 1.0.x
    [#3556298] docs: Add deprecations for code removed in 2.0.x branch
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.