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
-2
votes
1 answer

Recover data from two classes into many to many

I have a User table and a Library table, the relationship between them are many to many. So I have a user_library table. I manage to add data to the Library table from User but I cannot recover the data afterwards. I add them like this: $em =…
Aexils
  • 33
  • 5
-2
votes
2 answers

Create custom choice_label in symfony 5 EntityType

I create a form and add EntityType field: ->add('name', EntityType::class, [ 'class' => MyTest::class, 'choice_label' => function($name){ return $name->getName(); }, 'mapped' =>…
user6202945
-2
votes
1 answer

Symfony 5 Installation on Windows 10 keeps running old version

I downloaded and ran "setup.exe" from https://symfony.com/download. Installation seemed to run well. Calling symfony --version results in Symfony Installer version 1.5.11 There might be installed an old Symfony version on the system - however I…
user3440145
  • 793
  • 10
  • 34
-2
votes
1 answer

Symfony 5 support planed?

i work on symfony 5 and i wanne use sonata admin like in all other projects. Is there any upcoming release planed, that sonata admin is installable under symfony 5 with composer?
-3
votes
1 answer

Symfony 5 Get works with quantity of likes

I have some problem with my query, when try get top five works that get the quantity of likes. That my code, please help me improve his and decide this problem, because I'm get next result: My code: public function getTopFiveLikedWorks(int…
Magic Fox
  • 1
  • 1
-3
votes
1 answer

AppKernel.php not found on Symphony 5.3.7?

I tried to follow the following tutorial https://bitgandtter.wordpress.com/2015/09/10/symfony-a-restful-app-security-fosoauthserverbundle/ to install OAUTH2 on symfony. Nevertheless, there is no more an AppKernel.php file (everything works very well…
Laurent
  • 210
  • 4
  • 15
-3
votes
2 answers

Cannot use object of type Symfony\Component\HttpFoundation\Session\Session as array (Symfony 5.3.9)

I am trying to use sessions in Symfony version 5.3.9 with RequestStack because SessionInterface is deprecated. I get the following error: Cannot use object of type Symfony\Component\HttpFoundation\Session\Session as…
TBA
  • 49
  • 5
-3
votes
2 answers

Symfony sub domain routing

How can we use sub domains to access sub folders in Symfony. The question is, how can I have a sub domain routed to a folder? example.com -> example.com/* app.example.com -> example.com/app/* admin.example.com ->…
Bradmage
  • 1,233
  • 1
  • 15
  • 41
-3
votes
1 answer

Problems with Symfony 5.1's prod cache and disabling it

The problem I've been having is that whatever changes I made to twig templates, they never appear on the PROD site without cache:clear commands in console. There are times when checking rapid iterations on a live site are useful without a lot of…
Tubusy
  • 31
  • 1
  • 7
-3
votes
1 answer

Symfony 5 cannot decode json - Notice: Trying to get property 'firstname' of non-object

I am sending data from a controller to a service, but Symfony is not able to use data. The controller receives the data from a fetch POST within the React app, then sends it to the service via $this->updateUser->updateUser($gUpdateUser); : /** *…
kronus
  • 902
  • 2
  • 16
  • 34
-3
votes
1 answer

Expected argument of type "array", "string" given at property path "roles". in Symfony

I'm just trying to add a field hidden in a form by passing a value by default to the field "Roles" in symfony. I check multiple tutoriel but I did'nt find exactly what I am looking for. I put how i save the field "roles" in my database, i put how…
Oren Cohen
  • 13
  • 7
-3
votes
1 answer

How to include class in symfony 5?

I have a php file with Paysafecard class. File is called Paysafecard.php. I'd like to include it in my controller. How can I do it?
-4
votes
1 answer

How can i install Mongodb-odm-bundle with Symfony 5.1?

Here are the errors that I get when i type : composer require doctrine/mongodb-odm-bundle ./composer.json has been updated Loading composer repositories with package information Updating dependencies (including require-dev) Restricting packages…
-4
votes
1 answer

Symfony 5 - How to make an admin backend

I need to create an admin backend where I will be able to access all my CRUD routes. For now here's the controllers I have : MainController (For all my public routes) AdminController WordController (/word CRUD routes) TypeController (/type CRUD…
Rémi Leblanc
  • 33
  • 1
  • 3
1 2 3
71
72