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

Deprecation: #85759 - GeneralUtility::getHostName #1110

Closed
sabbelasichon opened this issue Nov 4, 2019 · 5 comments · Fixed by #2817
Closed

Deprecation: #85759 - GeneralUtility::getHostName #1110

sabbelasichon opened this issue Nov 4, 2019 · 5 comments · Fixed by #2817

Comments

@sabbelasichon
Copy link
Owner

Deprecation: #85759 - GeneralUtility::getHostName

https://docs.typo3.org/c/typo3/cms-core/master/en-us/Changelog/9.4/Deprecation-85759-GeneralUtilitygetHostName.html

.. include:: ../../Includes.txt

=================================================

Deprecation: #85759 - GeneralUtility::getHostName

=================================================

See :issue:85759

Description

===========

The method :php:GeneralUtility::getHostName() has been marked as deprecated and will be removed in TYPO3 v10.

Impact

======

Calling the mentioned method will trigger a PHP :php:E_USER_DEPRECATED error.

Affected Installations

======================

Third party code which accesses the method.

Migration

=========

No migration available.

.. index:: PHP-API, FullyScanned

@sabbelasichon
Copy link
Owner Author

Just copy the method over

@sabbelasichon
Copy link
Owner Author

Not worth it.

@ayacoo
Copy link
Contributor

ayacoo commented Jun 27, 2021

Short question: Why is it not worth it? Because it is not used in the community?

I would simply replace \TYPO3\CMS\Core\Utility\GeneralUtility::getHostname() with \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('HTTP_HOST')

@typoworx-de
Copy link

Such things should be noticed in @deprecated annotation.

@sabbelasichon
Copy link
Owner Author

sabbelasichon commented Feb 10, 2022

Copying \TYPO3\CMS\Core\Utility\GeneralUtility::getHostname() with \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('HTTP_HOST') over is not reflecting the whole method body. But in practice i have came to the conclusion that it should be enough to migrate it to \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('HTTP_HOST'). Let´s reopen it.

@sabbelasichon sabbelasichon reopened this Feb 10, 2022
sabbelasichon added a commit that referenced this issue Feb 27, 2022
sabbelasichon added a commit that referenced this issue Feb 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants