Skip to content

Better defaults for PHP installations with old ICU lib#2454

Merged
sagikazarmark merged 2 commits intoguzzle:6.5from
alexeyshockov:idn-conversion-fix
Dec 18, 2019
Merged

Better defaults for PHP installations with old ICU lib#2454
sagikazarmark merged 2 commits intoguzzle:6.5from
alexeyshockov:idn-conversion-fix

Conversation

@alexeyshockov
Copy link
Copy Markdown
Collaborator

@alexeyshockov alexeyshockov commented Dec 12, 2019

Fixes #2448

@GrahamCampbell
Copy link
Copy Markdown
Member

But what if the function was implemented by a pollyfill?

@alexeyshockov
Copy link
Copy Markdown
Collaborator Author

@GrahamCampbell, don't see any issues with a polyfill. If it implements idn_to_ascii(), then all should be fine. symfony/polyfill implements both the function and INTL_IDNA_VARIANT_UTS46 constant, so idn_conversion option will be true by default.

@GrahamCampbell
Copy link
Copy Markdown
Member

Maybe guzzle should always load the polyfill?

@alexeyshockov
Copy link
Copy Markdown
Collaborator Author

I think it will not help here. The original issue with 6.5.0 is about old version of ICU library (intl extension is available, just "partially"). So symfony/polyfill will not work in this case, because it discriminates things by just checking for idn_to_ascii() existence.

Creating a polyfill for exactly this case seems to be very challenging, and IMO Guzzle should not force any polyfills usage to the end developer.

Comment thread src/Client.php Outdated
Co-Authored-By: Brandon Kelly <[email protected]>
@johncarlson21
Copy link
Copy Markdown

guys this needs to be merged like now.. after my update, now I have a non working script. I'm going to manually implement this fix.

reviewtypo3org pushed a commit to TYPO3/typo3 that referenced this pull request Dec 13, 2019
Due to the INTL/ICU bug, which we
have seen on various places, Guzzle, which
does not cover our edge cases yet, ran
in the same issue as our Core versions earlier
in 2019.

See
guzzle/guzzle#2448
guzzle/guzzle#2454

For the time being, lets mark guzzle as
incompatible until Guzzle has solved the issue
and released a new version, so we can loosen
the conflict constraint.

Related: #87953
Resolves: #89904
Releases: master, 9.5, 8.7
Change-Id: If64fb9472d046f020c850cd0551beeaf78796b60
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/62606
Tested-by: TYPO3com <[email protected]>
Tested-by: Oliver Hader <[email protected]>
Reviewed-by: Oliver Hader <[email protected]>
TYPO3IncTeam pushed a commit to TYPO3-CMS/core that referenced this pull request Dec 13, 2019
Due to the INTL/ICU bug, which we
have seen on various places, Guzzle, which
does not cover our edge cases yet, ran
in the same issue as our Core versions earlier
in 2019.

See
guzzle/guzzle#2448
guzzle/guzzle#2454

For the time being, lets mark guzzle as
incompatible until Guzzle has solved the issue
and released a new version, so we can loosen
the conflict constraint.

Related: #87953
Resolves: #89904
Releases: master, 9.5, 8.7
Change-Id: If64fb9472d046f020c850cd0551beeaf78796b60
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/62606
Tested-by: TYPO3com <[email protected]>
Tested-by: Oliver Hader <[email protected]>
Reviewed-by: Oliver Hader <[email protected]>
reviewtypo3org pushed a commit to TYPO3/typo3 that referenced this pull request Dec 13, 2019
Due to the INTL/ICU bug, which we
have seen on various places, Guzzle, which
does not cover our edge cases yet, ran
in the same issue as our Core versions earlier
in 2019.

See
guzzle/guzzle#2448
guzzle/guzzle#2454

For the time being, lets mark guzzle as
incompatible until Guzzle has solved the issue
and released a new version, so we can loosen
the conflict constraint.

Related: #87953
Resolves: #89904
Releases: master, 9.5, 8.7
Change-Id: If64fb9472d046f020c850cd0551beeaf78796b60
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/62613
Tested-by: TYPO3com <[email protected]>
Tested-by: Oliver Hader <[email protected]>
Reviewed-by: Oliver Hader <[email protected]>
reviewtypo3org pushed a commit to TYPO3/typo3 that referenced this pull request Dec 13, 2019
Due to the INTL/ICU bug, which we
have seen on various places, Guzzle, which
does not cover our edge cases yet, ran
in the same issue as our Core versions earlier
in 2019.

