Project

General

Profile

Actions

Bug #91326

closed

Upgrade to 10.x fails when using getApplicationContext in AdditionalConfiguration.php

Added by Joerg Schreiner almost 4 years ago. Updated 12 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Install Tool
Start date:
2020-05-07
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
7.4
Tags:
Complexity:
Is Regression:
Sprint Focus:

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"


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #91325: Upgrade to 10.x fails when using getApplicationContext in AdditionalConfiguration.phpClosed2020-05-07

Actions
Actions #1

Updated by Joerg Schreiner almost 4 years ago

  • Private changed from No to Yes
Actions #3

Updated by Benni Mack almost 4 years ago

  • Private changed from Yes to No

I mark this issue as non-private so other collaborators can help.

Actions #4

Updated by Joerg Schreiner almost 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

Actions #5

Updated by Benni Mack almost 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.

Actions #6

Updated by Sybille Peters over 3 years ago

  • Related to Bug #91325: Upgrade to 10.x fails when using getApplicationContext in AdditionalConfiguration.php added
Actions #7

Updated by Christian Kuhn 12 months 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.

Actions

Also available in: Atom PDF