My functional test return always code 302 with a redirect to my login page. I looked the official Symfony documentation. I tried the two methods. Symfony documentation Here is my test code <?php namespace AppTestsController; use AppRepositoryUserRepository; use SymfonyBundleFrameworkBundleTestWebTestCase; use SymfonyComponentBrowserKitCookie; use SymfonyComponentHttpFoundationResponse; use SymfonyComponentSecurityCoreAuthenticationTokenUsernamePasswordToken; use SymfonyComponentSecurityGuardTokenPostAuthenticationGuardToken; class SecurityControllerTest extends WebTestCase { private $client = ..

Read more

I have a collection type to create my form. I want to passe the category.id as an hidden field This is a part of what i have in my builder ->add(‘category’, HiddenType::class, [‘property_path’ => ‘category.id’] ) $builder->get(‘category’)->addModelTransformer(new CategoryTransformer( $this->categoryRepository )); I’ve added a ModelTransformer in order to "plug" the value of the ID to the ..

Read more

I came along the development situation that the Symfony translation process did not work for a selected system configuration. Thus I am looking again at design alternatives for extracting translatable data in more detail in combination with this software library. The corresponding data export from involved source files should be achievable by console commands. See ..

Read more

I am trying to update Twig in Symfony 4 like this: composer require twig/twig The error message is: Your requirements could not be resolved to an installable set of packages. Problem 1 – twig/extensions is locked to version v1.5.4 and an update of this package was not requested. – twig/extensions v1.5.4 requires twig/twig ^1.27|^2.0 -> ..

Read more