Questions tagged [symfony6]

Use this tag for questions addressing particular features of the PHP framework Symfony in version 6. 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 6 was released in November 2021 and includes several changes compared to its predecessor. However there are no new features compared to version 5.4.

429 questions
0
votes
0 answers

Symfony 6 Form getErrors(), modal with form

i have an modal with an form, when i send the form and it is invalid then the modal closes and you can only see the error when you reopen the modal. My Solution so far is in my controller an elseif($form->isSubmitted() && !$form->isValid()) an then…
cube4d
  • 3
  • 2
0
votes
0 answers

Symfony 6, Can't create a controller

I've installed Php 8 and I try to start coding with Symfony but I can't even create a controller. I've created my project with: create-project symfony/website-skeleton covid The project was created with the version 6.1.99. Then, in VScode, I…
M. R
  • 1
  • 1
0
votes
0 answers

No field in my form exists when validation fails

I have a strange problem on symfony 6.1 I searched, but I couldn't find the solution. The error message: Neither the property "_token" nor one of the methods "_token()", "get_token()"/"is_token()"/"has_token()" or "__call()" exist and have public…
jtech237
  • 66
  • 6
0
votes
0 answers

The target-entity XXXXXXX cannot be found in XXXXXXX

My issue is the following: The target-entity App\Entity\LicenseType cannot be found in 'App\Entity\License#LicenseType'. Screenshot of full Symfony error I tried several things here is the current state of my code This is my License entity…
0
votes
0 answers

Symfony create global Class only for Datatype C-like struct

I am currently developing an APP in Symfony 6.1. I have a always same Set of data, which is using always the same format. For this I want to create a class, which generates Objects using this structure. This class should be globally available (like…
user154501
  • 49
  • 5
0
votes
1 answer

How to integrate Symfony 6 form with proper style into EasyAdmin 4?

I have a logic that wouldn't be easy to implement in EasyAdmin so I decided that I implement it in Symfony 6 then integrate it into EA. The integration worked like a charm but I can't figure out which form_theme should I use to look like the other…
Zoltán Süle
  • 1,482
  • 19
  • 26
0
votes
0 answers

Logging from a Symfony 6 Command

I'm using Symfony Commands to run within cron jobs, everything is working fine, except I cannot manage to log anything. Here is my code namespace App\Command; use Symfony\Component\Console\Command\Command; use…
And Row ID
  • 169
  • 11
0
votes
2 answers

Unable to generate a URL for the named route "main" as such route does not exist

I'm learning Symfony 6.0.9 and I'm trying to build an eshop website and I have a problem : I created the UserAuthenticator.php file and I did all the changes to create new users in my database. But when I try to register or log in, this mesage…
0
votes
1 answer

Symfony Command stores an empty SQL-File for Database Backup

i have an issue by making backup from database (Postgresql 11) with Symfony(6.01) Command. I use also for that the Process Bundle of Symfony. Problem is, if the Controller Action calls the command to backup the database, it saves finally an empty…
behrus
  • 41
  • 10
0
votes
1 answer

Symfony constraint-mapping do not see env variables

I have following .env file: VAR=8888 I want to use this variable from .env file in the constraint config file. So I do this:
0
votes
1 answer

Symfony 6 json_login "missing credentials"

I am trying to get a json_api based login system working in my project. My problem is that when i click my login button, I get an unauthorized error message that there are missing credentials. When i dump the user in the response it shows that it is…
0
votes
1 answer

Symfony serializer configure yaml

I have my custom service, e.g.. MyService with serializer
mat.twg
  • 438
  • 1
  • 5
  • 11
0
votes
1 answer

Symfony custom channel / logger

I am trying to add a simple logger channel "brp" with the following SF6.2-DEV environment: monolog: channels: - deprecation # Deprecations are logged in the dedicated "deprecation" channel when it exists - brp type:…
Alex.Barylski
  • 2,843
  • 4
  • 45
  • 68
0
votes
1 answer

Elastic Search Data is not updating after Insert And Delete in symfony

hey there I'm trying to do crud operation using Symfony and elastic search, crud is working fine but when I insert or delete data then elastic search data is not updating by self I need to run populate command every time. can you help with…
0
votes
0 answers

Is it possible to inject / use services as routing paramters?

I am working with Symfony 6. The configuration of a route allows to add extra parameters which are passed to the controller: index: path: /somepage controller: App\Controller\PageController::index defaults: title: 'Hello…
Andrei Herford
  • 17,570
  • 19
  • 91
  • 225