Problem/Motivation
Getting this error and stacktrace:
Deprecated function: Optional parameter $migrate_stub declared before required parameter $migrate_plugin_manager is implicitly treated as a required parameter in include() (line 582 of /var/www/html/vendor/composer/ClassLoader.php)
#0 /var/www/html/web/core/includes/bootstrap.inc(347): _drupal_error_handler_real(8192, 'Optional parame...', '/var/www/html/p...', 35)
#1 /var/www/html/vendor/composer/ClassLoader.php(582): _drupal_error_handler(8192, 'Optional parame...', '/var/www/html/p...', 35)
#2 /var/www/html/vendor/composer/ClassLoader.php(582): include('/var/www/html/p...')
#3 /var/www/html/vendor/composer/ClassLoader.php(433): Composer\Autoload\{closure}('/var/www/html/p...')
#4 [internal function]: Composer\Autoload\ClassLoader->loadClass('Drupal\\entity_i...')
#5 /var/www/html/web/modules/contrib/entity_import/src/EntityImportProcessManager.php(101): is_subclass_of('Drupal\\entity_i...', '\\Drupal\\entity_...')
#6 /var/www/html/web/modules/contrib/entity_import/src/EntityImportProcessManager.php(79): Drupal\entity_import\EntityImportProcessManager->getPluginInstances()
#7 /var/www/html/web/modules/contrib/entity_import/src/Form/EntityImporterFieldMappingForm.php(539): Drupal\entity_import\EntityImportProcessManager->getMigrationProcessInfo()
#8 /var/www/html/web/modules/contrib/entity_import/src/Form/EntityImporterFieldMappingForm.php(165): Drupal\entity_import\Form\EntityImporterFieldMappingForm->getMigrationProcessingInfo()
#9 /var/www/html/web/core/lib/Drupal/Core/Entity/EntityForm.php(106): Drupal\entity_import\Form\EntityImporterFieldMappingForm->form(Array, Object(Drupal\Core\Form\FormState))
#10 [internal function]: Drupal\Core\Entity\EntityForm->buildForm(Array, Object(Drupal\Core\Form\FormState))
#11 /var/www/html/web/core/lib/Drupal/Core/Form/FormBuilder.php(536): call_user_func_array(Array, Array)
#12 /var/www/html/web/core/lib/Drupal/Core/Form/FormBuilder.php(283): Drupal\Core\Form\FormBuilder->retrieveForm('entity_importer...', Object(Drupal\Core\Form\FormState))
#13 /var/www/html/web/core/lib/Drupal/Core/Controller/FormController.php(73): Drupal\Core\Form\FormBuilder->buildForm(Object(Drupal\generic_extensions\Form\EntityImporterFieldMappingForm), Object(Drupal\Core\Form\FormState))
#14 [internal function]: Drupal\Core\Controller\FormController->getContentResult(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\RouteMatch))
#15 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array)
#16 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(580): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#17 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#18 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
#19 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(169): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#20 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(81): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#21 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#22 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#23 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#24 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#25 /var/www/html/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#26 /var/www/html/web/core/lib/Drupal/Core/DrupalKernel.php(718): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#27 /var/www/html/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#28 {main}
This is caused by the constructor of \Drupal\entity_import\Plugin\migrate\process\EntityImportMigrationLookup
where the $migrate_stub
doesn't need to be optional as the create function always provides an argument here. But the annotation also needs to declare that a NULL value is allowed.