fix deprecation: no more passing of type instances

This commit is contained in:
nobohan 2018-04-05 11:45:28 +02:00
parent 68febabd95
commit f7631af1fd

View File

@ -54,7 +54,7 @@ class AccompanyingPeriodController extends Controller
$person->addAccompanyingPeriod(
$accompanyingPeriod);
$form = $this->createForm(new AccompanyingPeriodType(),
$form = $this->createForm(AccompanyingPeriodType::class,
$accompanyingPeriod, array('period_action' => 'create'));
$request = $this->getRequest();
@ -111,7 +111,7 @@ class AccompanyingPeriodController extends Controller
$this->denyAccessUnlessGranted(PersonVoter::UPDATE, $person,
'You are not allowed to update this person');
$form = $this->createForm(new AccompanyingPeriodType(),
$form = $this->createForm(AccompanyingPeriodType::class,
$accompanyingPeriod, array('period_action' => 'update'));
$request = $this->getRequest();
@ -167,7 +167,7 @@ class AccompanyingPeriodController extends Controller
}
$current = $person->getCurrentAccompanyingPeriod();
$form = $this->createForm(new AccompanyingPeriodType(), $current, array(
$form = $this->createForm(AccompanyingPeriodType::class, $current, array(
'period_action' => 'close'
));
@ -267,7 +267,7 @@ class AccompanyingPeriodController extends Controller
$accompanyingPeriod = new AccompanyingPeriod(new \DateTime());
$form = $this->createForm(new AccompanyingPeriodType(),
$form = $this->createForm(AccompanyingPeriodType::class,
$accompanyingPeriod, array('period_action' => 'open'));
if ($request->getMethod() === 'POST') {