Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
It is safe to use idn_to_ascii() these days due to symfony's polyfill functionality. This allows us to remove the dependency "algo26-matthias/idna-convert". Also, all other places now use the native idn_to_ascii() call, which could speed up performance. The wrapper call GeneralUtility::idnaEncode() can then safely be deprecated. used composer command: composer remove algo26-matthias/idna-convert Resolves: #87894 Releases: master Change-Id: I85aa6f39b8ff5ac171cd73218ed1144a56d9f724 Reviewed-on: https://review.typo3.org/c/60234 Reviewed-by: Benjamin Franzke <bfr@qbus.de> Reviewed-by: Stephan Großberndt <stephan.grossberndt@typo3.org> Reviewed-by: Georg Ringer <georg.ringer@gmail.com> Tested-by: TYPO3com <noreply@typo3.com> Tested-by: Benjamin Franzke <bfr@qbus.de> Tested-by: Georg Ringer <georg.ringer@gmail.com>
- Loading branch information
1 parent
2cb7009
commit d5dd942
Showing
13 changed files
with
183 additions
and
157 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
...e/Documentation/Changelog/master/Deprecation-87894-GeneralUtilityidnaEncode.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
.. include:: ../../Includes.txt | ||
|
||
================================================ | ||
Deprecation: #87894 - GeneralUtility::idnaEncode | ||
================================================ | ||
|
||
See :issue:`87894` | ||
|
||
Description | ||
=========== | ||
|
||
PHP has the native function :php:`idn_to_ascii($domain, IDNA_DEFAULT, INTL_IDNA_VARIANT_UTS46)` for converting UTF-8 based domains to ascii-based ("punicode") | ||
which is available in all supported PHP versions using :php:`"symfony/polyfill-intl-idn"`. | ||
|
||
For this reason the method :php:`GeneralUtility::idnaEncode()` has been marked as deprecated. | ||
|
||
|
||
Impact | ||
====== | ||
|
||
Calling :php:`GeneralUtility::idnaEncode()` directly will trigger a deprecation message. | ||
|
||
|
||
Affected Installations | ||
====================== | ||
|
||
Any TYPO3 installation with third-party extensions calling this method. | ||
|
||
|
||
Migration | ||
========= | ||
|
||
Use :php:`idn_to_ascii($domain, IDNA_DEFAULT, INTL_IDNA_VARIANT_UTS46);` instead. | ||
|
||
Please be aware that in contrary to :php:`GeneralUtility::idnaEncode()` the native PHP function only works on domain names, not email addresses or | ||
similar. In order to encode email addresses split the address at the last :php:`'@'` and use :php:`idn_to_ascii()` on that last part. | ||
Also, if there is an error in converting a string, a bool :php:`false` is returned. | ||
|
||
.. index:: PHP-API, FullyScanned, ext:core |
20 changes: 20 additions & 0 deletions
20
...elog/master/Important-87894-RemovedPHPDependencyAlgo26-matthiasidna-convert.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
.. include:: ../../Includes.txt | ||
|
||
======================================================================= | ||
Important: #87894 - Removed PHP dependency algo26-matthias/idna-convert | ||
======================================================================= | ||
|
||
See :issue:`87894` | ||
|
||
Description | ||
=========== | ||
|
||
PHP has native functions for converting UTF-8 based domains to ascii-based ("punicode"), which | ||
can be used directly when the PHP extension "intl" is installed. For servers with PHP packages which | ||
do not have the PHP extension "intl" installed, the symfony polyfill package "symfony/polyfill-intl-idn" | ||
is available, allowing to use native PHP functionality in the TYPO3 code base. | ||
|
||
For this reason the PHP dependency "algo26-matthias/idna-convert" is no longer necessary and | ||
has been removed. | ||
|
||
.. index:: PHP-API, ext:core |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.