Skip to content

A2: Replace the bundled PEAR Date_Holidays; it can't run on PHP 8 #3

Open

Description

@caseysoftware

holiday/PEAR is a 2008-era copy of PEAR Date_Holidays (35 drivers, 46 filters). It can't run on PHP 8:

  • about 109 static calls to non-static methods (Date_Holidays::factory(), getInstalledDrivers(), getInstalledFilters(), isError()…), which throw Error on PHP 8
  • Driver/Japan.php L314 doesn't parse (=& new)
  • PHP 4-style constructor in its PEAR.php, and each() (removed in PHP 8)

pear/date_holidays on Packagist has had no tagged release since 2020.

Suggested: switch to Yasumi (azuyalabs/yasumi 2.12.0, Sep 2026, MIT, PHP ≥ 8.2), which has country and sub-region providers.

To decide / do:

  • Where the dependency lives: core composer.json or a module-local vendor/.
  • Upgrade step: holiday_settings.holiday_driver and holiday_filter store integer indexes into a directory listing. Map them to provider names (e.g. USA, Germany/Bavaria).
  • Check coverage: the religion-only drivers (Christian, Jewish, Islamic, EasternChristian) and Discordian/UNO have no direct country-provider equivalent.
  • Update holiday_settings.php, holiday_functions.class.php and do_holiday_aed.php, then delete holiday/PEAR.

Files: holiday/PEAR/, holiday_functions.class.php, holiday_settings.php, do_holiday_aed.php

Evidence: php -l (Japan.php) and reading the code; the bundled library wasn't executed.
Effort: L (1–2 days)

Part of #1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions