Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for PHP 7.2 in 3.x branch #204

Closed
pamil opened this issue Oct 10, 2017 · 5 comments
Closed

Support for PHP 7.2 in 3.x branch #204

pamil opened this issue Oct 10, 2017 · 5 comments

Comments

@pamil
Copy link

pamil commented Oct 10, 2017

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 :)

@jeremykendall
Copy link
Owner

I don't see why we can't backport 7.2 support. @nyamsprod Thoughts?

@nyamsprod
Copy link
Collaborator

I could do it but v4 code is really old 👎 I'll give it a try .. I need to look into it we will label this as a security patch :) also it means upping to v4 for domain parser too .

@jeremykendall
Copy link
Owner

Upping to v4? Adding that conditional will cause a BC break in php-domain-parser?

@pamil
Copy link
Author

pamil commented Oct 10, 2017

Looks like thephpleague/uri can use 4.0.3-alpha without any other changes in the patch release so changes here are not really needed then :)

@pamil
Copy link
Author

pamil commented Oct 17, 2017

Not further needed since thephpleague/uri-src#41 was solved.

@pamil pamil closed this as completed Oct 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants