---
title: "Breaking: #90799 - Dependency injection with non-public properties has been removed"
manual: "TYPO3 Core Changelog"
version: "main"
permalink: "https://docs.typo3.org/permalink/changelog:breaking-90799"
source: "Changelog/11.0/Breaking-90799-DependencyInjectionWithNonPublicPropertiesHasBeenRemoved.rst"
typo3-version: "11.0"
typo3-major: 11
type: "breaking"
issue: 90799
forge: "https://forge.typo3.org/issues/90799"
tags: ["PHP-API", "NotScanned", "ext:extbase"]
rendered: "2026-09-24T12:29:17+00:00"
---

# Breaking: #90799 - Dependency injection with non-public properties has been removed {#breaking-90799}

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

## Description {#description}

In TYPO3 v9, the (dependency) injection via `@Inject` has been marked as deprecated for
non-public properties. The reason was to avoid having the core use the PHP reflection
api to make non-public properties writable from outside the class scope. Since there
are other methods for dependency injection (constructor/setter injection), injection
into non-public properties has now been removed.

## Impact {#impact}

Non-public properties with `@Inject` annotations will no longer trigger extbase
dependency injection. Those properties will have their default state after object
instantiation.

## Affected Installations {#affected-installations}

All installations that use non-public properties for extbase dependency injection
as seen in this example:

```php
class Foo
{
    /**
     * @var Service
     * @TYPO3\CMS\Extbase\Annotation\Inject
     */
    private $service;
}
```

## Migration {#migration}

When not using constructor/setter injection instead, switch to inject methods
(recommended for compatibility with symfony dependency injection) or mark the
property public (works with extbase dependency injection only):

```php
class Foo
{
    /**
     * @var Service
     * @TYPO3\CMS\Extbase\Annotation\Inject
     */
    public $service;
}
```
