Project

General

Profile

Actions

Bug #96660

closed

Bug in EXT:core, ExtensionManagementUtility.php causing Runtime Exception

Added by Gabriel Kaufmann / Typoworx NewMedia almost 3 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2022-01-27
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
7.4
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

My TYPO3 ^10.4 instance (currently 10.4.23) throws these errors after composer running some typo3-hooks:

Uncaught TYPO3 Exception #1476107295: PHP Runtime Deprecation Notice: Required parameter $title follows optional parameter $_ in /var/www/../public/typo3/sysext/core/Classes/Utility/ExtensionManagementUtility.php line 974
thrown in file /var/www/../public/typo3/sysext/core/Classes/Error/ErrorHandler.php
in line 134

I'm pretty shure the culprit is wrong definition of non-optional arguments, here:

https://github.com/TYPO3/typo3/blob/de2f469ccc2b4f7dbfffccbf54a5bf063c79ae49/typo3/sysext/core/Classes/Utility/ExtensionManagementUtility.php#L974

Trying to fix it myself, will bring us right to the next bug:

PHP Fatal error: Declaration of Symfony\Component\DependencyInjection\ServiceLocator::has(string $id) must be compatible with Psr\Container\ContainerInterface::has($id) in /var/www/../vendor/symfony/dependency-injection/ServiceLocator.php on line 46

Whats going on here??!

Actions #1

Updated by Benni Mack almost 3 years ago

  • Status changed from New to Needs Feedback

Did you by any chance run TYPO3 v10 with PHP 8 (or even used composer with PHP 8)?

Actions #2

Updated by Gabriel Kaufmann / Typoworx NewMedia almost 3 years ago

Benni Mack wrote in #note-1:

Did you by any chance run TYPO3 v10 with PHP 8 (or even used composer with PHP 8)?

Hello Benni,
after some struggling I came to the same conclusion. The vHost is configured for PHP 7.4 (confirmed with PhpInfo). But PHP 8 is also present in the system. It's working now after pruning vendor/ & composer.lock and reinstalling from scratch using composer. I'm not shure, but I think for some reason I mistakenly must have run composer with PHP8 causing the issue, as some components were resolved for PHP8.

For somebody else running in this case, one must switch the "system default" PHP as composer seems to ignore prepending php7.4.

For debian/ubuntu:
sudo update-alternatives --config php

and select PHP version 7.2<>7.4.

For me it's fine to close the ticket here hoping it may help others as well running in this problem.

Actions #3

Updated by Georg Ringer almost 3 years ago

  • Status changed from Needs Feedback to Closed

closed as requested. thank you for your detailed feedback

Actions

Also available in: Atom PDF