See
guzzle/guzzle#2448
guzzle/guzzle#2454

For the time being, lets mark guzzle as
incompatible until Guzzle has solved the issue
and released a new version, so we can loosen
the conflict constraint.

Related: #87953
Resolves: #89904
Releases: master, 9.5, 8.7
Change-Id: If64fb9472d046f020c850cd0551beeaf78796b60
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/62612
Tested-by: TYPO3com <[email protected]>
Tested-by: Oliver Hader <[email protected]>
Reviewed-by: Oliver Hader <[email protected]>
TYPO3IncTeam pushed a commit to TYPO3-CMS/core that referenced this pull request Dec 13, 2019
Due to the INTL/ICU bug, which we
have seen on various places, Guzzle, which
does not cover our edge cases yet, ran
in the same issue as our Core versions earlier
in 2019.

See
guzzle/guzzle#2448
guzzle/guzzle#2454

For the time being, lets mark guzzle as
incompatible until Guzzle has solved the issue
and released a new version, so we can loosen
the conflict constraint.

Related: #87953
Resolves: #89904
Releases: master, 9.5, 8.7
Change-Id: If64fb9472d046f020c850cd0551beeaf78796b60
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/62613
Tested-by: TYPO3com <[email protected]>
Tested-by: Oliver Hader <[email protected]>
Reviewed-by: Oliver Hader <[email protected]>
TYPO3IncTeam pushed a commit to TYPO3-CMS/core that referenced this pull request Dec 13, 2019
Due to the INTL/ICU bug, which we
have seen on various places, Guzzle, which
does not cover our edge cases yet, ran
in the same issue as our Core versions earlier
in 2019.

See
guzzle/guzzle#2448
guzzle/guzzle#2454

For the time being, lets mark guzzle as
incompatible until Guzzle has solved the issue
and released a new version, so we can loosen
the conflict constraint.

Related: #87953
Resolves: #89904
Releases: master, 9.5, 8.7
Change-Id: If64fb9472d046f020c850cd0551beeaf78796b60
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/62612
Tested-by: TYPO3com <[email protected]>
Tested-by: Oliver Hader <[email protected]>
Reviewed-by: Oliver Hader <[email protected]>
@Mark-H
Copy link
Copy Markdown

Mark-H commented Dec 13, 2019

This PR indeed fixes the issue I reported in #2458.

@sagikazarmark sagikazarmark added this to the 6.5.1 milestone Dec 13, 2019
@sagikazarmark
Copy link
Copy Markdown
Member

I assume this has to be forward ported to master as well, right?

@alexeyshockov
Copy link
Copy Markdown
Collaborator Author

alexeyshockov commented Dec 14, 2019

@sagikazarmark, correct.

In master we already depend on PHP 7.2+, so the check can be simplified to function_exists('idn_to_ascii') && defined('INTL_IDNA_VARIANT_UTS46').

@jonnott
Copy link
Copy Markdown
Contributor

jonnott commented Dec 14, 2019

...so when is 6.5.1 shipping? ;)

Copy link
Copy Markdown

@ohader ohader left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good +1

@jonnott
Copy link
Copy Markdown
Contributor

jonnott commented Dec 16, 2019

Can 6.5.1 be expedited ... ? Currently anyone running CentOS 6 has broken code if using Guzzle :(

@sagikazarmark
Copy link
Copy Markdown
Member

@jonnott you can downgrade to 6.4 for the time being. 6.5.1 will be released today or tomorrow.

@sagikazarmark
Copy link
Copy Markdown
Member

@alexeyshockov can you send this (or the appropriate version) patch to master as well?

Copy link
Copy Markdown
Member

@sagikazarmark sagikazarmark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@sagikazarmark sagikazarmark merged commit 2eda2b9 into guzzle:6.5 Dec 18, 2019
@jonnott
Copy link
Copy Markdown
Contributor

jonnott commented Dec 18, 2019

@jonnott you can downgrade to 6.4 for the time being. 6.5.1 will be released today or tomorrow.

I temporarily added 'idn_conversion'=>false to all my Guzzle\Client instances instead!

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

Successfully merging this pull request may close these issues.

9 participants