symfony icon indicating copy to clipboard operation
symfony copied to clipboard

doctrine:generate:form - Could not load type "date"

Open dialogik opened this issue 10 years ago • 3 comments

Issue

When creating a form type via doctrine:generate:form it creates a line

->add('birthday', 'date')

which invokes the error

Could not load type "date"

Fix proposal

It should create a line

->add('birthday', DateType::class)

while importing the DateType

use Symfony\Component\Form\Extension\Core\Type\DateType;

dialogik avatar Jan 24 '16 11:01 dialogik

This command does not live in the Symfony package, but in the SensioGeneratorBundle instead. Please report this issue in that repository and close this one.

wouterj avatar Jan 24 '16 11:01 wouterj

Yes, and there is already PR to fix it https://github.com/sensiolabs/SensioGeneratorBundle/pull/464

ChubV avatar Jan 24 '16 13:01 ChubV

@WouterJ Yes sure, please excuse.

dialogik avatar Jan 24 '16 17:01 dialogik