Closed (fixed)
Project:
Drupal core
Version:
10.3.x-dev
Component:
database update system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
7 Feb 2024 at 23:29 UTC
Updated:
29 Mar 2024 at 17:19 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #3
longwaveTests need work to accommodate this change.
Comment #4
spokjeComment #5
spokjeNope, above my brain capacity.Might have grown some brain cells.
Comment #8
spokjeComment #9
spokjeUnsure about how to deprecate the changed arguments inUpdate[Hook]Registry.There's not much to "repair" if they send a non-associative array and/or anKeyValueStoreInterfaceinstead of anKeyValueFactoryInterface.This is the best I can come up with.
Comment #10
smustgrave commentedSeems some of the deprecations are targeting 10.1
Comment #12
andypostfixed deprecations
Comment #13
smustgrave commentedMy feedback has been addressed.
Comment #16
catchCommitted/pushed to 11.x and cherry-picked to 10.3.x, thanks!
Comment #18
jurgenhaasCame across a BC in 10.3.x as Drush has the following call in
\Drush\Commands\core\DeployHookCommands::getRegistry:The throws exception is about the changed 4th argument:
Comment #21
longwaveReverted, let's rework to not break Drush.
Comment #23
spokjeAdded a BC layer for Drupal\Core\Update\UpdateRegistry::__construct(): Argument #4
Comment #24
longwaveHmm, Drush calls it with this:
but we force it to be a different collection:
I assume Drush is extending this for its custom "deploy" hooks; maybe we need to retain the factory services, but just inject the keyvalue factory into the update factory?
Comment #26
bircherI added a small change that would make Drush continue to work.
Comment #27
bircherI also created a PR for drush that should make this work regardless of what gets committed here.
Comment #28
longwave@bircher in order to make fewer changes in the constructor and also Drush what about something like:
Comment #29
bircher@longwave drush uses the post_update registry (ie
\Drupal\Core\Update\UpdateRegistry) so the suggestion in #28 will not make a difference for drush. Drush has to anyway be updated so that can override theprotected $updateTypeproperty to detect the deploy hooks with it. I would consider making this easier for drush in a follow up issue. Then drush could could use the factory or whatever we add to make this a usable API.Comment #30
longwaveOh sorry I was looking at the wrong service. But we could inject the keyvalue store directly and also set $updateType in the constructor as well? Then we make life a lot easier for Drush - and would prefer to do that here given we are already adding a deprecation, don't want to have to immediately deprecate the new changes...
Comment #31
birchergood point going back and fourth on the deprecation is not great.
Comment #32
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #33
bircherComment #34
smustgrave commentedSeems to be failing all tests with
Fatal error: Uncaught Error: Class "Symfony\Component\Config\Loader\FileLoader" not found in /builds/issue/drupal-3419914/vendor/symfony/dependency-injection/Loader/FileLoader.php:36
Comment #35
longwave@bircher the new test fails because $update_type is 'custom_update' and so this returns FALSE:
Comment #36
birchertests seem to pass now. The test now tests #35. So I think this is ready to be reviewed again.
Comment #37
smustgrave commentedSeems test issue has been resolved.
Comment #38
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #39
andypostbaseline needs changes https://www.drupal.org/node/3426891
Comment #40
andypostComment #41
smustgrave commentedRebased seems good
Imagine we are going to see a few of these with the phpstan change.
Comment #44
catchLet's try that again. Committed/pushed to 11.x and cherry-picked to 10.3.x, thanks!