With symfony2, when I create a form from a controller, I was able to send parameters:
$form = $this->createForm(
new articleType(
$localedefault,
$this->get('request')->getLocale(),
$depotCat,
$this->get('security.context')
),
$article
);
I recovered these parameters from the constructor of my ArticleType.
With symfony3, I put this :
$form = $this->createForm(
ArticleType::class,
$article,
array(
$localedefault,
$request->getLocale(),
$depotCat,
$this->get('security.authorization_checker')
)
);
but this method doesn't work.