Skip to content

Prevent Exception from getUri() in Cli-Context#124

Open
thegass wants to merge 1 commit intonetworkteam:mainfrom
thegass:main
Open

Prevent Exception from getUri() in Cli-Context#124
thegass wants to merge 1 commit intonetworkteam:mainfrom
thegass:main

Conversation

@thegass
Copy link
Copy Markdown

@thegass thegass commented Mar 30, 2026

Additionally check if we are running in cli.
Without it cli tasks which build a fake FE/BE Request fail.

fixes #121

Additionally check if we are running in cli.
Without it cli tasks which build a fake FE/BE Request fail.
@jpmschuler
Copy link
Copy Markdown

jpmschuler commented Apr 13, 2026

FWIW: to be more precise all cli exceptions will fail, no matter if there is a BE/FE request, so even unknown command fails:
Unknown command fails to during UriLookUp:

> vendor/bin/typo3 doesnt:exist
PHP Fatal error:  Uncaught TypeError: TYPO3\CMS\Core\Http\Request::getUri(): 
Return value must be of type Psr\Http\Message\UriInterface, null returned

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Typo3Integration::setUrl() crashes with TypeError in CLI context when request has no URI

2 participants