Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
13 views

Symfony Mailer/Messenger apply a delay before sending email [closed]

I'm using Symfony 7.2.1 with the default doctrine messenger transport (MESSENGER_TRANSPORT_DSN=doctrine://default?auto_setup=0 in .env file), setup as async in messenger configuration file. I'm ...
Nicolas's user avatar
  • 414
-1 votes
0 answers
19 views

Authenticator does not support the request and infinite loop for admin login url [duplicate]

Running Symfony Version php bin/console symfony --version Symfony 7.1.8 (env: dev, debug: true) First let me say i know this issue has already been asked, but for older Symfony version ; and the ...
Chris's user avatar
  • 37
0 votes
0 answers
57 views

Create route via Symfony inside a symfony-bundle

I've got a pure Symfony app. I had made own bundle, and want to define routes inside it via annotations/attributes. I don't want to define routes inside main app space - bundle should be installed and ...
M-Zoldak's user avatar
  • 141
0 votes
0 answers
31 views

Use HTTPS as Schema for all routes (Symfony 7 & EasyAdmin Bundle)

I'm using Symfony 7.1 and EasyAdminBundle to list entities as tables and filter them. I have deployed the whole app to Heroku, which works absolutely fine. The only problem is: Some url-routes are ...
codiga's user avatar
  • 586
-1 votes
1 answer
39 views

API run well for generating JWT Token into \auth URL BUT always returns ERROR : 401 Invalid credentials

Try to create API project with latest stack SF7, APIPlatform 4 and JWT. API run well for generating JWT Token into \auth URL BUT always return me ERROR : 401 Invalid credentials lot of trying solution ...
miltone's user avatar
  • 4,709
1 vote
0 answers
57 views

Is it possible to change suppress exceptions mode by default in symfony 7 debug mode?

TL;DR Seems like with APP_DEBUG=1 Symfony catches and suppresses kind of exceptions. Presets. Installed Symfony 7, --webapp. Default env, settings. APP_DEBUG=1 Reproduce Make ping controller. Make ...
Ev.Il's user avatar
  • 11
0 votes
1 answer
27 views

Can I make symfony serializer require all groups to be present? Not just one from the list of groups?

For example I have a property #[Groups(['show', 'admin])] public mixed $name; I want serializer to ignore the property, if all the groups aren't in the context. For example here by default it will ...
Oleg Vartanov's user avatar
0 votes
1 answer
56 views

Symfony 7 - proper way to reuse parts of common forms with many entities

I need to check if my thinking is correct. My application allows to publish adverts on website. I have many entities with similar fields. For example consider this approach: I have 3 entities: ...
Flat Calm's user avatar
0 votes
1 answer
30 views

Symfony: Define role hierarchies in custom bundles

I have a couple of bundles and want to define some roles and hierarchy inside them. The app must somehow merge them into one hierarchy and I want to force somehow use this hierarchy security-bundle. ...
WGPavell's user avatar
0 votes
0 answers
56 views

Why does this regex return a 500? [duplicate]

#[Route('/displayer/{slug}', name: 'app_displayer', requirements: ['slug' =>'/[a-z-_]+(?:\.pdf)$/'])] public function displayer(string $slug): BinaryFileResponse|RedirectResponse the regex in the ...
Sebastien's user avatar
0 votes
1 answer
99 views

Symfony 7.1 and AltCha - Response Status Code 403

