woylie / flop

Filtering, ordering and pagination for Ecto
MIT License
636 stars 35 forks source link

Use Ecto.ParameterizedType.init/2 to support Ecto 3.12 #489

Closed martosaur closed 4 weeks ago

martosaur commented 4 weeks ago

Ecto 3.12 changed internal representation of parameterized types. This PR contains the minimal changes to fix incompatibility. The change is backwards compatible as Ecto.ParameterizedType.init/2 existed before.

Additionally, Flop might want to change its own interface to mirror this change (e.g. from ecto_type: {:parameterized, Ecto.Enum, Ecto.Enum.init(values: [:one, :two])} to ecto_type: {:parameterized, {Ecto.Enum, Ecto.Enum.init(values: [:one, :two])}}), but my goal here was to just unblock upgrading to ecto 3.12

woylie commented 4 weeks ago

Thank you for sorting this out!