Skip to content

Support for PHP 7.2 in 3.x branch #204

Closed
@pamil

Description

Since INTL_IDNA_VARIANT_2003 variant has been deprecated in PHP 7.2, using Payum which uses League/Uri which uses this library is impossible on that version (I've listed the details here: Sylius/Sylius#8771 (comment)).

The thing I'd like to introduce in 3.0.1 release is to change idn_to_ascii and idn_to_utf8 function calls with something like:

Either:

@idn_to_ascii($part)

Or:

if (defined('INTL_IDNA_VARIANT_UTS46')) {
  $part = idn_to_ascii($part, 0, INTL_IDNA_VARIANT_UTS46);
} else {
  $part = idn_to_ascii($part);
}

Or:

if (version_compare(PHP_VERSION, '7.2.0', '>=')) {
  $part = @idn_to_ascii($part);
} else {
  $part = idn_to_ascii($part);
}

All I need to fix this is a branch based on 3.0.0 version tag available, the choice of the suitable solution, then merging a PR and releasing 3.0.1. It really would help anyone using Payum with the most recent PHP version and I'll be grateful for help :)

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions