---
title: "Deprecation: #98283 - PHP Constant TYPO3_mainDir"
manual: "TYPO3 Core Changelog"
version: "main"
permalink: "https://docs.typo3.org/permalink/changelog:deprecation-98283-1662557018"
source: "Changelog/12.0/Deprecation-98283-PHPConstantTYPO3_mainDir.rst"
typo3-version: "12.0"
typo3-major: 12
type: "deprecation"
issue: 98283
forge: "https://forge.typo3.org/issues/98283"
tags: ["PHP-API", "FullyScanned", "ext:core"]
rendered: "2026-09-29T06:32:46+00:00"
---

# Deprecation: #98283 - PHP Constant TYPO3_mainDir {#deprecation-98283-1662557018}

See [forge#98283](https://forge.typo3.org/issues/98283)

## Description {#description}

The PHP Constant `TYPO3_mainDir` which is defined as `typo3/` has been marked as deprecated.

## Impact {#impact}

Accessing the constant will stop working in TYPO3 v13. No deprecation warning is thrown,
but the Extension Scanner will detect any usage in your installation.

## Affected installations {#affected-installations}

TYPO3 installations with custom third-party extensions using the constant directly, which is
highly unlikely.

## Migration {#migration}

It is recommended to use the `BackendEntryPointResolver` class when needing
to direct to the TYPO3 Backend. All other common APIs such as the Backend Router already
calculate the path automatically anyway.
