Problem/Motivation
I'm using this module for a Feed Type and recently I have updated mi site to Drupal 10.3, previously I had Drupal 10.2.6. After the update, the Feed Type stopped working and showed me the following error:
ArgumentCountError: Too few arguments to function Drupal\feeds_para_mapper\Feeds\Target\WrapperTarget::__construct(), 3 passed in ./core/lib/Drupal/Core/Plugin/Factory/ContainerFactory.php on line 25 and exactly 6 expected in Drupal\feeds_para_mapper\Feeds\Target\WrapperTarget->__construct() (line 62 of ./modules/contrib/feeds_para_mapper/src/Feeds/Target/WrapperTarget.php).
This is the backtrace of the error:
#0 ./core/lib/Drupal/Core/Plugin/Factory/ContainerFactory.php(25): Drupal\feeds_para_mapper\Feeds\Target\WrapperTarget->__construct(Array, 'wrapper_target', Array)
#1 ./core/lib/Drupal/Component/Plugin/PluginManagerBase.php(83): Drupal\Core\Plugin\Factory\ContainerFactory->createInstance('wrapper_target', Array)
#2 ./modules/contrib/feeds/src/Entity/FeedType.php(516): Drupal\Component\Plugin\PluginManagerBase->createInstance('wrapper_target', Array)
#3 ./modules/contrib/feeds/src/Form/MappingForm.php(388): Drupal\feeds\Entity\FeedType->getTargetPlugin(2)
#4 ./modules/contrib/feeds/src/Form/MappingForm.php(173): Drupal\feeds\Form\MappingForm->buildRow(Array, Object(Drupal\Core\Form\FormState), Array, 2)
#5 [internal function]: Drupal\feeds\Form\MappingForm->buildForm(Array, Object(Drupal\Core\Form\FormState), Object(Drupal\feeds\Entity\FeedType))
#6 ./core/lib/Drupal/Core/Form/FormBuilder.php(536): call_user_func_array(Array, Array)
#7 ./core/lib/Drupal/Core/Form/FormBuilder.php(284): Drupal\Core\Form\FormBuilder->retrieveForm('feeds_mapping_f...', Object(Drupal\Core\Form\FormState))
#8 ./core/lib/Drupal/Core/Controller/FormController.php(73): Drupal\Core\Form\FormBuilder->buildForm(Object(Drupal\feeds\Form\MappingForm), Object(Drupal\Core\Form\FormState))
#9 [internal function]: Drupal\Core\Controller\FormController->getContentResult(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\RouteMatch))
#10 ./core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array)
#11 ./core/lib/Drupal/Core/Render/Renderer.php(638): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#12 ./core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#13 ./core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
#14 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(181): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#15 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#16 ./core/lib/Drupal/Core/StackMiddleware/Session.php(53): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#17 ./core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#18 ./core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#19 ./core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\ContentLength->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#20 ./core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#21 ./core/modules/ban/src/BanMiddleware.php(50): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#22 ./core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\ban\BanMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#23 ./core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#24 ./core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#25 ./core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#26 ./core/lib/Drupal/Core/DrupalKernel.php(741): Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#27 ./index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#28 {main}
Steps to reproduce
Update/upgrade Drupal Core to 10.3.x and try to open mappings in a Feed Type using Paragraphs.
Proposed resolution
I think something has happend in this core update that does not allow to supply arguments to the class WrapperTarget through annotations. I'll implement a create method to supply those required methods.