Yasumi v2.4.0 Release Notes

Release Date: 2021-05-09 // 6 months ago
  • βž• Added

    • Georgia Provider #245 (Zurab Sardarov)
    • Pentecost (Sunday) to Germany #225 (Patrick-Root)

    • πŸ‘ PHP8 Support #238 (StΓ©phane)

    • βœ… 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() and Fribourg::calculateDecember26th (Switzerland)

    • πŸ‘‰ Use proper parameter and return type hinting

    • Replaced the mt_rand function with the random_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.