Bug #91326
closedUpgrade to 10.x fails when using getApplicationContext in AdditionalConfiguration.php
0%
Description
I have an AdditionalConfiguration.php with getApplicationContext for PROD, Staging and DEV environments with definition of different databases.
) {....)
When trying to upgrade to 10.x (10.4.1 in this case) the install process hangs in "Execute pre install tasks" forever.
No entries in log file.
Renaming/moving AdditionalConfiguration.php solves the issue.
same applies for for Environment, etc. when reenabeling AdditionalConfiguration.php after successful installation:
Hanging in: "Checking session and executing silent configuration update"
Updated by Benni Mack over 4 years ago
- Private changed from Yes to No
I mark this issue as non-private so other collaborators can help.
Updated by Joerg Schreiner over 4 years ago
Issue was the usage of
\TYPO3\CMS\Core\Utility\GeneralUtility::getApplicationContext() in AdditionalConfiguration.php.
If you do not change this to
\TYPO3\CMS\Core\Core\Environment::getContext()
BEFORE linking typo3_src to 10.x version, the update fails as mentioned above.
Background is, that getApplicationContext() is not supported in 10.x anymore.
(I haven't seen a deprecation notice in the logs before, but maybe I have overseen them.)
As one already moved to the 10.x sources before one try to start the upgrade process, it fails.
I think, there is no real chance, to prevent this behavior, but I would suggest to mention it in the upgrade advisory notes.
Joerg
Updated by Benni Mack over 4 years ago
Joerg Schreiner wrote:
Issue was the usage of
\TYPO3\CMS\Core\Utility\GeneralUtility::getApplicationContext() in AdditionalConfiguration.php.
If you do not change this to
\TYPO3\CMS\Core\Core\Environment::getContext()
BEFORE linking typo3_src to 10.x version, the update fails as mentioned above.
Background is, that getApplicationContext() is not supported in 10.x anymore.
(I haven't seen a deprecation notice in the logs before, but maybe I have overseen them.)
As one already moved to the 10.x sources before one try to start the upgrade process, it fails.
I think, there is no real chance, to prevent this behavior, but I would suggest to mention it in the upgrade advisory notes.Joerg
Hey Joerg,
I think the main issue that LocalConfiguration and AdditionalConfiguration is loaded at such an early time, that
a) deprecation is not set up yet at this stage
b) code migration or detection is not really possible.
Updated by Sybille Peters over 4 years ago
- Related to Bug #91325: Upgrade to 10.x fails when using getApplicationContext in AdditionalConfiguration.php added
Updated by Christian Kuhn over 1 year ago
- Status changed from New to Closed
I think we should close here: getApplicationContext() has been removed in v11, and v10 will not see changes in this area anymore.