Questions tagged [symfony5]

Use this tag for questions addressing particular features of the PHP framework Symfony in version 5. Otherwise use only the general [symfony] tag plus the language tag [php].

Symfony is a framework for web and CLI-applications built on top of a catalog of Symfony components. It is free software released under the MIT license. The project's homepage is symfony.com.

Symfony 5 was released in November 2019 and includes several changes compared to its predecessor. However there are no new features compared to version 4.4.

1079 questions
3
votes
1 answer

Symfony 5 Mercure Failed to send an update SSL connect error for "https://127.0.0.1:8000/.well-known/mercure"

i'm student and beginner, sorry in advance if i don't understand. I try to use Symfony 5 with mercure but i have some difficulty to send an update to the hub. i check the document to Symfony Mercure doc and think to make a good part about that but…
devstudent
  • 31
  • 5
3
votes
1 answer

Shopware6: How to add Products with variation as childrens to Parent Products in LineItems

I'm trying to build this Page in shopware 6: but since in shopware 6 Products with Variation are sperated (picture below) i couldn't do that. I need to group Products with variation under Parent Product. Does anyone have an idea? The Subscriber…
Arash Yazdani
  • 294
  • 3
  • 18
3
votes
1 answer

How to get firewall name from Request in Symfony 5?

The question is simple. I am implmenting AccessDeniedListener and I get an ExceptionEvent object. From this I can get request. I want to apply certain logic ONLY if I am inside one of my firewalls defined in security.yaml. How can I get the Firewall…
michnovka
  • 2,880
  • 3
  • 26
  • 58
3
votes
1 answer

Symfony 5 Mailer embedded images with liip imagine_filter

In a Symfony 5 project E-Mails are created using the Mailer components TemplatedEmail() function. In the used twig template ($templatedEmail->htmlTemplate(..)) an image is embedded using
user3440145
  • 793
  • 10
  • 34
3
votes
1 answer

Using Symfony HTTP client with try and catch

I am using Symfony HTTP client in an event subscriber and I set timeout to 0.1. The problem is I want the code to skip the HTTP request if took more than 0.1 second and it timedout and meanwhile no error/exception needs to be thrown. I tried try and…
Sam
  • 1,424
  • 13
  • 28
3
votes
1 answer

Symfony 5 easyadmin 3 Entity with relation ManyToOne - NOT saving on the "many" side

I have a very basic symfony 5 + easyadmin 3 app. I created using the make:entity two entities: Posts and Categories When I try to edit Category to assign Posts, posts are not saved in DB. But If I add the category on the post edit is saves in…
Cedric
  • 181
  • 1
  • 8
3
votes
1 answer

Symfony Mailer Dynamic Transport from Database

I would like to specify the SMTP server settings (host, port, password, etc.) through an interface and stored them in a database table so that the user can change this without developer intervention. How can I accomplish this with the mailer…
boonkerz
  • 47
  • 1
3
votes
1 answer

Class "1\HomeController" does not exist

I'm learning from scrach Symfony the version 5.0.1. I created a project with the --full option. The Annotations package is already installed. Here is my error : Class "1\HomeController" does not exist in…
Keys_fh
  • 43
  • 5
3
votes
0 answers

ChoiceType with ValueObject from API

I have a form type $subscriptions = []//array of Subscription $builder ->add('subscription', ChoiceType::class, [ 'choices' => $subscriptions, 'choice_label' => 'code' ]) ; I have the error: Cannot read index…
Sancho
  • 1,288
  • 2
  • 25
  • 50
3
votes
1 answer

Where is the preload.php file, and how is it generated?

With Symfony 5.1 and PHP 7.4, I want to add preload.php in opcache. Symfony documentation : During container compilation (e.g. when running the cache:clear command), Symfony generates a file called preload.php in the config/ directory with the list…
Gaylord.P
  • 1,539
  • 2
  • 24
  • 54
3
votes
2 answers

Symfony 5 $form->isSubmitted() Returning False for File Upload

I am attempting to upload a file via an API endpoint controller I have created: /** * @Route("/upload", methods="POST") */ public function upload(Request $request) { $form = $this->createForm(UserFileType::class); …
user1392897
  • 831
  • 2
  • 9
  • 25
3
votes
5 answers

EasyAdmin3: clickable table-row (link to EDIT-page)

I don't like the "edit"-button at the end of each entity on the INDEX-Page (EasyAdmin 3 / symfony 5) and I would like to have the table-row clickable and it shall send me directly to the EDIT-page. I guess the solution must be using Javascript, so I…
Tim K.
  • 335
  • 4
  • 23
3
votes
2 answers

Symfony 5: ldap authentication with custom user entity

I want to implement the following authentication scenario in symfony 5: User sends a login form with username and password, authentication is processed against an LDAP server if authentication against the LDAP server is successful : if there is…
ben.IT
  • 1,490
  • 2
  • 18
  • 37
3
votes
1 answer

symfony 5.1: how to define a controller as a service

I'm a bit of a noob when it comes to Symfony. I am attempting to create a bundle with a controller that accepts a service as a constructor argument; however, I am receiving this error: The controller for URI "/heartbeat" is not callable: Controller…
chaseisabelle
  • 162
  • 2
  • 18
3
votes
1 answer

MVC routing using Symfony routing

Using symfony / routing, need to implement routing for the MVC application. Using the whole Symfony is prohibited, only the library. Controller class: namespace App\Controllers; use App\Core\Controller; class IndexController extends Controller { …
alex
  • 524
  • 2
  • 11