Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upFix undefined INTL_IDNA_VARIANT_UTS46 if intl ICU < 4.6 #11995
Conversation
prestonBot
added
1.7.5.x
Bug
labels
Jan 1, 2019
This comment has been minimized.
This comment has been minimized.
Hi, thanks for the explanations and for the patch @rdy4ever. I think the max version of PHP support of PrestaShop 1.7 will be PHP 7, it's already really hard to support 2 major versions of PHP I don't think it will be wise to try to support 3. Would you mind to apply the linter on your pull request?
Mickaël |
mickaelandrieu
reviewed
Jan 1, 2019
This comment has been minimized.
This comment has been minimized.
ping @eternoendless , we should consider backporting this in 1.7.5.1 of needed |
rdy4ever
dismissed
mickaelandrieu’s
stale review
via
ff0b01e
Jan 1, 2019
This comment has been minimized.
This comment has been minimized.
hi @mickaelandrieu |
This comment has been minimized.
This comment has been minimized.
OK, seems I don't know how to properly lint this. PS: I'm on Windows/VS Code |
This comment has been minimized.
This comment has been minimized.
Me too when I'm playing video games, but I use WSL (Windows Subsystem Linux) with zsh. We are not really satisfied asking everyone to fix coding styles, we're looking for a more "contributor-friendly" solution while keeping the quality of code high, more to come later :) Thanks @rdy4ever |
This comment has been minimized.
This comment has been minimized.
Both constants are different and produce a different result :/ (http://www.unicode.org/reports/tr46/#IDNAComparison%3E) |
This comment has been minimized.
This comment has been minimized.
Thanks @mickaelandrieu |
This comment has been minimized.
This comment has been minimized.
I think we need to target 1.7.5.1. @eternoendless This one is important. |
eternoendless
requested changes
Jan 2, 2019
classes/Mail.php Outdated
classes/Mail.php Outdated
eternoendless
added this to the 1.7.5.1 milestone
Jan 2, 2019
eternoendless
reviewed
Jan 2, 2019
Looks good to me |
eternoendless
added
the
waiting for QA
label
Jan 2, 2019
eternoendless
dismissed
their
stale review
via
1de0fc4
Jan 2, 2019
eternoendless
force-pushed the
rdy4ever:FIx-undefined-INTL_IDNA_VARIANT_UTS46
branch
from
77e21c1
to
1de0fc4
Jan 2, 2019
eternoendless
changed the base branch from
develop
to
1.7.5.x
Jan 2, 2019
eternoendless
reviewed
Jan 2, 2019
Rebased into 1.7.5.x and squashed |
marionf
added
QA ✔️
and removed
waiting for QA
labels
Jan 2, 2019
This comment has been minimized.
This comment has been minimized.
@rdy4ever to use PHP CS Fixer on Windows:
|
khouloudbelguith
referenced this pull request
Jan 7, 2019
Closed
bug Use of undefined constant when the website needs to send an email #11949
eumedia
referenced this pull request
Jan 7, 2019
Closed
After submitting the Contact form, it is white screen when I set both settings to ON. #12036
This comment has been minimized.
This comment has been minimized.
@rdy4ever / @eternoendless, it seems we need a push to be made on this PR in order to trigger Travis. |
PierreRambaud
dismissed
eternoendless’s
stale review
via
968a2cf
Jan 7, 2019
PierreRambaud
force-pushed the
rdy4ever:FIx-undefined-INTL_IDNA_VARIANT_UTS46
branch
from
1de0fc4
to
968a2cf
Jan 7, 2019
This comment has been minimized.
This comment has been minimized.
Done, waiting for CI :) |
Quetzacoalt91
approved these changes
Jan 8, 2019
Quetzacoalt91
merged commit 0d4177a
into
PrestaShop:1.7.5.x
Jan 8, 2019
1 check passed
This comment has been minimized.
This comment has been minimized.
Thank you all! |
rdy4ever
deleted the
rdy4ever:FIx-undefined-INTL_IDNA_VARIANT_UTS46
branch
Jan 8, 2019
MathiasReker
referenced this pull request
Jan 12, 2019
Closed
Customer can't create an account, Prestashop 1.7.5.0 #12130
Jan 12, 2019
This was referenced
rdy4ever
referenced this pull request
Jan 20, 2019
Closed
PS 1.7.5.0 - Mails issues, seem related to php intl and swiftmailer #12230
khouloudbelguith
referenced this pull request
Feb 11, 2019
Open
Impossible d'envoyer des emails en utilisant mes paramètres SMTP #12534
This comment has been minimized.
This comment has been minimized.
nataniko
commented
Feb 14, 2019
This bug is very important to fix. None of the payment methods are work in my prestashop 1.7.5.0 installation no matter php 5.6 or 7.0 |
This comment has been minimized.
This comment has been minimized.
Hi @nataniko this bug has been solved by this PR and will be shipped with patch version 1.7.5.1 which will be released very soon |
rdy4ever commentedJan 1, 2019
•
edited by eternoendless
INTL_IDNA_VARIANT_UTS46
in theidn_to_ascii
function, in order to comply with PHP 7.2 standards.However, this broke e-mail sending for servers running an outdated ICU version (< 4.6). Figures out, there are more shared hostings that run outdated ICU versions with new PHP versions than expected and we should expect to see more and more issues regarding mail sending as more people will upgrade to PS 1.7.5.0.
This PR aims to silently fix this issue. If
INTL_IDNA_VARIANT_UTS46
is defined, use it to comply with PHP 7.2 standards. If it's not defined, then use the oldINTL_IDNA_VARIANT_2003
as long as it is still supported by PHP (up to the next major release, which will be 8.0.0). In PHP 7.2.0 up to 7.4.0, usingINTL_IDNA_VARIANT_2003
will triggerE_DEPRECATED
notices while still being the default for theidn_to_ascii
function and still working. From PHP 7.4.0 up to next major release, the default will beINTL_IDNA_VARIANT_UTS46
butINTL_IDNA_VARIANT_2003
will still work with warnings. From PHP 8.0.0, we cannot longer useINTL_IDNA_VARIANT_2003
so we'll use the current default. If a server will run the outdated ICU <4.6 and PHP >= 8.0.0, an Exception will be triggered, but untill PS will be compatible with PHP 8.0 there is enough time to for most hosts to upgrade their ICU version.This change is