Skip to content

3.1.4

Choose a tag to compare

@spryker-release-bot spryker-release-bot released this 06 Feb 19:53
· 175 commits to master since this release

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() with getBlockPrefix(). 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() with configureOptions().

  • ChoiceType has changed its default behavior. Whenever you use some sort of Chice field follow the following examples.

    Examples:

    1. 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),
    ]);
    ...
    }

    1. 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_storage instead of security to 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.