berlindb / core

All of the required core code
MIT License
253 stars 27 forks source link

Updates upgrade filter to use the upgrade version instead of the callback #54

Closed alexstandiford closed 4 years ago

alexstandiford commented 4 years ago

We could potentially use a foreach loop here, but I figured I'd keep the code as similar as it was as possible. Basically, I just changed the filter to use the key of $versions, which is the version number. Prior to this, it un-intentionally used the values of $versions, which is supposed to be the callback.

JJJ commented 4 years ago

For #53

alexstandiford commented 4 years ago

@JJJ - This makes sense. I went ahead and created a private method as you had suggested. I wasn't sure what the version number should be, so I just went with 1.0.0. If we have an actual release number to use let me know and I'll adjust.

Also, I wasn't sure where the method should go in the class. There seems to be some sense of order. I placed it just below the method that calls it. If it should go elsewhere, just let me know.

JJJ commented 4 years ago

This looks great! I'm going merge it.

I might rename/tweak after it's merged, but maybe not. 💫