4.21 is out, deprecates Liquibase.update()

4.21 seems to be out, but there are no release notes, yet. Could you please add them?

I am using liquibase embedded in a Kotlin application, as described in section " Embed Liquibase into your product" here: 3 Ways to Run Liquibase

My gradle update check task alerted me of the new version, and I tried to update because it warns that 4.20 has a security flaw in one the dependencies [CVE-2022-1471].

However, after the update my build fails with a deprecated warning at Liquibase.update().
At the update() method I use, there is just a @Deprecated annotation with no hint at all what to use instead.
When follow the trail in the liquibase sources to the overloaded method that all the update variants delegate to, I find @deprecated Use CommandStep

Not that helpful :frowning:

Oh, I just noticed that there are new update() overloads which are not deprecated, all taking a Writer … and no such method has any JavaDoc :frowning:

What is this Writer? Is it used for logging? If so, how would I get a Writer from log4j2 or slf4j?

Finally, could you please update the 3 Ways to Run Liquibase to use a non-deprecated update method?

1 Like