this code was working before in php 5.4, but after upgrading to php7 i get this error:
Type error: Argument 6 passed to dell\Bundle\dellbundles\ot\otdell::__construct() must be an instance of Symfony\Bundle\FrameworkBundle\Translation\Translator, instance of Symfony\Component\Translation\DataCollectorTranslator given, called in /var/www/dellprj/vendor/dfolder/dfolderbundles/dell/Bundle/otde/Controller/otdellController.php
code for otdellController.php:
$translator = $this->get('translator');
$myvar = new OtDell($this, $this->container, $viewParameters, $logger, $request, $translator);
means $translator
is the problem. Anyway, here is the code for OtDell class:
public function __construct(Controller $controller, ContainerInterface $container, array $viewParameters, LoggerInterface $logger, Request $request, Translator $translator)
{......}
And here is the var_dump of $translator variable:
Thanks in advance.
TranslatorInterface $translator
instead ofTranslator $translator
– Tmb