---
title: "Deprecation: #92386 - Extbase property injection"
manual: "TYPO3 Core Changelog"
version: "main"
permalink: "https://docs.typo3.org/permalink/changelog:deprecation-92386"
source: "Changelog/11.0/Deprecation-92386-DeprecatedExtbasePropertyInjection.rst"
modified: "2026-09-15T10:46:36+00:00"
---

# Deprecation: #92386 - Extbase property injection

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

## Description

Since core dependency injection is in place and is about to replace the extbase dependency injection completely,
using property injection via the `@Extbase\Inject` annotation has been marked as deprecated.

## Impact

Classes that use extbase property injection will experience non injected services for properties that have a `@Extbase\Inject` annotation.

## Affected Installations

All installations that use extbase property injection via annotation `@Extbase\Inject`.

## Migration

Extbase property injection can be replaced by one of the following methods:

-   constructor injection: works both with core and extbase dependency injection and is well suited to make extensions compatible for multiple TYPO3 versions.
-   setter injection: Basically the same as constructor injection. Both the core and extbase DI can handle setter injection and both are supported in different TYPO3 versions.
-   (core) property injection: This kind of injection can be used but it requires the configuration of services via a `Services.yaml` in the `Configuration` folder of an extension.

Given the following example for a `@Extbase\Inject` annotation based injection:

```php
/**
 * @var MyService
 * @Extbase\Inject
 */
protected $myService;
```

This service injection can be changed to constructor injection by adding the
service as constructor argument and removing the `@Extbase\Inject` annotation:

```php
/**
 @var MyService
 */
protected $MyService;

public function __construct(MyService $MyService) {
   $this->myService = $myService;
}
```

Please consult the [dependency-injection](https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/ApiOverview/DependencyInjection/Index.html) documentation for more information.
