Skip to content
This repository has been archived by the owner on Sep 30, 2021. It is now read-only.

Latest commit

 

History

History
44 lines (36 loc) · 1.07 KB

UPGRADE-3.0.md

File metadata and controls

44 lines (36 loc) · 1.07 KB

UPGRADE FROM 2.X to 3.0

TranslatableChoiceType was removed

Form type "sonata_type_translatable_choice" (TranslatableChoiceType) was removed. Use form type "choice" (ChoiceType) with "translation_domain" option instead.

Before:

class FooAdmin extends Admin
{
    protected function configureFormFields(FormMapper $formMapper)
    {
        $formMapper->add('articleAuthor', 'sonata_type_translatable_choice',
            array(
                'catalogue'=>'FooAdminBundle',
                'choices'=>array(0=>'no', 1=>'yes')
            )
        );
    }
}

After:

class FooAdmin extends Admin
{
    protected function configureFormFields(FormMapper $formMapper)
    {
        $formMapper->add('articleAuthor', 'choice',
            array(
                'translation_domain'=>'FooAdminBundle',
                'choices'=>array(0=>'no', 1=>'yes')
            )
        );
    }
}

DoctrineORMSerializationType and StatusType

These classes will be remove use respectively BaseDoctrineORMSerializationType and BaseStatusType