- Issue created by @wim leers
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
Repurposing per #3364506-103: Add optional validation constraint support to ConfigFormBase β and [-105].
- Issue was unassigned.
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
π Introduce a new #config_target Form API property to make it super simple to use validation constraints on simple config forms, and adopt it in several core config forms Fixed landed. That means this is now only blocked on π [PP-1] Update all remaining ConfigFormBase subclasses in Drupal core to use config validation Active π
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
#5 didn't explain how we could implement this deprecation in the
>=10.2.x
world.Thanks to π Do not require the config in #config_target to be listed in getEditableConfigNames() Active , I see how we can now do that:
I propose that we make
ConfigFormBase
detect:- when
getEditableConfigNames()
returns anything other than the empty array - a deprecation is triggered in Drupal 11
Tricky thing here: for example
\Drupal\search\SearchPageListBuilder
uses not the base class, but the trait β¦ and the trait does NOT have the#config_target
functionality π€AFAICT we'll need to deprecate in Drupal 11 only
\Drupal\Core\Form\ConfigFormBase::getEditableConfigNames
, not\Drupal\Core\Form\ConfigFormBaseTrait::getEditableConfigNames
?Tricky edge case: already (thanks to #3398891), a number of subclasses do not implement that method at all, and instead
use RedundantEditableConfigNamesTrait;
. That trait will become obsolete too!Finally: is this issue now effectively a duplicate of π PP-1: Deprecate \Drupal\Core\Form\ConfigFormBase::getEditableConfigNames() - use #config_target instead Postponed ? Or vice versa?
- when
- π§πͺBelgium borisson_ Mechelen, π§πͺ
Closed π [PP-2] Follow-up for #3364506: add deprecation once all simple config forms in core implement Postponed in favor of this issue.