Yasumi v2.4.0 Release Notes
Release Date: 2021-05-09 // about 1 year ago-
β Added
- Georgia Provider #245 (Zurab Sardarov)
Pentecost (Sunday) to Germany #225 (Patrick-Root)
β Infection PHP to perform mutation testing.
PHPStan to the dependencies allowing for local analysis.
π
.gitattributes
file to reduce the size of a release package #237 (StΓ©phane)
π Changed
- β± Rescheduled exceptional Japanese holidays for Olympic Games 2020 after COVID-19 #240 (tanakahisateru)
π¨ Some improvements/refactoring of the Swiss holiday providers (including links to sources) #233 (Quentin Ligier)
π Allow the
WEEKEND_DATA
constant in provider classes to be overridden. #235 (Mahmood Dhia)β¬οΈ Upgraded PHPUnit's XML configuration.
π¨ Refactored removing the magic numbers for the lower and upper limits of the calendar year.
β‘οΈ Reformatted code using new/updated Code Styling rules.
Hardened error handling of json functions.
β‘οΈ Updated Copyright year.
π Fixed
- β The test for North West Territories (Canada) in that the National Indigenous Peoples Day was considered for all years: it is only celebrated since 1996.
- β The test for NovaScotia (Canada) in that novaScotiaHeritageDay was considered for all years: it is only celebrated since 2015.
- β The test for Ontario (Canada) in that IslanderDay was considered for all years: it is only celebrated since 2009.
- β± The test for Marine Day (Japan) as the rescheduled day was moved to 2021 (due to the COVID-19 pandemic).
Typo for Estonian Day of Restoration of Independence #228 (Reijo Vosu)
β The substitute holiday unit test as the use of the
at()
method will be deprecated in PHPUnit 10.Incorrect invocation of
Fribourg::calculateBerchtoldsTag()
andFribourg::calculateDecember26th
(Switzerland)π Use proper parameter and return type hinting
Replaced the
mt_rand
function with therandom_int
function as it is cryptographically insecure.Some static functions were used as if they are object functions.
β Removed
- π Travis/StyleCI/Scrutinizer services replaced by GitHub Actions.
- π PHP 7.2 Support (PHP 7.2 is EOL)
- Faker library as it has been sunset #238 (StΓ©phane)
- Native function invocations.
- Various undefined class references, unused imports, etc.
- Unnecessary curly braces in strings,
continue
keyword in while loops, typecasting.
Previous changes from v2.3.0
-
β Added
- β Added Canada Provider #215 (lux)
- β Added Luxembourg Provider #205 (Arkounay)
- Holiday providers for states of Austria. #182 (aprog)
- β Added All Souls Day to Lithuania #227 (norkunas)
- Catholic Christmas Day is a new official holiday since 2017 in the Ukraine. #202
- β Additional Dates for Australia/Victoria:AFL Grand Final Friday #190 (brucealdridge)
- Substituted holidays (holidays that fall in the weekend) for Australia. #201 (c960657)
- β Added New Years Eve to Germany #226 (Patrick-Root)
- Day of Liberation (Tag der Befreiung) is a one-time official holiday in 2020 in Berlin (Germany).
- π Catalan translations for holidays in Catalonia, Valencian Community, Balearic Islands and Aragon #189 (c960657)
- β Added American English spelling for Labour Day #216
β Added French translation for Second Christmas Day #188 (Arkounay)
β Added accessor methods Holiday::getKey() and SubstituteHoliday::getSubstitutedHoliday() #220+#221 (c960657)
β Added missing return (correct) and parameter types in various methods.
π Changed
- π Renamed the Australian states to be full names instead of abbreviations to be in line with other Holiday Providers #214
- Statehood Day is celebrated at a new date since 2020 in Croatia. #203 (krukru)
- Independence Day is no longer an official holiday since 2020 in Croatia. #203 (krukru)
- Homeland Thanksgiving Day has been renamed to "Victory and Homeland Thanksgiving Day and the Day of Croatian Defenders" since 2020 in Croatia. #203 (krukru)
- Remembrance Day for Homeland War Victims and Remembrance Day for the Victims of Vukovar and Skabrnja is a new official holiday since 2020 in Croatia. #203 (krukru)
- π· Second International Workers' Day in Ukraine was an official holiday only until 2018. #202
Holiday names in Danish, Dutch, and Norwegian are no longer capitalized. #185 (c960657)
π Changed the fallback from DEFAULT_LANGUAGE to 'en'. #183 (c960657)
π Introduced a DateTimeZoneFactory class to improve performance. This will keep a static reference to the instantiated DateTimezone, thus saving resources. #213 (pvgnd)
π Changed DateTime to DateTimeImmutable as dates should be that: immutable (by default)
Explicitly set nullable parameters as such.
π¨ Refactored various conditional structures.
π Changed signature of some methods as parameters with defaults should come after required parameters.
β‘οΈ Updated third party dependencies.
π Fixed
- π Fixed Ukraine holidays on weekends. These days need to be substituted. #202
- π Fixed issue if the next working day happens to be in the next year (i.e. not in the year of the Yasumi instance) #192 (tniemann)
- π Fix locale fallback for substitute holidays #180 (c960657)
π Fixed issue if the previous working day happens to be in the previous year (i.e. not in the year of the Yasumi instance)
π Fixed compound conditions that are always true by simplifying the condition steps.
π Deprecated
- π Deprecated direct access to public properties Holiday::$shortName and SubstituteHoliday::$substitutedHoliday in favor of accessor methods #220 (c960657)
β Removed
- π PHP 7.1 Support, as it has reached its end of life.
- β Removed the assertion of the instance type in some functions as it is already defined by the return type.
- β Removed unused variables, namespaces, brackets, empty tests, etc.