Class "legacy" not found

Hi

I tried to upgrade my test system from Neos 4.3 LTS to 5.3 LTS. After updating via Composer it says:

PHP Fatal error:  Uncaught Error: Class 'legacy' not found in /var/www/html/neoscms/Packages/Framework/Neos.Flow/Classes/Core/Booting/Scripts.php:237
Stack trace:
#0 [internal function]: Neos\Flow\Core\Booting\Scripts::initializeSystemLogger()
#1 /var/www/html/neoscms/Packages/Framework/Neos.Flow/Classes/Core/Booting/Step.php(52): call_user_func()
#2 /var/www/html/neoscms/Packages/Framework/Neos.Flow/Classes/Core/Booting/Sequence.php(107): Neos\Flow\Core\Booting\Step->__invoke()
#3 /var/www/html/neoscms/Packages/Framework/Neos.Flow/Classes/Core/Booting/Sequence.php(111): Neos\Flow\Core\Booting\Sequence->invokeStep()
#4 /var/www/html/neoscms/Packages/Framework/Neos.Flow/Classes/Core/Booting/Sequence.php(111): Neos\Flow\Core\Booting\Sequence->invokeStep()
#5 /var/www/html/neoscms/Packages/Framework/Neos.Flow/Classes/Core/Booting/Sequence.php(90): Neos\Flow\Core\Booting\Sequence->invokeStep()
#6 /var/www/html/neoscms/Packages/Framework/Neos.Flow/Classes/Cli/CommandRequestHandler.php(163): Neos\Flow\Core\Booting\Sequence->invoke() in /var/www/html/neoscms/Packages/Framework/Neos.Flow/Classes/Core/Booting/Scripts.php on line 237

I’ve no idea what “legacy” is - any idea? PHP was updated to 7.4, too.

Thanks for your help,
Jan

Try and run

composer dump-autoload

1 Like

Great - that workd!

Now I’m 400 lines closer to the end of the Scripts.php:

Warning: Declaration of Neos\FluidAdaptor\Core\ViewHelper\AbstractViewHelper::registerArgument($name, $type, $description, $required = false, $defaultValue = NULL) should be compatible with TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper::registerArgument($name, $type, $description, $required = false, $defaultValue = NULL, $escape = NULL) in /var/www/html/neoscms/Packages/Framework/Neos.FluidAdaptor/Classes/Core/ViewHelper/AbstractViewHelper.php line 96
Type: Neos\Flow\Error\Exception
  Code: 1
  File: Packages/Framework/Neos.Flow/Classes/Error/ErrorHandler.php
  Line: 81

Open Data/Logs/Exceptions/20201123105239b64223.txt for a full stack
trace.

  Type: Neos\Flow\Core\Booting\Exception\SubProcessException
  Code: 1355480641
  File: Packages/Framework/Neos.Flow/Classes/Core/Booting/Scripts.php
  Line: 699

Do you have a second idea? :wink:

can you do that?

Of course:

Exception #1 in line 28 of /var/www/html/neoscms/Packages/Framework/Neos.FluidAdaptor/Classes/Core/ViewHelper/AbstractViewHelper.php: Warning: Declaration of Neos\FluidAdaptor\Core\ViewHelper\AbstractViewHelper::registerArgument($name, $type, $description, $required = false, $defaultValue = NULL) should be compatible with TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper::registerArgument($name, $type, $description, $required = false, $defaultValue = NULL, $escape = NULL) in /var/www/html/neoscms/Packages/Framework/Neos.FluidAdaptor/Classes/Core/ViewHelper/AbstractViewHelper.php line 96

32 Neos\Flow\Error\ErrorHandler::handleError()
31 include("/var/www/html/neoscms/Packages/Framework/Neos.Flui…tor/Classes/Core/ViewHelper/AbstractViewHelper.php")
30 Composer\Autoload\includeFile()
29 Composer\Autoload\ClassLoader::loadClass()
28 spl_autoload_call()
27 include("/var/www/html/neoscms/Packages/Application/Flowpac…asses/ViewHelpers/GetHitArrayForNodeViewHelper.php")
26 Composer\Autoload\includeFile()
25 Composer\Autoload\ClassLoader::loadClass()
24 spl_autoload_call()
23 ReflectionClass::__construct()
22 Neos\Flow\Reflection\ClassReflection::__construct()
21 Neos\Flow\Reflection\ReflectionService::reflectClass()
20 Neos\Flow\Reflection\ReflectionService::Neos\Flow\Reflection\{closure}()
19 array_filter()
18 Neos\Flow\Reflection\ReflectionService::reflectEmergedClasses()
17 Neos\Flow\Reflection\ReflectionService::buildReflectionData()
16 Neos\Flow\ObjectManagement\CompileTimeObjectManager::initialize()
15 Neos\Flow\Core\Booting\Scripts::initializeObjectManagerCompileTimeFinalize()
14 call_user_func()
13 Neos\Flow\Core\Booting\Step::__invoke()
12 Neos\Flow\Core\Booting\Sequence::invokeStep()
11 Neos\Flow\Core\Booting\Sequence::invokeStep()
10 Neos\Flow\Core\Booting\Sequence::invokeStep()
9 Neos\Flow\Core\Booting\Sequence::invokeStep()
8 Neos\Flow\Core\Booting\Sequence::invokeStep()
7 Neos\Flow\Core\Booting\Sequence::invokeStep()
6 Neos\Flow\Core\Booting\Sequence::invokeStep()
5 Neos\Flow\Core\Booting\Sequence::invokeStep()
4 Neos\Flow\Core\Booting\Sequence::invoke()
3 Neos\Flow\Cli\CommandRequestHandler::boot()
2 Neos\Flow\Cli\CommandRequestHandler::handleRequest()
1 Neos\Flow\Core\Bootstrap::run()

I think it has sth. to do with a View Helper I’ve written.

Until now this class uses “TYPO3Fluid\Fluid\ViewHelpers\ForViewHelper” and “TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface”. It defines a function

/**
 * @return void
 */
public function initializeArguments()
{
    parent::initializeArguments();
    $this->registerArgument('sortByTitle', 'boolean', 'Set to true in order to sort by title', false);
}

I was able to change the RenderingContextInterface to Neos\FluidAdaptor\Core\Rendering\RenderingContextInterface. But is there a still a ForViewHelper in the current version? Or isn’t it necessary to update the namespace?

Your issue could be related to a very recently introduced and fixed bug:

Do you run the latest patch-level release?

1 Like

Great. Updating to 6.3.4 did it :wink:

1 Like