Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TYPO3v12: Replace getControllerContext()->getUriBuilder() #4474

Open
cweiske opened this issue Feb 3, 2025 · 0 comments · May be fixed by #4475
Open

TYPO3v12: Replace getControllerContext()->getUriBuilder() #4474

cweiske opened this issue Feb 3, 2025 · 0 comments · May be fixed by #4475
Labels

Comments

@cweiske
Copy link

cweiske commented Feb 3, 2025

Feature Request

TYPO3v12 removed ActionController::getControllerContext() (mentioned in #2863 and the changelog).

Code that use the context to access the UriBuilder is broken now:

function showAction()
{
    $uriBuilder = $this->getControllerContext()->getUriBuilder();
}

Call to undefined method Mogic\Foo\Controllers\QuickAccessController::getControllerContext()

The docs say that each ActionController has the UriBuilder automatically available at $this->uriBuilder.

TYPO3-rector could fix those instances.

Diff

-$uriBuilder = $this->getControllerContext()->getUriBuilder();
+$uriBuilder = $this->uriBuilder;
@cweiske cweiske added the Feature label Feb 3, 2025
cweiske added a commit to mogic-le/typo3-rector that referenced this issue Feb 3, 2025
cweiske added a commit to mogic-le/typo3-rector that referenced this issue Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant