Bug #91326
closed
Upgrade to 10.x fails when using getApplicationContext in AdditionalConfiguration.php
Added by Joerg Schreiner over 4 years ago.
Updated over 1 year ago.
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"
- Private changed from No to Yes
- Private changed from Yes to No
I mark this issue as non-private so other collaborators can help.
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
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.
- Related to Bug #91325: Upgrade to 10.x fails when using getApplicationContext in AdditionalConfiguration.php added
- 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.
Also available in: Atom
PDF