- Issue created by @kksandr
- last update
over 1 year ago Custom Commands Failed - @kksandr opened merge request.
- Status changed to Needs review
over 1 year ago 9:07am 22 September 2023 - 🇦🇺Australia mstrelan
Can you explain the problem a little more? I can't see how this would come up, at least not in the workflow I'm used to.
- 🇦🇺Australia dpi Perth, Australia
The idea is to remove code if it matches a deleted or mistyped bundle ID. I reckon this deserves escalation to an Exception. Logs are just going to get lost.
- 🇦🇺Australia mstrelan
Who says people don't write bundle classes before creating the bundle? Maybe some day someone will write a drush command to discover bundle classes and create bundles from them. Also, what happens on config import when a new bundle (with bundle class) is imported? I think anything like this is up to core to deal with, it's no different to deleting a bundle but keeping the hook and class, except in this case you don't need to worry about the hook.
- 🇦🇺Australia dpi Perth, Australia
Good points
Also, what happens on config import when a new bundle
I imagine this wouldnt be a factor, config import and container build are different processes. Unless theres something im not aware of there.
's no different to deleting a bundle but keeping the hook and class,
Only because we dont have a hook registry, so we cant do anything intelligent. We can do better here.
- 🇦🇺Australia mstrelan
I imagine this wouldnt be a factor, config import and container build are different processes. Unless theres something im not aware of there.
When
drush deploy
runs it does the following:drush updatedb --no-cache-clear drush cache:rebuild drush config:import drush cache:rebuild drush deploy:hook
During the
drush cache:rebuild
stepbca_entity_bundle_info_alter
is invoked. Since the new bundles have not been imported yet we'd be throwing an exception here. - 🇦🇺Australia dpi Perth, Australia
Other possibilities? An entry on Drupal status page?
Can you explain the problem a little more?
In my projects, I came across the fact that we had unused bundle classes. This would help in cleaning up unnecessary code.
Who says people don't write bundle classes before creating the bundle?
I never thought about this use case. We could introduce an option in the annotation that would enable the usage check to be ignored, which is disabled by default.
An entry on Drupal status page?
Also a good option.