Problem/Motivation
Convert the schema.inc functions to a service so it can be injected, unit tested and swapped. Affected functions:
drupal_get_schema_versions()drupal_get_installed_schema_version()drupal_set_installed_schema_version()
This functions are like a registry for last executed update function per module which is statically cached (clean-up of drupal_static() is second win here
The remaining functions should fall into the scope of extension services and processed in #2908886: Split off schema management out of schema.inc
drupal_get_module_schema()drupal_install_schema()drupal_uninstall_schema()_drupal_schema_initialize()
Already removed in https://www.drupal.org/node/2467521
drupal_get_schema()drupal_get_complete_schema()drupal_get_schema_unprocessed()
Fixed in #3051981: Deprecate drupal_schema_get_field_value()drupal_schema_get_field_value()
Proposed resolution
Create new schema service with methods that replace the mentioned functions in schema.inc. See the API-changes.
The following functions will be deprecated:
drupal_get_schema_versions()drupal_get_installed_schema_version()drupal_set_installed_schema_version()
Remaining tasks
None
User interface changes
None
API changes
A new service called "update.update_hook_registry" is created with the following methods:
getAvailableUpdates($module)getInstalledVersion($module)setInstalledVersion($module, $version)deleteInstalledVersion($module)getAllInstalledVersions()
The service has a factory service for its creation ("update.update_hook_registry_factory").
| Comment | File | Size | Author |
|---|
Issue fork drupal-2124069
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
Comment #1
damiankloip commentedMade a start, drupal nearly installs, get a nesting level too deep error when it tries to load an entity.
Comment #2
dawehnerCan we have the db connection injected?
Comment #3
damiankloip commentedLet's try this. See what breaks.
EDIT: Sorry Daniel, cross posted that patch with your comment. I will see how this patch gets on then I can definitely inject the db, it's on my list of things to do. I just want to see how this initial bear minimum version gets on...
Comment #5
damiankloip commented3: 2124069-2.patch queued for re-testing.
Comment #7
damiankloip commentedRerolled.
Comment #9
xanoI didn't have time to do much, but I added a bare unit test and renamed one of the methods on the service (along the lines of "fooGet" to "getFoo").
Comment #11
xanoComment #13
damiankloip commentedI was hoping drupal_write_record would not live in schema.
Comment #14
xanoI'm fine with moving it to another service. Do you have anything in mind?
database?Comment #15
dawehnerI was just hoping ... we will get rid of drupal_write_record at the end anyway.
This was just a reroll for now.
Comment #17
andypostis this possible to make schema revisionable with that?
Comment #18
andypostThinking a more about schema at all I see no usable example in core for schema.
Fields and entities is going to be schema-less so schema definitions could be deployed as yml files (with own schema)
so it makes sense to implement a schema plugin manager with plugins of definitions
hook_update_hook_N()should gone as migration latter in the cycleComment #19
dawehnerJust a reroll but still failing, but less than before.
Comment #21
dawehnerRerolled.
Comment #23
ParisLiakos commenteddrupal_write_record is gone, maybe makes this easier
Comment #24
damiankloip commentedAnother reroll
Comment #26
damiankloip commentedLet's try this
Comment #28
ParisLiakos commentednice! seems it worked, it just complains about the misplaced test.
had some time, and just moved it;) lets see; this should have tests up and running
Comment #29
ParisLiakos commentedComment #31
ParisLiakos commentedgrr
Comment #32
ParisLiakos commentedLets add an interface
and move those to the interface?
we can get rid of this :D
public? protected?
Comment #34
damiankloip commentedYes, we were talking about the need to add an interface anyway. So let's go for it. Also, renamed the methods to remove schema from them.
Now needs the test coverage. I will be able to have a look later/tomorrow unless someone does it first. Might take a little while though.
Comment #35
damiankloip commentedMaybe a unit test is not really needed. This has more integration tests etc.. than you could need.
Comment #38
damiankloip commentedehm.
Comment #40
damiankloip commentedOver zealous method renaming. I think this should work better...
Comment #41
ParisLiakos commentedIn case this is rerolled:
nitpick alert: visibility missing
Besides that, i think all we need now is just a change record draft?
Comment #42
almaudoh commentedShould we typehint
SchemaInterfaceinstead?Comment #43
damiankloip commentedYes! These are good points. I added the interface then missed some clean up off the back of that.
Comment #44
dawehnerLet's add a description whether this is deprecated as of 8.0.x or 9.0.x
oh wow, now we get crazy. An interface with a variable as name :p
The variable names are a bit odd, but I guess this came up from the existing code in HEAD.
It is sad how this is not decoupled.
We were thinking whether we really still need a schema alter hook. The amount of usecases really seems to not existing any longer.
It feels like a potentially fundamental issue that storing schema cache in DB is a bad idea.
To be honest on an abstract level it is odd to have a) hook_schema() which primarily cares about table schema and hook_update_N() which cares about schema but also about arbitrary updates like potentially entity update, config changes and really what not.
You could use one line of if here. Not sure whether this is really better to understand.
Can I haz interface?
Comment #45
catch#6 I'm pretty sure that comment has been inaccurate for a long time.
Comment #46
damiankloip commentedHere are some comment cleanups, and renames etc...
I think some of the other questions are much bigger questions, and probably stuff that will not change for this release tbh.
Comment #47
damiankloip commentedOh, missed that comment in #45, will look at that.
Comment #48
damiankloip commentedComment #49
dawehnerI think this is good to go now. We have to cleanup the module handler coordinated anyway.
Comment #50
catchSorry I'm not sure about this one.
For example https://api.drupal.org/api/drupal/core%21includes%21schema.inc/function/... only has only a couple of calls in core outside of tests. Two of the calls are only clearing caches which I think leaves this one place:
https://api.drupal.org/api/drupal/core%21modules%21views%21src%21Entity%...
We need that dependency information, but I'm not sure drupal_get_schema() is the right place to get it - could we instead figure out which module defines the table in hook_views_data() and get the dependency information from that. If for example module A provides the table, but another, optional, module B provides the hook_views_data(), we're really dependent on the module B (which in turn depends on module A via the module dependency system).
If we think we can fix the views issue, then it's probably dead code. If it's not dead code for contrib then still doesn't feel like the current patch would be quite right.
Didn't check the other methods. Bumping to major since if we do deprecate the functionality as well as just the procedural functions it'd be important to communicate that to contrib.
Comment #51
cilefen commentedreroll
Comment #52
damiankloip commentedReroll and adaptation for ModuleInstaller separation.
Comment #54
damiankloip commentedComment #56
pcambraHere's a re roll with a minor fix that the testbot should like better
Comment #57
andypostMaybe better to
s/$module/$providerinSchemaInterface? this will allow to have Core providerotoh this could became extension
Comment #58
damiankloip commentedHa, yes that fix totally makes sense :)
Comment #59
amateescu commentedWhat's currentVersions? :D
Over 80 chars.
Does this method really need to exist? Its description is kinda.. funny :/
Extra newline.
If this description is accurate, I wonder why this is in a new
Drupal\Core\Schemanamespace instead ofDrupal\Core\Database.Missing (optional) and "Defaults to FALSE."
Same as above.
Comment #60
amateescu commentedAlso, this issue is tagged with "Kill includes" but schema.inc is not actually removed :(
Comment #61
dawehnerWell yeah I doubt we can get rid of the actual include files, given of the BC layer at that point.
Do we maybe choose a better name? Can't think of one, just throwing out this idea.
Comment #62
pcambraNew patch taking into account comments in #59 but not moving SchemaInterface to the Drupal\Core\Database namespace.
Comment #63
pcambraReroll after #2406131: Remove stray merge conflict marker from DbUpdateController
Comment #65
dawehnerThis still needs an issue summary as well as a change record.
Comment #66
pcambraComment #67
pcambraComment #68
pcambraComment #69
pcambraAdded CR: https://www.drupal.org/node/2444417
Comment #70
dawehnerThank you!
Comment #71
dawehnerI'm wondering a bit whether the schema service should be named database.schema or something like that, but yeah I just throw out the idea for now.
Comment #72
amateescu commentedI would like to hear what @Crell thinks about this patch.
Comment #73
dawehnerI'm pretty sure he'd like it.
Comment #74
Crell commentedA patch that moves a bunch of procedural functions into a nicely injected service? Why would I like that? :-)
Overall +1, but there are still some issues outstanding:
I fear this will get confused with the Schema object in the Database namespace. OTOH, I don't want to call it a *Manager either so maybe we just have to live with it?
Minor pedantic point: Shouldn't this leverage a "use" statement instead, per coding standards?
Wait, this is static? Really, cache system? Is there nothing we can inject instead?
I think this is pre-existing, but eek at using &-format in a foreach(). That's a land mind. If there's no alternative (a basic for loop is fine), then at least explicitly unset $module_updates afterward. There's no bug here yet, since that variable is not reused, but it's a good habit to get into if you must use foreach-&. (Or just don't use foreach-&.)
With getComplete() there's no need for this method to do double-duty. Just make $table required. If someone wants the whole schema they can call getComplete().
(The legacy procedural function can handle the if-branch for older code.)
Probably pre-existing, but array|bool is a stupid return type. If there's no versions available, return an empty array.
See: http://www.garfieldtech.com/blog/empty-return-values
Created? Don't you mean deleted?
It's not clear what the key is. This doesn't tell me enough about the return structure that I could write code against it.
Comment should be updated to reference the methods, no?
Comment #75
amateescu commented#74.1 is exactly why I wanted your opinion on this, nice to see that it's also the first thing you spotted. That probably means we have to try and find a better name for this service/class :/
Comment #76
dawehnerYeah we kinda all agree here.
Let's fix that
Yeah, good idea to fix it. Its one small DX improvement.
Neither the old code nor the new code (which is basically the same) actually returned something, so lets drop that piece of documentation.
Comment #78
dawehnerThis time a little bit more sane.
Comment #80
dawehnerThere we go.
Comment #81
pcambraComment #82
dawehnerAdapted.
Comment #83
Crell commentedDoes this need to be public? Seems like it should be an internal implementation detail of the class. Where is it called externally?
Also, dawehner and I are bikeshedding the SchemaManager name in IRC if anyone wants to join. :-P
Comment #84
dawehner@crell
... indeed, this method just used for drupal_write_record() and got removed in the meantime.
We talked about stuff and ended up with SchemaData which is at least relative similar to the way how views handles its schema like data.
Comment #86
dawehnerHa, I've seen it, but ignored it.
Comment #87
Crell commentedNow I think we're good. Thanks, dawehner and others!
Comment #88
almaudoh commenteds/
SchemaDatanterface/SchemaDataInterface. Tests pass because of IDE autocomplete :PComment #89
almaudoh commentedCNW for #88
Comment #90
catchNo-one's replied to #50 yet when I last marked this CNW from RTBC.
drupal_get_schema() is used only in tests for itself (was not quite true 5 months ago but is now), and to clear its own cache in case other code uses it (which it never does). So in my opinion that's dead code and we should either leave it where it is with a strong message, or nuke it, but not convert it to a new service.
I didn't check the other methods then and I still haven't now, but I'd be very surprised if this wasn't true for other things too. IMO the service should only include things that we actually use in core or really think should be in there. We could add a new method later as an API addition in a minor release, but we can't take any public methods out of that interface if this patch lands.
Also note that for example field, entity, cache and several other things no-longer even appear in the array returned from drupal_get_schema() any more, so the information you get from that is pretty much useless anyway.
I also wonder a bit how much the install/uninstall schema methods belong here and how much they might live directly in the module installer or a separate service. But that question is better answered when we figure out what here is dead code or not.
Comment #91
Crell commentedcatch: So you're suggesting removing this functionality entirely, or nearly so?
Comment #92
catchI think we should either:
1. Remove it entirely - but see #2447573: [meta] Make sure 8.x - 8.x hook_update_N() testing is possible which wants to use it again
OR
2. Leave it where it is with a strongly worded comment that it's not very useful and/or explicitly deprecate it.
What I don't think we should do is add a new API with that functionality which we'd then have to change again later if we remove it.
Comment #93
Crell commentedhm. If I read that issue correctly, part of the challenge is that we have so many dynamically created tables now that hook_schema (what this code fronts for) is not a reliable source of authority for what tables actually exist, thus we need to either:
1) Remove/Deprecate this code as no longer meaningful.
2) Revamp this code to actually reflect what's in the database, not what's in hook_schema. At which point it's completely different code anyway, and I think that code even exists already in the DB layer. Or if it doesn't, such code should be.
In which case, yes, just remove this code entirely and if there is introspection logic we still need that the Database layer itself doesn't offer, add it. (The linked issue seems like a good test bed to find such introspection needs.)
catch: Sound reasonable to you?
Comment #94
catchDon't think we do or ever had that unless I'm missing something. If we did have it, we could possibly use it for the field storage update comparison - right now the 'current schema' is stored in state.
You can check if a table, field or index exists, but you can't generate a schema definition automatically given a table.
Also I noticed the schemaapi defgroup in core/lib/Drupal/Core/Database/Schema.php is very outdated.
In Drupal 7 we handled field schema by a dynamic hook_schema() declaration: https://api.drupal.org/api/drupal/modules!field!modules!field_sql_storag... this was explicitly dropped as part of the entity/field schema changes. I don't think we should re-introduce that and it's not really possible with cache where they're responsible for creating their own tables and don't declare a schema to anywhere else.
Comment #95
Crell commentedHm, you're right, our introspection is minimal right now. Some drivers use(d) schema API for some dynamic queries, which I never liked. I've wanted to add better introspection to the DB layer for a while, but never had the time or impetus. If Entity API and upgradeability provides the impetus, I can see about locating someone with time. (Should be non-BC-breaking as it's just additions; maybe an addition to the interfaces but that affects all of 4 people in the world.)
That seems like a better plan than trying to shore up dynamic hook_schema().
Comment #96
catchI think the only place that has lived in https://www.drupal.org/project/schema, I considered porting that to core for #1119094: Add a test to verify the schema matches after a database update but it looked like a lot of work, then migrate made that issue less relevant.
Posted more on #2447573: [meta] Make sure 8.x - 8.x hook_update_N() testing is possible - that issue might need splitting into sub-issues one of might then require introspection.
For this issue, I think we should just leave the function where it is, maybe with @deprecated.
We can open a new issue to stop calling it in core and or remove it as 'dead code' but that's technically an API change whereas this issue isn't.
Also still note this likely is not the only function that's dead code that's being converted here, it's just the first/only one I checked.
Comment #97
dawehnerAll the drupal_*_schema_version* functions are still used by update.php. The unprocessed schema getter is used by ModuleInstaller and simpletest
but @catch is totally right, we don't support drupal_get_schema() anymore.
Let's so skip
drupal_get_schema()from this patch, kill it with fire in #2451395: drupal_get_schema()/drupal_get_complete_schema() no longer work as expected; remove them and keep the schema service as proposed in earlier versions of the patch.Comment #99
dawehnerMore fire!!!!
Comment #101
dawehner... sometimes its better to go to bed ... we call to a previously private function in drupal_get_compete_schema(),
so let's first get rid of it, see #2451395: drupal_get_schema()/drupal_get_complete_schema() no longer work as expected; remove them
Comment #102
xjmSo I agree with the major priority for #2451395: drupal_get_schema()/drupal_get_complete_schema() no longer work as expected; remove them for the reasons described in #50 -- we essentially have an API now that doesn't do what it implies it should. We should evaluate what's left here after that goes in though.
Comment #103
mgiffordOk, looks like we can proceed with this now.
Comment #104
mile23A bit of a complicated reroll, so here's an easy review to get the ball rolling again if desired:
Missing an 'I.'
Comment #106
daffie commentedRerolled.
Comment #107
daffie commentedComment #109
daffie commentedAdded the routebuilder to the ModuleInstaller class.
Comment #111
daffie commentedNext try.
Comment #113
daffie commentedReverted the changes to core/modules/system/system.install.
Comment #114
fabianx commented8.2.x - IIRC
Comment #115
daffie commentedChanged deprecated 8.0.x to 8.2.x
Comment #116
mile23Needs version info.
Also, phpcs says this:
Comment #117
daffie commentedThanks Mile23: fixed your points.
Comment #120
catchJust saw a new usage of drupal_schema_get_field_value() on an issue which reminded me of this one.
This should be in the extension system somewhere, it's got nothing to do with the schema API as such.
Same here.
Same here.
Same here.
This isn't related to install/uninstall, it could be a static method on a utility class maybe? Either way it shouldn't be on the install/uninstall-related methods.
Comment #121
mile23Comment #123
larowlanDoes anyone watching this issue know if we have one to convert the actual guts/return of
hook_schemato something that is easier to remember, i.e like the builder pattern we have for field definitions?Add
ArrayAccessto give it a BC layer.If not I'll add one - cause I can never remember the magic array keys.
Comment #124
larowlanOpened #2908735: [meta] Add value objects to represent hook_schema for #123
Comment #125
martin107 commentedHere is a reroll....
all of the changes come from the fact that core has removed all instances of array for [].
While I did it I made notes on what changes to include next...
1) When we say deprecated in 8.2.x .. the issue is so old we now mean 8.5.x
2) as stated in #120 and the issue summary ... yes we seem to have gone too far ... things that belong in extension belong in a separate issue.
I will spend a little time fixing this up next ...
Comment #126
martin107 commented1) Correcting a screw-up of mine from the reroll my phpcs.local.yml file got mixed in... removed.
2) As I mention in #125 we now deprecating in 8.5.x
3) Removed changes to functions which are out of scope. ( which should resolve all the point raised in #120 )
So tasks remaining answer #123 ... my focus is shifting to #2908886: Split off schema management out of schema.inc before I forget.
Comment #127
martin107 commentedJust making notes, as I update the issue summary
The following functions have been refactored away
drupal_get_complete_schema() --- and yet it is still talked about in the comments.
drupal_get_schema() -- mentioned in the comments and called but not defined ( see dump-database-d6/7.sh )
drupal_get_schema_unprocessed() -- refactored away no followup.
Comment #128
larowlanStill refs 8.2.x :)
We need to add a change record, and then add an @see to that (applies to all of the @deprecated tags)
We can inject this, but it would most likely be a BC break on the constructor, so probably would require setter injection. Would require a setter and then in the createInstance factory method, call the setter (entity handlers use a createInstance factory method, not create).
These changes look unrelated - bad re-roll?
we could use array_map here instead of looping and avoid the initialisation call too?
micro-optimisation though - but I don't think this is preexisting code, so figure in scope
no need for the else, the if returned already, although could be pre-existing code - if so - follow up
nice
same, this can be an if, not an elseif, the previous if returned in both code paths - but if existing code, again out of scope (follow ups for both)
nit: should use === here, we expect strings. Again...might be existing code though - if so, follow up
oh wow, never seen these classes before. These are like a mix of OO and info hooks that aren't plugins. We should create a follow up to explore moving them to plugins.
we could put this in a local variable here
same
same
same
same (sorry for listing them all, but different files)
Comment #129
larowlanActually, wouldn't require a setter because php scope.
Comment #131
MerryHamster commentedHere is an only reroll
Comment #132
MerryHamster commentedComment #133
martin107 commentedI would still like this to go in ... so Reroll.
Comment #134
mile23Doesn't match the CR.
Change to 8.6.x, and needs @see for CR. Same for other @deprecated annotations.
We should either add @trigger_error() to deprecated functions or file a follow-up if we think it'll be too disruptive.
It'd also be great to have a basic unit/kernel type test of
SchemaDatajust so we have some sanity checks. I can't find any unit-ish tests of the functions we're deprecating or any tests of the subsystem, though maybe I don't know exactly where to look.Comment #135
martin107 commentedThere are lots of unprocessed review comments ....
I think the very first next step is break the patch into two as per the issue summary.
Comment #136
martin107 commentedThis change is just cutting out "hunks" for one of the following functions
drupal_get_installed_schema_version()
drupal_set_installed_schema_version()
drupal_install_schema()
drupal_uninstall_schema()
There is lots of good work cut out ( about 50 % ) but that is going into the already created side issue.
Comment #138
mile23Thanks, @martin107.
Comment #139
martin107 commentedA) [ this covers #128.1, #134.1 and #134.2 ]
Fixed up deprecation notices and triggers - split change record into 2 separate ones.
Just for reference here is the new which belongs to the other issue
https://www.drupal.org/node/2970993
The original change record now refers to schema.data not schema.manager - but the whole thing needs some TLC which I think is best done as we get close to RTBC.
B) Fixed up some tests.
There is a place to refactor _drupal_schema_initialize() ....
as it is only called from within methods such as drupal_uninstall_schema()
I think the place is within the other issue
Still todo:-
I am going to divert my time to getting the skeleton of the other issue into shape ... just so I don't drop some work on the floor.
There is lots of unresolved substance from #128
The whole test thing needs consideration.
I think we need to whitelist some deprecation notices... but I will let testbot speak.
More is coming from me...
Comment #141
mile23The testbot says this 1,043 times:
So....
Yah let's throw the error in a follow-up rather than whitelisting, so we don't go into (more) technical debt. #2959269: [meta] Core should not trigger deprecated code except in tests and during updates
Comment #142
martin107 commentedThanks Mile23, It is awkward to carry on a conversation from september 2017.. but #128.3 and #129
Every \Drupal::service() type call in SqlContentEntityStorage and SqlContentEntityschema has a @todo next to it saying "must directly inject" ...
for example #2332857: Decide how secondary entity handlers (like storage_schema) should be instantiated
If it is a BC change then I favour deprecating the whole service and inventing a new name ... given the amount of outstanding @todos this could be very silly .. similarNameOne and then similarNameTwo is just bad.
So my response is to just directly inject here.. then depending on the reviews create a "one ring to bind them all issue" so that we can encapsulate the concerns from many issues and invent a new name for the service, just once.... I hope that does not ruffle anyones feathers.
If there is a BC change ... then WebForm is likely to be broken.
I am not finished yet... I am at the point at which I want to see testbot has to say....
Comment #143
mile23Yah I'll just stay quiet for a while. :-)
Just happy we're killing includes.
Comment #145
berdirThe trick to avoid breaking subclasses (of which those kind of base classes usually have a lot) is to make the new argument optional and then fall back to \Drupal::service() in the constructor.
Then it won't break anything if not passed in. In the passed we just wrote it as "$schema_data ?: \Drupal::service()", but you might want to do a if/else so you can do a @trigger_error() in the else case.
See also https://drupal.stackexchange.com/questions/260560/why-is-this-property-o...
Comment #146
martin107 commentedThank you both for all the expert advice.
I appreciate that https://www.drupal.org/core/deprecation insists on standardised text ..
in this case deprecating .. means that parameters will not longer be optional and therefore enforced
Please note I have had to deviate from standard text.
Lets see what testbot says to this.
Comment #148
martin107 commenteda few if comparisons, needed to be refined.
Comment #149
berdirI think the *OPTIONAL* and *ENFORCED* is a bit too much emphasis, just optional/enforced should be enough :)
Comment #151
martin107 commenteda)
In the cold light of a new day .. yes it does look like I was laying it on a bit thick...
Here is the cloest sample, suggested, text from https://www.drupal.org/core/deprecation
Enforced is also the wrong word ... as we all know that there ain't no party like a liz lemon party -- 'cos a liz lemon party is mandatory
https://www.youtube.com/watch?v=V1HkkNp5a2c
so this is what I went with
b) I have fix up the broken test [ SqlContentEntityStorageSchemaTest ]
----
From #134
That is the next step here... SqlContentEntityStorageSchemaTest is a interesting read, which I plan to copy a lot from
but in juggling my time, I am determined not to drop 50% on the patch on the floor ( see #136 )
so I am temporarily unassigning myself -- while I work on the splinter issue.
Comment #153
martin107 commentedAll tests should pass now.
Comment #154
martin107 commentedA) Removed stray install methods -- which have moved to a splinter issue.
B) Added unit testing. See SchemaDataTest.
C) One method can be static --- so I am updated it. see SchemaData::getFIeldValue()
I think all the todo list is empty... and this is ready.
Comment #155
martin107 commentedComment #157
martin107 commentedAh butterfingers - the last change I made -- did not make it into the patch
Comment #159
martin107 commentedI am not sure what I am doing wrong
the new test was developed using
./vendor/bin/phpunit -c core -vvv -debug ./core/tests/Drupal/KernelTests/Core/Schema/SchemaDataTest.php
and locally for me ... passes.
Comment #160
martin107 commented"Unexpected item in the bagging area" .. er I mean unit test found with kernel test.
Comment #162
volegerComment #163
martin107 commented@voleger thanks for pointing that out.
rerolled.
Comment #164
andypostany reason to touch empty lines?
I bet it should be 8.7.0
As new method always returns array probably better to simplify conditions
This variable needs dependency serialization trait to be never stored in serialized data
Comment #166
martin107 commented@andypost thank for so a careful review
(1)
None ... restored.
(2)
yes .. this patch is long in the tooth... fixed.
(3)
This is the section ... I want to talk about
A) drupal_get_schema_versions() maintains to old legacy mixed return type ..."Otherwise, FALSE"
Out of sync contrib modules need to be fed the old behaviour so I think we want to keep the if in place here.
otherwise fixed.
4) Fixed
Also locally, the failing test now passes
Comment #167
andypostSlightly reworked patch
- service needed only for
\Drupal\Core\Schema\SchemaDataInterface::getVersionsso should use injection- SQL entity storage can use static call of
\Drupal\Core\Schema\SchemaDataInterface::getFieldValuethis way we keep BC and this method actually does not need any injection- cleaned deprecation messages & some code clean-up
Comment #168
martin107 commentedThat was a good cleanup
andypost++
Comment #169
claudiu.cristeaNice work. Nits:
I'm not sure that we don't need a
@fileblock here.::getMock() is deprecated.
What is the purpose of this line?
I cannot find the page/docs, but I'm sure that somewhere is stated that we should avoid assert messages because, sometimes, they might confuse and make hard to understand a potential failure.
Also, needs CR update.
Comment #170
andypostUpdated IS & change record,
drupal_schema_get_field_value()probably could be moved to\Drupal\Core\Database\Schemacos it strictly about field values not schema and there's related issue #2820696: Allow schema inspection for all tables created with a valid schemaAlso
drupal_get_module_schema()should be covered in the issue but instead ofget()I think better to introducegetModule()according its arguments@claudiu.cristea #169.1 according core standards namespaced classes should not use
@filehttps://www.drupal.org/docs/develop/standards/api-documentation-and-comm...
Comment #171
andypostI renamed the method to
castValue()- it is what it does also extended tests and addressed #169 reviewChange record needs update after there will be agreement on naming and placement of SchemaData service
Comment #172
volegerRerolled
Comment #173
berdirShould do the thing with = NULL and then falling back to the service with a @trigger_error()
A service shouldn't have to use this trait, is this necessary to make test pass? we might need to inject it into something that uses it instead.
the docblock on these functions read a bit strange, a review from a native speaker would be good, but I imagine it can be simplifed to something like:
* A valid update function.
* An incorrectly named update function.
Comment #174
martin107 commented>A service shouldn't have to use this trait, is this necessary to make test pass? we might need to inject it into something that uses it instead.
After a little investigating it seems I introduced DependencySerializationTrait in #166 - see interdiff-2124069-163-166_0.txt
[ It is a bit disconcerting when you think that you are the policeman hunting criminals but then you discover that you are just revisiting the scene of your own crime ]
The two tests failing before that patch were in SqlContentEntityStorageTest
I will try and sort this out tomorrow... but I am posting now 'cos I don't want anyone else to spend time working out the whodunnit..
Comment #175
martin107 commentedRegarding #173
1) Fixed - NULL and @trigger added
2) "A service shouldn't have to use this trait...."
When I remove the unwanted trait
SqlContentEntityStorageTest passes locally
The new test SchemaDataTest passes.
I can no longer justify its inclusion .. so lets see if testbot passes without it.
3) When I look at the language the "...will be rejected" text is a information bearing addition. The "...will pass through" does not give any extra information over what can be seen by reading the code.
So I have removed those lines.
----
in addition the #173
I have fixed a minor coding standard nit regarding line length ( > 80 chars )
Comment #176
kim.pepperThis should be a specific version, ie. 8.7.0.
We can just check for NULL here as our typehinting should cover whether $schema is an instance of SchemaDataInterface.
I'm not sure about the design decision of putting static utility methods on a service class. Do we do this in other places in core?
Comment #177
martin107 commentedRegaring #176
1) Fixed .. thanks my mistake
2) Done.... I am just a person who wears both belt and braces.
3) I think this is a good idea.
Almost done ... this is where I need to start a conversation to complete the task
castValue() was moved into the Drupal utility component section under
Drupal\Core\Utility\SchemaTypecaster::castValue()
No other utility component has a unit test and I need to find a home in the directory structure for what should be cut out of SchemaDataTest
as SchemaTypeCasterTest :-
testCastValue()
providerSchemaCastValue()
Sorry to get hung up on something so trivial but there seems several likely places for a new Test directory and test namespace suggestions please?
Comment #179
martin107 commentedsmall fixes.
Comment #181
kim.pepperLots of Error: Class 'Drupal\Core\Schema\SchemaTypecaster' not found
Should it be Drupal\Component\Utility\SchemaTypecaster ?
Comment #182
martin107 commentedThanks ... and Ah crap I should have done more testing after moving things about.
Comment #184
martin107 commentedMy question in #177 was foolish .. there is a unambiguous home for the new test .
So it is trivial to complete #176.3
Both parts of the separated test pass locally now.
Comment #185
martin107 commentedAs a parting comment I was paranoid enough to check if the test infrastructure was picking up the new test. [ in the past I have seen several issues resolving an observation that test xyx was, due to namespacing errors, not actually being run ]
so here is the relevant text copied from a testbot run
Utility.Drupal\Tests\Component\Utility\SchemaTypecasterTest
✓ - testCastValue with data set #0
✓ - testCastValue with data set #1
✓ - testCastValue with data set #2
✓ - testCastValue with data set #3
✓ - testCastValue with data set #4
✓ - testCastValue with data set #5
✓ - testCastValue with data set #6
✓ - testCastValue with data set #7
✓ - testCastValue with data set #8
✓ - testCastValue with data set #9
✓ - testCastValue with data set #10
✓ - testCastValue with data set #11
Comment #186
andypostRemoved usage of deprecated
SCHEMA_UNINSTALLEDconstantClean-up messages & fix namespaces for
SchemaTypecasterWorking to add deprecation tests
Comment #187
andypostAnd tests added
Comment #188
andypostLooking on usage of
SCHEMA_UNINSTALLEDI think should go toschema.installerin #2908886: Split off schema management out of schema.incComment #189
andypostRemoved constant
Comment #190
kim.pepperRe: #189 makes sense to keep the SCHEMA_UNINSTALLED constant with SchemaInstaller. +1
Comment #192
voleger+1 for rtbc, if we are ok to go in 8.7.0
Comment #193
volegerComment #194
voleger*8.8.0
Comment #195
martin107 commentedYep, we have missed the window, 8.8.0 it is... patch coming.
Comment #196
martin107 commentedSorted.
Comment #197
martin107 commentedSorted.
Comment #198
voleger+1 for rtbc
Comment #199
kim.pepperLooking good! Just a few nitpicks:
We're not looking up schema info in here, as we are providing it. Maybe just "Use the schema info..."
Can we document what the array keys are? Or point to the docs with a @see?
Can we rename the variable to $schemaData
Can we call this getSchemaData(), getData(), getSpecification() or getSchema() ?
Comment #200
volegerJust reroll
Comment #201
volegerAddressed #119
Also added documentation for possible types of the value in SchemaTypecaster.
Comment #202
kim.pepperThanks for addressing the feedback.
This issue is still tagged with 'Needs change record updates', otherwise +1 to RTBC.
Comment #203
kim.pepperUpdated the CR so RTBC
Comment #204
claudiu.cristeaThis looks nice. However, I still have some points:
What if a contrib or custom module is doing?
The current API allows the internal cache clear but I see the new service has no method to reset the internal memory cache. I think we should allow that.
Also we should deprecate the usage of
drupal_static_reset()with'drupal_get_schema_versions'as parameter. You can check #3038908: Deprecate node_access_view_all_nodes() as an example on how is possible to deprecate that usage. Also, that would need a deprecation legacy test.Let's test also this deprecation message in the legacy test.
s/assertEquals(FALSE, ...)/assertFalse(...)
In Kernel test, using `$this->container->get()` is safe.
Nice! Tha means we didn't have coverage till now.
The difference between PHPUnit and Simpletest assert curtom messages is that in the case of PHPUnit we describe the failure, not the success. Either fix the message or simply get rid of it.
Comment #205
claudiu.cristeaComment #206
kim.pepperComment #207
kim.pepperFixes for #204
Comment #208
claudiu.cristeaLooks good, just a nit:
This description looks weird to me, could we make it more specific? Also there's a typo: s/Typecating/typecasting. I also believe that lowercase is better for the 1st letter.
Comment #209
kim.pepperThanks. Updated the wording to something more readable.
Comment #210
claudiu.cristeaPerfect.
Comment #211
claudiu.cristeaComment #212
kostyashupenkoComment #213
kim.pepperBack to RTBC
Comment #214
alexpottI don't think this belongs in a component class its just not that generic. Looking at http://grep.xnddx.ru/search?text=drupal_schema_get_field_value&filename= - the portfolio theme and a red-herring its a copy of core - and looking a core usages this method exists for one purpose - that's to solve issues in Sql entity storage with it's handling of values. I think we should consider moving it to be part of that and not generic schema API.
Comment #215
alexpottschema is new core service prefix. And it is also a very overloaded word in Drupal. Perhaps we should do database.schema or database.schema.data as a service name?
Comment #216
amateescu commentedRegarding #214, let's make it a static method on
SqlContentEntityStorageSchema, marked as@internal.Comment #217
kim.pepperRe: #214 and #216Moved to SqlContentEntityStorageSchema and updated tests.
Re: #215 changed to 'database.schema.data'
Comment #219
kim.pepperMissed a change to 'database.schema.data'.
Comment #220
amateescu commentedLooks great! Just one minor nit left:
I don't think we should introduce constants for these values, they are coming from the database schema API, so that would be the place where they should be defined.
But that's out of scope here..
Comment #221
kim.pepperThanks @amateescu. Fixes #22.
Comment #222
amateescu commentedI was surprised to see a 'top level' Schema namespace. At first, I thought a namespace like
\Drupal\Core\Database\Schemawould be more appropriate, but the$moduleargument of thegetSpecificationmethod makes me think this needs to be in the module/extension system somewhere (maybemodule_installer?), and probably renamed to something likegetTableSchemaSpecification().I think this should be a part of the new service introduced in #2908886: Split off schema management out of schema.inc, because it doesn't have anything to do with the Database Schema API..
IMO, we need more architectural discussion/decisions here.
How about opening a separate issue for deprecating
drupal_schema_get_field_value()in favor of the newSqlContentEntityStorageSchema::castValue()method? That part of the patch was at least agreed upon by Entity system maintainers.Comment #223
andypost#222.2 filed #3051981: Deprecate drupal_schema_get_field_value()
Comment #224
andypostThe #3051981: Deprecate drupal_schema_get_field_value() merged
Comment #225
vacho commentedFor contributing to this cause: patch rerolled
Comment #226
kim.pepperComment #227
alexpottNow we're adding a new service to this class we need to take of re-injecting this service after a module install. See \Drupal\Core\Extension\ModuleInstaller::updateKernel()
It's possible that someone overrides the schema data service in a module and doing this also means that the static caches in the service are cleared.
Also
drupal_get_module_schema()is supposed to be handled by this issue but although we're adding the method to the schema service we're not using it.Comment #228
kim.pepperThanks @alexpott.
Comment #230
kim.pepperI think the fail was due to keeping a reference to the service, while the container got refreshed.
Comment #232
kim.pepperI was wrong. Not sure about that fail.
Comment #233
andypostIt looks like some caching issue, btw patch removes useless return and converts test back to service
Comment #235
volegerRerolled
FIxed CS issues with deprecation messages.
Comment #236
andypostThe same time `drupal_get_module_schema()` is deprecated in #2908886: Split off schema management out of schema.inc so it makes sense to decide where it should live
Comment #239
andypostupdated summary a bit
Comment #240
cburschkaComment #241
cburschkaForward-merging across e376116380 (a commit near the date of the last patch)..9.1.x.
(This needs other fix-ups besides the reroll though.)
Comment #242
cburschkaUpdate deprecation notices (8.8.0/9.0.0 -> 9.1.0/10.0.0).
Comment #243
cburschkaNot sure I understand the reason for this string change.
Comment #246
cburschkaRemoved a deprecated usage in update.inc
Comment #247
cburschkaReverted all changes relating to
drupal_get_module_schema(), which per the issue summary is now handled by #2908886: Split off schema management out of schema.inc.Comment #248
cburschkaComment #249
cburschkaAlso removed SchemaData::getSpecification(), which was where drupal_get_module_schema() would have been moved.
Comment #250
andypost@cburschka thank you! Btw I see core using
update.post_update_registryservice with factory to register "post updates" , code inside looks pretty same and I'm ++to keep them similar - maybe instead of schemaData use UpdateSchemaRegistry?Comment #251
cburschka(moved drupal_get_installed_schema_version and drupal_set_installed_schema_version).
To be clear, do you mean a class rename of
\Drupal\Core\Schema\SchemaData -> \Drupal\Core\Update\UpdateSchemaRegistryand a service rename ofdatabase.schema.data -> update.schema_registry?Comment #252
cburschkaReplaced all the calls to the deprecated functions.
update_set_schema() made me notice that our resetCache() function breaks the normal pattern of resetting static caches:
Comment #253
andypostIt affects related #3143713: drupal_get_schema_versions() should return integer versions
Patch fixes tests and CS
Comment #254
andypostComment #255
cburschkaOoh, duh, I forgot to update the service arguments. :D
Comment #257
cburschkaFixed variable types in unit test (schema versions are strings, not ints).
Comment #258
andypostIt is integer and that's great that test now covers it, making #3143713: drupal_get_schema_versions() should return integer versions obsolete
Comment #259
andypostMoreover it could be set now in typed interface
Comment #260
cburschkaIn that case, the mocked key-value data also needs to be changed.
Comment #265
cburschkaAlso in ::testGeVersions()
Comment #266
andypostJust commented in #3143713: drupal_get_schema_versions() should return integer versions to wait for this issue, we could add todo to used upgrade path in follow up.
I find it pretty solid and mostly no conflicts with #2908886: Split off schema management out of schema.inc
Naming is only leftover to fix, thanks a lot to @cburschka
Comment #268
cburschkaFixed the remaining test failure.
Comment #269
catchMarking #2108437: drupal_get_schema_versions() has nothing to do with Schema API, rename it as duplicate.
Comment #270
andypostThere's another registry postponed #2547507: Consider adding hook_update_early_N() support
Better to keep them one place - only parsers of functions and ordering of post update hooks is different from schema update hooks
Comment #271
daffie commentedShould be
setInstalledVersion()instead ofgetInstalledVersion()in the docblock.This hunk is out of scope for this issue.
This hunk is out of scope for this issue.
We are missing a call to
resetCache().In deprecation messages we do not write "drupal:9.1.0.". Instead we use "drupal:9.1.0" without the dot on the end.
How does this work. Can somebody explain this to me. Please add documentation with the explanation to the patch.
Comment #272
cburschkaAddressed 1-5.
In (5), I assume you meant the extra dot after 10.0.0, since the dot after 9.1.0 is a sentence period.
Still needs the extra tests (6).
Looking over the code mentioned in (7)...
It appears that the test defines a fake module
drupal\tests\core\schema\undertest, and declares hook_update_N() functions for it in its own file, which are (due to the namespace) fully qualified asDrupal\Tests\Core\Schema\undertest_update_N()(which is converted to lowercase byget_defined_functions()) and therefore found by the service when looking fordrupal\tests\core\schema\undertest_update_(\d+).This doesn't really look right. It gives the tested class input which is technically not valid, and "works" because the service does not validate it at all. However, testing it with a real module would require a kernel, so it can't be done with a unit test...
Comment #273
cburschkaUploaded the interdiff twice instead of the patch.
Comment #274
andypostRe-roll after #3143713: drupal_get_schema_versions() should return integer versions
Also reverted #273.4 - reset cache no longer needed (as we get rid of old implementation)
Comment #276
cburschkaUpdating a newly added drupal_get_schema_versions() call.
Comment #277
alexpottInstead of doing this how about calling \Drupal::service('database.schema.data')->setInstalledVersion($module, $schema_version); - then we can remove \Drupal::keyValue('system.schema')->set($module, $schema_version);
Also this method update_set_schema() looks interesting and a bit dodgy.
Not in scope changes and in-correct as far as I can see.
If we're injecting it then we should use it. Also now that the service is in the container it get rebuilt on module install and uninstall. I'm pretty sure that the resetCache is not needed.
It's not necessary to inject the module handler for a list of installed modules. We can use the '%container.modules%' parameter. Less dependencies ftw.
I think this now always an int when you provide a module name - there was a recent fix for this.
Also I think we should split out getting all modules and getting a single module into different functions. Then when we decide to implement return types - and actually we could here already because this is all new - then it's simple.
Plus I think we we should use string typehints now the minimum PHP version is 7.3.
If we're using int here we definitely should use string everywhere else.
I'm not convinced that this is actually necessary in any of the runtime implementations. I think we can add it as deprecated and to be removed in Drupal 10. We need it for the BC layer.
undertest is not an english word - can we make this "under_test"
Comment #278
andypostFixes for #277 (1-2-3) to make sure cache reset is not required
Comment #279
andypostAddress #277 few more (only #5 needs work - split getter method)
4) as only module names needed, replaced (thanks, learned)
6) added string type-hint to
$module7) marked as
@internalbut it's used only in tests now - if we cache function names parsing8) replaced
Looks #7 may need more work to unify function parsing with
-
core/lib/Drupal/Core/Theme/Registry.php-
core/lib/Drupal/Core/Update/UpdateRegistry.phpBoth using pretty similar pattern with
get_defined_functions()Comment #280
kim.pepperNit:
If this a find/replace error?
Comment #281
andypostFix #280 + one more nit in the same file
Comment #282
andypostAddressed #277-5 - added type-hints and removed usage without module argument (there was only 2)
Additionally renamed
getVersions()togetAvailableUpdates()because it actually parsing update functionsComment #283
andypostQuick fix
Comment #286
andypostFix broken tests and improve docs
Also changed injection into
ModulesUninstallFormNow it needs deprecation testing to be added
Comment #288
andypostIt helped to uncover bug in upgrade tests!
When module installed it's not enough to update core.extension, it needs to setup schema (now?)
The test fails because
Schema information for module <em class="placeholder">action</em> was missing from the database. You should manually review the module updates and your database to check if any updates have been skipped up to, and including, <em class="placeholder">action_update_8000()</em>.Comment #289
alexpottI think this name is unnecessarily confusing with database schema. It's the module schema version number service. I think we should name think and the class more like \Drupal\Core\Update\UpdateRegistry and update.post_update_registry. Something like update.update_N_registry.
In fact there's functionality in \Drupal\Core\Update\UpdateRegistry that is extremely similar to the functionality here.
string $module
Services should not be attached as properties to functional tests. This means they can out of date with the container. This is especially true in a update test.
And then...
Fix all of these to use \Drupal::service() and remove the resetCache() calls.
Are we sure the resetCache is necessary here? I'd love to not add the resetCache functionality.
This should not be necessary anymore. The container has been rebuilt. We need to move the update checking code after the container rebuild that happens in $this->resetAll()
Comment #290
andypostAddress #279 (2-5) looks this only 2 places where static cache needs invalidation (both using
$this->resetCache()nowAlso
resetCache()is not removed in the patch. I wanna check make sure no other places leftComment #291
andypostAfter updates test needs fresh service instance
Comment #293
andypostRemoval of
resetCache()Comment #295
alexpottStill need to fix this name.
I think we can remove this now. There's no replacement. We could sayremove the call to resetCache() and say that a container rebuild is what you want in the very very unlikely case you need this.
http://grep.xnddx.ru/search?text=drupal_get_schema_versions&filename=
http://grep.xnddx.ru/search?text=drupal_get_installed_schema_version&fil...
There are some calls to drupal_get_installed_schema_version() that want to reset the cache but they are either from obsolete Drupal 8 modules or extremely dodgy.
This needs remooving.
I still think that this needs to be named in a way that reflects that this is a hook_update_N repository and module schema info service. And not that much to do with database schema.
Comment #296
andypost@alexpott thank you a lot for helping with reviews! Will roll new patch tonight
For naming I think better to use pattern from
UpdateRegistrybut it doing much more then registry... So maybeUpdateSchemaRegistryalso it strange to have static cache when no way to reset it... so "factory" sounds a way aheadMoreover after so many iterations it looks like the most of usages doing loop through all schema numbers, so static cache is micro-optimization (to get all values in one query, but some places needs to update few keys) - it makes sense to keep, that's why thinking about factory pattern instead.
Additionally I'm a bit confused inheritance in #2901418: Add hook_post_config_import_NAME after config import - not sure so many "abilities" needed for registry!
The common part of it is
- functions parser (update hooks, post updates) - name and sorting vary
- strict interface to set updates - numbers in "update_N" and strings for "post_update_NAME"
- static cache of all "registered values" (because used mostly in core to iterate over all list)
The issue (comment #288) with
\Drupal\Tests\action\Functional\Update\ActionConfigTestis because\Drupal\Tests\UpdatePathTestTrait::runUpdates()adds new module to module handler but does not register schemaSo as actions were partially enabled (not registered initial schema version) and
_update_fix_missing_schema()is not called from the trait the test fails.It needs own issue to be filed if scope creeps...
Comment #297
alexpott@andypost it'd be great to avoid the word schema. hook_update_dependencies() / hook_update_last_removed do not use the word schema at all and the hook_update_N() documentation (which needs an update for the multi-version compatible module / semver changes) never mentions schema with respect to what N is.
Also let's not call it a factory if it not actually a factory. A factory is something that produces other objects - it doesn't have anything to do with statics. Also there are plenty of services which have protected properties with no way to clear them other than rebuilding the container.
I definitely think a follow-up to discuss whether the static is at all useful is worth it because I'm not convinved.
Comment #298
alexpottWhy are we adding this unset? It doesn't seem required and it wasn't in the original code. Ah I see #74. Hmmm. That feels like a tricky rule to apply everywhere to core. If we're going to change this how about to something like https://3v4l.org/9gefJ
Comment #300
volegerRerolled #293
Comment #301
volegerMoved service Schema -> Update namespace. Used factory pattern to instantiate the service instance.
Used \Drupal\Core\Update\VersioningUpdateRegistry class name (feel free to suggest more correct name) and defined update.update_registry service.
The class \Drupal\Core\Update\UpdateRegistry used for defined update.post_update_registry service.
So there may be some confusion between service definitions and used class names.
See an updated MR
Comment #302
volegerUpdated the deprecation messages and addressed the items left.
Needs review
Comment #303
andypostI find it RTBC but needs other eyes on naming and action test fix
Comment #307
daffie commentedAdded a number of comments on the MR, therefore setting the issue back to NW.
Comment #308
andypostchange record needs update as IS
Comment #309
zviryatko commentedWhat the point of using
\Drupal::keyValue('system.schema')->getAll()instead of newly added\Drupal::service('update.update_registry')->getAllInstalledVersions()? In some places it still using direct access:Again, it uses both - direct and indirect access:
It means that there officially two ways to get modules schema version - direct and cached, probably it is better to leave only one way or make it very explicit? But it may still require removing the local cached variable in "@update.update_registry" as I've mentioned in the previous comment.
Very similar issue with the modules list:
it getting list of modules from
@module_handlerwhich is mutable (see\Drupal\Core\Extension\ModuleInstaller::uninstalland\Drupal\Core\Extension\ModuleInstaller::install) and it means when you call module uninstall it will change modules list in runtime but the local variable won't be changed, it is also explains why tests fails.As a solution it may require the same thing - get rid of local variables and call dependencies directly.
Comment #310
volegerThanks for the feedback. Addressed all requested changes.
Comment #311
longwave#3210502: Convert UpdateDescriptionTest to a kernel test just snuck in which calls
drupal_set_installed_schema_version()so will need updating here.Comment #312
daffie commentedThe testbot is failing Drupal\Tests\Core\Update\VersioningUpdateRegistryTest
Comment #313
longwaveWhile reviewing I noticed the existence of update_set_schema(), did some investigating and opened #3210900: Deprecate update_set_schema() for removal
Comment #314
andypostRebased
Comment #315
daffie commentedThe testbot is failing.
Comment #316
longwaveComment #317
andypostStill needs review for naming and updates for IS/CR
Comment #318
andypostLooks it it's easier to squash commits instead of merging/rebasing conflicts
Comment #319
volegerRebased and ready for the review
Comment #320
volegerComment #321
longwaveThe real unfortunate thing here is Drupal\Core\Update\UpdateRegistry being badly named - should we spin off a new issue to rename that to PostUpdateRegistry which will avoid future confusion between the two classes?
VersioningUpdateRegistry is OK but not great as I don't think we have ever used that name anywhere else? Other than "hook_update_N" do we have a name for these type of updates? Is UpdateHookRegistry better? Or SchemaVersionUpdateRegistry?
Comment #322
daffie commentedThere are a number of unresolved threads.
Comment #323
catchThis seems better to me. If we eventually have some kind of non-hook update system that relies on schema numbering the same way, it would end up outdated, but a lot would have to change at the same time so that seems fine.
This seems good as well.
Also agreed on renaming UpdateRegistry - could be a new issue though I think.
Comment #325
daffie commentedThe patch looks good to me.
It just needs updating to 9.3 for the deprecations, after that it is for me RTBC.
Comment #326
volegerAddressed last review comment.
Comment #327
longwaveAre we going to rename VersioningUpdateRegistry to something else, as per #321/#323?
Comment #328
daffie commentedThe remarks of @catch needs to be addressed.
Comment #329
volegerAddressed #327
Comment #330
daffie commentedThe testbot is failing.
Comment #331
longwaveMerged 9.3.x, fixed test failure.
Comment #332
volegerLooks good for me. I can't move to RTBC as I worked on the MR.
Also updated the title to represent the current class and service name.
Comment #333
andypostIt still needs summary and CR updates
Comment #334
daffie commentedUpdated the IS and the CR.
All the changes look good to me.
The new methods have already testing in core and new testing is added.
The deprecated function are correctly deprecated and have testing for it.
For me it is RTBC.
Comment #335
daffie commentedThe MR is not mergeable. Please do not change the MR to a patch file.
Comment #336
longwaveFixed merge conflict.
Comment #337
daffie commentedBack to RTBC.
Comment #339
catchCommitted/pushed to 9.3.x, thanks!