georgringer / news

TYPO3 Extension news
GNU General Public License v2.0
264 stars 358 forks source link

Symfony issue with PHP 8.2 #2340

Closed emileblume closed 8 months ago

emileblume commented 8 months ago

Bug Report

Current Behaviour Updating my TYPO3 12 installation to the latest version results in an error: Fatal error: Declaration of GeorgRinger\News\Command\ProxyClassRebuildCommand::execute(Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output) must be compatible with Symfony\Component\Console\Command\Command::execute(Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output): int in /vhosts/xxx/vendor/georgringer/news/Classes/Command/ProxyClassRebuildCommand.php on line 26

Expected behaviour/output The default TYPO3 backend login page

Environment

Possible Solution Make the InputInterface & OutputInterface compatible with the Symfony Command protected function execute(InputInterface $input, OutputInterface $output) should be: protected function execute(InputInterface $input, OutputInterface $output): int

emileblume commented 8 months ago

Reference: https://github.com/symfony/symfony/blob/7.0/src/Symfony/Component/Console/Command/Command.php

georgringer commented 8 months ago

already fixed in upstream. plan to do an update until monday

PeterProell commented 7 months ago

And there it is again ..... This time with:

cehret commented 7 months ago

And there it is again ..... This time with:

  • TYPO3 12.4.10
  • news 11.3.0
  • Symfony: 7.0.3
  • composer mode yes
  • PHP 8.2

Should be fixed with: https://github.com/georgringer/news/commit/990150d7dc2d4de6835717e6777390364ae4f22e

(I added :int in my installation and it works)

PeterProell commented 7 months ago

Thanks Christian! Me dummy not req dev-main ..... composer req georgringer/news:dev-main of course did the job.