Repository navigation
3.1.4
Included commits: 3.1.3...3.1.4
Bugfixes
- Allow Symfony components version 3.
Migration:
-
Do not use the constructor of FormTypes anymore.
-
Extend Yves or Zed's AbstractType to get Spryker default methods like getFacade() etc.
-
Replace
getName()withgetBlockPrefix(). The block prefix is used in twig templates. When this method is not used the default block prefix from Symfony will be used. -
Replace
setDefaultOptions()withconfigureOptions(). -
ChoiceType has changed its default behavior. Whenever you use some sort of Chice field follow the following examples.
Examples:
- Keep choices retrieved from DataProvider as is and array_flip them where used.
$choices = [0 => 'Spryker', 1 => 'Spryker Shop'];
class YourType extends AbstractType
{
...
$builder->add('my-choices', ChoiceTyoe::class, [
'choices' => array_flip(choices),
]);
...
}- Build array as needed in choices.
$choices = ['Spryker' => 0, 'Spryker Shop' => 1];
class YourType extends AbstractType
{
...
$builder->add('my-choices', ChoiceTyoe::class, [
'choices' => choices,
]);
...
} -
Replace textual types in your form types with FQCN of used type.
Example:$builder->add('foo', 'text')becomes$builder->add('foo', TextType::class). -
Use
security.token_storageinstead ofsecurityto get dependency from the container inside AuthenticationHandler. Check other places for usage as well. -
Watch out deprecation warnings when executing tests. They give really good hints on what to do.