From 7e8e3d73d28da1842e52f0c4e505179db35988b3 Mon Sep 17 00:00:00 2001 From: PrinsFrank Date: Sat, 25 Mar 2023 18:45:37 +0100 Subject: [PATCH] Add changelog from version 1 to 2 --- UPGRADING.md | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) diff --git a/UPGRADING.md b/UPGRADING.md index 38f866e9..4f5cff6f 100644 --- a/UPGRADING.md +++ b/UPGRADING.md @@ -1,3 +1,81 @@ +# Ugrading from 1.x to 2.x + +As this package is getting adopted and more people start using it, I got some valid feedback on the readability of the standards in codebases. +- If you want to use a country code in code, you need to navigate the namespaces or know the ISO code of the spec for the country codes +- If a country has a long formal name, using the enum name may span an entire line of code decreasing readability. + +## Enum renames for readability + +Both of the above issues have been solved by renaming the different specifications for readability. If you are currently using any of these classes below, you can find/replace the name in the left one with the one on the right; + +| Old ClassName | New ClassName | +|--------------------------------|-----------------------------| +| ISO3166_1_Alpha_2 | CountryAlpha2 | +| ISO3166_1_Alpha_3 | CountryAlpha3 | +| ISO3166_1_Name | CountryName | +| ISO3166_1_Numeric | CountryNumeric | +| ITU_T_E_164 | CountryCallingCode | +| ISO4217_Alpha_3 | CurrencyAlpha3 | +| ISO4217_Name | CurrencyName | +| ISO4217_Numeric | CurrencyNumeric | +| ISO639_1_Alpha_2 | LanguageAlpha2 | +| ISO639_2_Alpha_3_Bibliographic | LanguageAlpha3Bibliographic | +| ISO639_2_Alpha_3_Common | LanguageAlpha3Common | +| ISO639_2_Alpha_3_Terminology | LanguageAlpha3Terminology | +| ISO639_Name | LanguageName | + +## Renaming of some very long Country enum cases + +Some enum cases were unnecessarily using the full country name as their name, which resulted in them taking up a full line of code. These have been renamed. If you were using any explicit names in your codebase, you should change them from their old value to the new values on the left; + +| Old name | New name | +|----------------------------------------------------------|-----------------------------------------| +| Bahamas_the | Bahamas | +| Bolivia_Plurinational_State_of | Bolivia | +| British_Indian_Ocean_Territory_the | British_Indian_Ocean_Territory | +| Cayman_Islands_the | Cayman_Islands | +| Central_African_Republic_the | Central_African_Republic | +| Cocos_Keeling_Islands_the | Cocos_Islands | +| Comoros_the | Comoros | +| Congo_the | Congo | +| Congo_the_Democratic_Republic_of_the | Congo_Democratic_Republic | +| Cook_Islands_the | Cook_Islands | +| Dominican_Republic_the | Dominican_Republic | +| Falkland_Islands_the_Malvinas | Falkland_Islands | +| Faroe_Islands_the | Faroe_Islands | +| French_Southern_Territories_the | French_Southern_Territories | +| Gambia_the | Gambia | +| Holy_See_the | Holy_See | +| Iran_Islamic_Republic_of | Iran | +| Korea_the_Democratic_People_s_Republic_of | Korea_Democratic_Peoples_Republic | +| Korea_the_Republic_of | Korea_Republic | +| Lao_People_s_Democratic_Republic_the | Lao_Peoples_Democratic_Republic | +| Marshall_Islands_the | Marshall_Islands | +| Micronesia_Federated_States_of | Micronesia | +| Moldova_the_Republic_of | Moldova | +| Netherlands_the | Netherlands | +| Niger_the | Niger | +| Northern_Mariana_Islands_the | Northern_Mariana_Islands | +| Palestine_State_of | Palestine | +| Philippines_the | Philippines | +| Russian_Federation_the | Russian_Federation | +| Saint_Helena_Ascension_and_Tristan_da_Cunha | Saint_Helena_Ascension_Tristan_da_Cunha | +| South_Georgia_and_the_South_Sandwich_Islands | South_Georgia_South_Sandwich_Islands | +| Sudan_the | Sudan | +| Svalbard_and_Jan_Mayen | Svalbard_Jan_Mayen | +| Syrian_Arab_Republic_the | Syrian_Arab_Republic | +| Tanzania_the_United_Republic_of | Tanzania | +| Turks_and_Caicos_Islands_the | Turks_and_Caicos_Islands | +| United_Arab_Emirates_the | United_Arab_Emirates | +| United_Kingdom_of_Great_Britain_and_Northern_Ireland_the | United_Kingdom | +| United_States_Minor_Outlying_Islands_the | United_States_Outlying_Islands | +| United_States_of_America_the | United_States_of_America | +| Venezuela_Bolivarian_Republic_of | Venezuela | + +## Merging of Country and CountryShort enums + +As the Country enum has now been optimized for readability, the CountryShort enums have been removed. If you were using these from release 1.6, you can simply find/replace the '/CountryShort/' namespace usages with '/Country/' + # Upgrading from 0.x to 1.x As this package reaches maturity and a first stable version is released, some breaking changes were introduced. As this package is now stable, the amount of breaking changes will be very low in the future.