Skip to content

make-pot prints PHP 8.5 deprecations from bundled gettext/gettext 4.x #521

Open

Description

@bealinawaz

With the current nightly (3.0.0-alpha-cee1f64) on PHP 8.5.12, wp i18n make-pot prints deprecations from the bundled gettext/gettext v4.8.12:

Deprecated: Non-canonical cast (boolean) is deprecated, use the (bool) cast instead in .../gettext/gettext/src/Merge.php on line 124
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in .../gettext/gettext/src/Extractors/PhpCode.php on line 130

The second one appears from PHP 7.4 on and is triggered by WordPress core itself ("\u{2022}", "\u{FFFD}" in wp-includes). To reproduce, run wp i18n make-pot wp-includes out.pot --ignore-domain with error_reporting=E_ALL.

The upstream PHP 8.5 fixes (php-gettext/Gettext#308) only went into v5. I've opened php-gettext/Gettext#310 against the 4.x branch. Once a 4.8.13 is tagged, a composer update here picks it up without a constraint change.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions