Skip to content

48472: Fix fatal error with celtic/lti 5.4.4 and later - #12185

Merged
Saaweel merged 1 commit into
ILIAS-eLearning:release_10from
surlabs:ilias10_LTI_fix_celtic_5_4
Oct 8, 2026
Merged

Saaweel merged 1 commit into
ILIAS-eLearning:release_10from
surlabs:ilias10_LTI_fix_celtic_5_4

Conversation

@Saaweel

@Saaweel Saaweel commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Reported in Mantis 48472: updating the composer dependencies stops with a fatal error.

PHP Fatal error:  Declaration of ilLTITool::handleRequest(?bool $strictMode = null, bool $disableCookieCheck = false, bool $generateWarnings = false): void must be compatible with ceLTIc\LTI\Tool::handleRequest(?bool $strictMode = null, bool $disableCookieCheck = false, bool $generateWarnings = false): never

Since celtic/lti 5.4.4, Tool::handleRequest() is declared as never, and ilLTITool overrides it with void. The ^5.0.0 constraint allows any 5.x release, so composer update installs 5.4.7 and the setup stops while building the artifacts.

Fix

ilLTITool no longer overrides handleRequest(). The preparation of the request and the exit handling added in #12104 move unchanged to a new processRequest(), which ilAuthProviderLTI calls instead. As nothing overrides the library method anymore, its return type no longer matters, and the behaviour is the same as with the shipped 5.4.3.

There are no changes to composer.json or composer.lock.

A correction to the description of #12104: the exit handling relies on the behaviour of celtic/lti 5.4.0 and later, which stores the response before ending the request. 5.3.x prints it itself, so it must not be combined with that change. composer.lock ships 5.4.3.

Testing

  • The changed classes were checked against celtic/lti 5.4.3 and 5.4.7: the class loads with both (5.4.7 gave the fatal error before), a valid launch returns control to ILIAS, an invalid one ends the request, and an error page without return URL is sent once.
  • The same change was verified live on ILIAS 11.4 as LTI provider with 5.4.3 and 5.4.7 (48472: Fix blank page on LTI launches and fatal error with celtic/lti 5.4.4 #12184): launches redirect to the course, invalid signatures go back to the platform, and composer update celtic/lti builds all artifacts.
  • php-cs-fixer reports no violations.

@Saaweel Saaweel added bugfix php Pull requests that update Php code labels Oct 8, 2026
@Saaweel Saaweel self-assigned this Oct 8, 2026
@Saaweel
Saaweel merged commit 5808b60 into ILIAS-eLearning:release_10 Oct 8, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix php Pull requests that update Php code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant