openrewrite / rewrite-spring

OpenRewrite recipes for Spring projects.
Apache License 2.0
237 stars 64 forks source link

Update 3.2 migration recipe to use hibernate 6.3 #514

Closed mikomatic closed 2 months ago

mikomatic commented 2 months ago

What problem are you trying to solve?

Spring Boot 3.2 updates to Hibernate 6.3 (see release notes ).

Following https://github.com/openrewrite/rewrite-hibernate/pull/23, the org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_2 recipe could leverage the new org.openrewrite.hibernate.MigrateToHibernate63 migration

Describe the solution you'd like

In the same fashion that the org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_1 depends on org.openrewrite.hibernate.MigrateToHibernate62, we could add org.openrewrite.hibernate.MigrateToHibernate63 to the org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_2 recipe

Have you considered any alternatives or workarounds?

n/a

Additional context

This new migration mostly brings migration of the hypersistence-utils dependency to compatible version of hibernate.

Are you interested in contributing this feature to OpenRewrite?

Yes i could do a PR if that is ok with you. The only question I would have is about testing. Since it's only a recipe update - adding a new depending recipe - and the new recipe is already tested in the corresponding repo, I don't know if I should add a specific test suite

timtebeek commented 2 months ago

Thanks a lot for the hint to follow through here @mikomatic ; I've gone ahead and made the required changes as it seemed silly to ask you to do so when it's just as easy for my to do it directly. Thanks for helping out!

mikomatic commented 2 months ago

@timtebeek no problem! Thank you :)