vapor / fluent-postgres-driver

🐘 PostgreSQL driver for Fluent.
MIT License
149 stars 53 forks source link

Warn about deprecation of old config methods instead of breaking existing code #212

Closed gwynne closed 1 year ago

gwynne commented 1 year ago

Previously working code which uses the now-deprecated PostgresConfiguration type with the .postgres factory methods (rather than its replacement, SQLPostgresConfiguration) while specifying neither a data encoder or decoder was throwing compiler errors. Such code now issues the intended deprecation warning instead, while continuing to work as before.

Fixes #211

codecov-commenter commented 1 year ago

Codecov Report

Merging #212 (034271f) into main (c7e3976) will decrease coverage by 15.06%. The diff coverage is 46.19%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #212 +/- ## =========================================== - Coverage 76.55% 61.49% -15.06% =========================================== Files 7 8 +1 Lines 354 348 -6 =========================================== - Hits 271 214 -57 - Misses 83 134 +51 ``` | [Impacted Files](https://app.codecov.io/gh/vapor/fluent-postgres-driver/pull/212?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor) | Coverage Δ | | |---|---|---| | [...s/FluentPostgresDriver/DatabaseID+PostgreSQL.swift](https://app.codecov.io/gh/vapor/fluent-postgres-driver/pull/212?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor#diff-U291cmNlcy9GbHVlbnRQb3N0Z3Jlc0RyaXZlci9EYXRhYmFzZUlEK1Bvc3RncmVTUUwuc3dpZnQ=) | `0.00% <0.00%> (ø)` | | | [...tions/FluentPostgresConfiguration+Deprecated.swift](https://app.codecov.io/gh/vapor/fluent-postgres-driver/pull/212?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor#diff-U291cmNlcy9GbHVlbnRQb3N0Z3Jlc0RyaXZlci9EZXByZWNhdGlvbnMvRmx1ZW50UG9zdGdyZXNDb25maWd1cmF0aW9uK0RlcHJlY2F0ZWQuc3dpZnQ=) | `0.00% <0.00%> (ø)` | | | [...ntPostgresDriver/FluentPostgresConfiguration.swift](https://app.codecov.io/gh/vapor/fluent-postgres-driver/pull/212?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor#diff-U291cmNlcy9GbHVlbnRQb3N0Z3Jlc0RyaXZlci9GbHVlbnRQb3N0Z3Jlc0NvbmZpZ3VyYXRpb24uc3dpZnQ=) | `36.76% <43.47%> (-7.50%)` | :arrow_down: | | [...uentPostgresDriver/PostgresConverterDelegate.swift](https://app.codecov.io/gh/vapor/fluent-postgres-driver/pull/212?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor#diff-U291cmNlcy9GbHVlbnRQb3N0Z3Jlc0RyaXZlci9Qb3N0Z3Jlc0NvbnZlcnRlckRlbGVnYXRlLnN3aWZ0) | `72.54% <66.66%> (ø)` | | | [.../FluentPostgresDriver/FluentPostgresDatabase.swift](https://app.codecov.io/gh/vapor/fluent-postgres-driver/pull/212?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor#diff-U291cmNlcy9GbHVlbnRQb3N0Z3Jlc0RyaXZlci9GbHVlbnRQb3N0Z3Jlc0RhdGFiYXNlLnN3aWZ0) | `84.81% <78.18%> (-7.01%)` | :arrow_down: | | [...es/FluentPostgresDriver/PostgresRow+Database.swift](https://app.codecov.io/gh/vapor/fluent-postgres-driver/pull/212?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor#diff-U291cmNlcy9GbHVlbnRQb3N0Z3Jlc0RyaXZlci9Qb3N0Z3Jlc1JvdytEYXRhYmFzZS5zd2lmdA==) | `85.71% <85.71%> (-4.03%)` | :arrow_down: | | [...es/FluentPostgresDriver/FluentPostgresDriver.swift](https://app.codecov.io/gh/vapor/fluent-postgres-driver/pull/212?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor#diff-U291cmNlcy9GbHVlbnRQb3N0Z3Jlc0RyaXZlci9GbHVlbnRQb3N0Z3Jlc0RyaXZlci5zd2lmdA==) | `100.00% <100.00%> (+15.38%)` | :arrow_up: | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/vapor/fluent-postgres-driver/pull/212/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor)
VaporBot commented 1 year ago

These changes are now available in 2.7.2