I have a Symfony 7.1 app and I would like to integrate AltCha via API in my contact form I always get AltCha API returned status code 403: {"error":"Invalid API Key.","...
Mark's user avatar
  • 79
1 vote
0 answers
34 views

Symfony access_token.token_handler triggers before access_control. What is the best way to skip it for public routes?

I use token_handler to validate token. But I don't need it for PUBLIC_ACCESS routes. The thing is it triggers before access_control. Can I check somehow for a PUBLIC_ACCESS first? Or is there a better ...
Oleg Vartanov's user avatar
0 votes
1 answer
44 views

How to fix null array in ArrayCollection?

Output App\Entity\TourPackage {#313 ▼ -id: null -tour_category: "cultural_tour" -price: "3400" -tour_overview: """ <div>tourPackageImage1</div> &...
steven zong's user avatar
1 vote
1 answer
74 views

Symfony 7.X Custom Resolver Always Called

I am developing an API with Symfony 7.1 I decided to use DTO objects for processing and validating the parameters of my requests. To detect and report if a mandatory parameter is not present in the ...
counteraccro's user avatar
0 votes
1 answer
45 views

Symfony 7 - Doctrine - Data Fixtures - Integrity constraint violation

I have a problem with getting sample data in my database. There are three entities: Books BooksKind BooksTarget There is a OnToOne releationship from Books to BookKind and a ManyToMany relationship ...
Mark's user avatar
  • 79
-1 votes
1 answer
121 views

Symfony scheduler - where do i do database queries

I'm trying to avoid cron and do the job with symfony scheduler. I'm almost there (tested writing some text to a file every 20 seconds), but I'm having hard time with understanding where to put the db ...
Andrei's user avatar
  • 3
0 votes
0 answers
79 views

How to use the Vue3 runtime-only build with Symfony 7

I'm trying to use the the runtime-only build of vue3 with Symfony 7. To do this, I followed the Symfony documentation (except for that I use vue version 3 instead of 2, which is the default). Then I ...
Lord Bo's user avatar
  • 3,301
0 votes
1 answer
47 views

How to deserialize with relations

I am using the Symfony serializer to denormalize JSON data and create an entity with relations. My json body looks like this: { "user": "1", "prop1": "string&...
Blayew's user avatar
  • 1
0 votes
2 answers
116 views

How to properly create form with enum form type, and pass to twig template?

I'm trying to create a edit form for user and want to list current user roles in form and also want to make choice from all roles from enum Roles. There is a example of my code. Current error is "...
Madji's user avatar
  • 47
1 vote
0 answers
102 views

Symfony 7.2 Notifier Component Testing I can test sending only "sync" but not "async" messages using NotifierInterface service

Let's start with the fact that everything works fine but when it comes to tests I can test not everything. When I use "NotifierInterface" service for sending "async" messages ...
Григорий's user avatar
-1 votes
1 answer
135 views

Symfony 7.1.4's authenticator doesn't authenticate [closed]

I'm trying to implement security form authentication in a Symfony 7.1.4 project. Nothing happens after submitting form to /login Route with POST type. No error in logs. Any idea how can i debug ? ...
David Cavansite's user avatar
4 votes
2 answers
2k views

Symfony 7.1 - Doctrine 2.13 automapping feature deprecation

I am developing a project in Symfony 7.1 and since the last update, I have encountered a small problem with the following deprecation: Since doctrine/doctrine-bundle 2.13: Enabling the controller ...
counteraccro's user avatar
-1 votes
1 answer
48 views

Symfony 7.1 Security Bundle : CheckCredentials in AbstractLoginFormAuthenticator

I try to implement a custom "checkCredentials" for the AbstractLoginFormAuthenticator but as mentioned here #40869, it is no longer in this class. GitHubGitHub AbstractGuardAuthenticator not ...
Nico's user avatar
  • 111
0 votes
0 answers
23 views

Missing ForeignKeyContraint validation

I am developing a Symfony 7.1 application. This is my User class (part of it): <?php namespace App\Entity; use App\Repository\UserRepository; use Doctrine\Common\Collections\ArrayCollection; use ...
user3296316's user avatar
1 vote
0 answers
124 views

Add a form field dynamically with Symfony UX

I want to add a dynamic field in a form. However, when clicking on the concerned field, nothing happens. Indeed, when clicking on the "Can publish a podcast" field, another field should ...
Cassius's user avatar
  • 19
0 votes
0 answers
42 views

Why doesn't symfony 7 cookies not work, but vanilla php do?

In my little project I want a user to immediately log out if the user was banned (By Admin or by changing the Database with a tool). I tried to set a cookie with symfony but it doesn't work. But if I ...
Akkie's user avatar
  • 71
0 votes
2 answers
190 views

Why testing API Platform PUT and PATCH requests does not work but API works with same operations with custom components with DTO

I use Doctrine objects in database that are mapped to DTOs by services with a getComponentDtoFromEntity($component) method to expose them on API Platform 3.2 on Symfony 7.1 and PHP 8.3. Each DTO has a ...
Bruno Guignard's user avatar
0 votes
0 answers
27 views

Avoid jwt auth on some routes with PUBLIC_ACCESS

I'm using symfony 7.1; Installed lexikjwttoken; I want to allow some routes to be called without an authentification; Here my security.yml : security: password_hashers: Symfony\Component\...
GPiter's user avatar
  • 799
0 votes
0 answers
54 views

A circular reference has been detected when serializing the object of class Symfony error

I am reaching out because I am encountering a circular reference issue. I am using version 7 of the symfony framework I have tried to implement several solutions, such as the attribute: #[MaxDepth(2)]....
jeremie legrand's user avatar
1 vote
1 answer
303 views

Running Vite dev mode on Symfony 7 application with DDEV webserver

I've been looking to run Vite in development mode (watch JS and CSS files) for my Symfony 7 app which is served with a DDEV webserver. // package.json { // ... "scripts": { &...
Nathalie's user avatar
0 votes
0 answers
58 views

Usage or alternative for oro/doctrine-extensions in Symfony7

my Symfony7 project need some SQL Functions especially dayofyear. I added oro/doctrine-extensions to my composer.json file and added the doctrine:orm:dql: functions accordingly. However I receive ...
Oliver Koehler's user avatar
2 votes
2 answers
628 views

Symfony 7.0 AssetMapper: JS Files Only Load on Initial Page Load or After F5 Refresh

I'm working on a project using Symfony 7.1 and PHP 8.3. I've encountered an issue with the AssetMapper where my JavaScript files only load on the initial page load or after an F5 refresh. When ...
Dimitri G's user avatar
  • 191
0 votes
0 answers
105 views

Error in Symfony with Overblog: Could not find type with alias "Query"

I have using symfony with overblog/graphql-bundle. While creating simple project with sample query and resolver, Got an error "Could not find type with alias "Query". Did you forget to ...
Sivaranjani C's user avatar
1 vote
0 answers
172 views

Symfony 7.0 - Can't get user details in Event Listener

I use Symfony 7.0 framework. I got stuck with this for a few days. Googled, used AI chat, read documentation, but nothing helped. I can't get use details inside of my Event Listener class from ...
Aleksandar Zivanovic's user avatar
0 votes
0 answers
148 views

Trying to configure Gedmo soft delete

I am trying to make doctrine.yaml include Gedmo soft delete. This is my configuration: doctrine: dbal: url: '%env(resolve:DATABASE_URL)%' # IMPORTANT: You MUST configure your ...
Sasha's user avatar
  • 8,675
0 votes
0 answers
86 views

How to Automatically Add ID Parameter to Route Generation in Symfony 7? [duplicate]

In my Symfony 7 project, I aim to automatically add the ID parameter to route generation if it is present in the current request parameters, whether generating the route via Twig or from a controller. ...
user25572171's user avatar
2 votes
0 answers
1k views

symfony 7, Twig, AssetMapper: assets are served fine on dev, but 404 in prod

I am naively trying to learn AssetMapper and follow the instructions but I must be doing something wrong. In my local development environment, it's working flawlessly. In the prod environment on the ...
David's user avatar
  • 865
0 votes
1 answer
211 views

Easy admin collection field add item

I got an issue with my CollectionField. I'm a collections of items just inserted. But when i try to add a new item the id of the new form is the same of the last just inserted. So the last element is ...
Madmax's user avatar
  • 1
0 votes
1 answer
24 views

Symfony 7 How to transform FormType all fields into concatenated string

I have a custom FormType called EffectType created as below and this FormType is used in another FormType as a ->add('effect', EffectType::class) and I would like to transform all the data from the ...
Julien Gidel's user avatar
0 votes
0 answers
58 views

Why is my Voter being called multiple times and without the subject when securing properties in API Platform?

I am working on a Symfony 7 application where I need to implement fine-grained access control using security voters. Specifically, I want to grant access to an entire resource based on one set of ...
Narvalhaut's user avatar
0 votes
1 answer
179 views

Symfony 7 assets are loaded with wrong context path

I am developing a web application with Symfony 7.0. I have a given UI template (Velzon). There is a public/assets folder as well as a assets on top. No I have created a simple Controller with the path ...
user3296316's user avatar
0 votes
1 answer
402 views

Install Bootstrap on Symfony 7, Error message after "package.json" add, and command "npm start"

Error message screencapture Good morning, I am installing Boostrap v 5.3.3 in Symfony following the Bootstrap documentation. But I encounter an error when launching the "npm start" command (...
TheLands's user avatar
-1 votes
1 answer
77 views

Template not updating language direction when changing language

In base.html.twig, I have the following: <html lang="{{- app.request.locale -}}" dir="{{- app.request.locale|locale_dir -}}"> Where locale_dir is a custom Twig filter that ...
537mfb's user avatar
  • 1,472
0 votes
0 answers
323 views

Catching ValidationFailedException in a listener or subscriber

I'm building a simple REST api with Symfony 7 and using MapRequestPayload attribute to automatically map request data into an object. Validation is also handled automatically with symfony/validator. //...
keune's user avatar
  • 5,795