You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
A clear and concise description of what the bug is.
If you delete a node type via drush:config:delete Drush does this completely unaware of dependencies. It should use the config dependency system to do the delete. It should also delete config entities using the config entity system not the config system.
To Reproduce
drush config:delete node.type.article
Expected behavior
I expect Drush to warn me that there are dependencies and to work out if the config entity can be removed the same way Drupal core would - see \Drupal\Core\Config\Entity\ConfigDependencyDeleteFormTrait::addDependencyListsToForm
Actual behavior
It deletes the config entity using \Drupal\Core\Config\Config::delete() which is wrong because it is entity... so none of the entity hooks fire and wrong because we don't manage dependencies.
Workaround
Nope
System Configuration
Q
A
Drush version?
12.x/11.x/10.x/8.x (please be specific, and try latest release)
Drupal version?
10.x/9.x/8.x/7.x
PHP version
8.x/7.x
OS?
Mac/Linux/Windows
Additional information
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Makes sense. I'm not sure how far we should take config edit functionality. For example, we have config:set and config:edit which also perform no validation.
Ideally Drupal core would provide a service for retrieving the changelist, similar to \Drupal\Core\Config\StorageComparer. Without the service, Drush has to get a bit tangled with the implementation.
\Drupal\Core\Config\ConfigManagerInterface::getConfigEntitiesToChangeOnDependencyRemoval() is here for you... even tells you what it is going to do when you delete the entity.
Describe the bug
A clear and concise description of what the bug is.
If you delete a node type via drush:config:delete Drush does this completely unaware of dependencies. It should use the config dependency system to do the delete. It should also delete config entities using the config entity system not the config system.
To Reproduce
drush config:delete node.type.article
Expected behavior
I expect Drush to warn me that there are dependencies and to work out if the config entity can be removed the same way Drupal core would - see \Drupal\Core\Config\Entity\ConfigDependencyDeleteFormTrait::addDependencyListsToForm
Actual behavior
It deletes the config entity using \Drupal\Core\Config\Config::delete() which is wrong because it is entity... so none of the entity hooks fire and wrong because we don't manage dependencies.
Workaround
Nope
System Configuration
Additional information
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: