---
title: "Deprecation: #106405 - AbstractTypolinkBuilder->build"
manual: "TYPO3 Core Changelog"
version: "main"
permalink: "https://docs.typo3.org/permalink/changelog:deprecation-106405-1742674605"
source: "Changelog/14.0/Deprecation-106405-AbstractTypolinkBuilder-build.rst"
typo3-version: "14.0"
typo3-major: 14
type: "deprecation"
issue: 106405
forge: "https://forge.typo3.org/issues/106405"
tags: ["PHP-API", "NotScanned", "ext:frontend"]
rendered: "2026-09-20T18:31:11+00:00"
---

# Deprecation: #106405 - AbstractTypolinkBuilder->build {#deprecation-106405-1742674605}

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

## Description {#description}

The `build()` method in
`\TYPO3\CMS\Frontend\Typolink\AbstractTypolinkBuilder`
has been deprecated in favor of the new
`\TYPO3\CMS\Frontend\Typolink\TypolinkBuilderInterface`.

When creating custom TypolinkBuilder classes, the traditional approach was to:

1.  Extend `\TYPO3\CMS\Frontend\Typolink\AbstractTypolinkBuilder`
1.  Implement the `build()` method
1.  Receive dependencies via the constructor

This approach is now deprecated.
The new, recommended pattern is to implement
`TypolinkBuilderInterface`
directly.

The `ContentObjectRenderer` property in
`AbstractTypolinkBuilder`
has also been deprecated and will be removed in TYPO3 v15.0.
It should now be accessed via the `\Psr\Http\Message\ServerRequestInterface`
object instead.

## Impact {#impact}

Extension authors who have created custom TypolinkBuilder classes that extend
`AbstractTypolinkBuilder` will see
deprecation warnings when their link builders are used.

Deprecation warnings occur when:

-   A custom TypolinkBuilder class still implements the `build()` method
-   Code accesses the deprecated `$contentObjectRenderer` property
-   Dependencies are passed through the constructor instead of DI

## Affected installations {#affected-installations}

TYPO3 installations with extensions that:

-   Create custom TypolinkBuilder classes extending
    `AbstractTypolinkBuilder`
-   Override or extend the `build()` method
-   Access the `$contentObjectRenderer` property directly

## Migration {#migration}

For end users, link generation continues to work as before using either:

-   `ContentObjectRenderer`,
    method `typolink()`
-   `LinkFactory`

These public APIs are not affected and do not trigger deprecations.

For extension developers, custom TypolinkBuilder implementations should now
use the new `\TYPO3\CMS\Frontend\Typolink\TypolinkBuilderInterface`.

1.  Implement the new interface:

**Recommended migration approach**

```php
use Psr\Http\Message\ServerRequestInterface;
use TYPO3\CMS\Frontend\Typolink\AbstractTypolinkBuilder;
use TYPO3\CMS\Frontend\Typolink\LinkResultInterface;
use TYPO3\CMS\Frontend\Typolink\TypolinkBuilderInterface;

// Before (deprecated)
class MyCustomLinkBuilder extends AbstractTypolinkBuilder
{
    public function build(
        array &$linkDetails,
        string $linkText,
        string $target,
        array $conf
    ): LinkResultInterface {
        // Custom logic using $this->contentObjectRenderer
    }
}

// After (recommended)
class MyCustomLinkBuilder implements TypolinkBuilderInterface
{
    public function buildLink(
        array $linkDetails,
        array $configuration,
        ServerRequestInterface $request,
        string $linkText = ''
    ): LinkResultInterface {
        $contentObjectRenderer = $request->getAttribute(
            'currentContentObject'
        );
        // Custom logic using $contentObjectRenderer
    }
}
```

1.  Use dependency injection for required services instead of accessing them
    through global state or constructor arguments.
1.  Retrieve `ContentObjectRenderer` from the request object rather than
    the deprecated property.

All implementations of
`TypolinkBuilderInterface`
are automatically registered as **public services** in the Dependency Injection
container, so no manual service configuration is necessary.

Extensions can maintain backward compatibility during the transition by
implementing both the old `build()` and the new `buildLink()` methods.
