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
3
votes
0 answers

Symfony 6 - Creating excel with PHPSpreadsheet and downloading it asynchronously

I'm stuck on something, and it seems internet haven't had this problem (or i haven't got the right keyword to find the answer) Keep in mind that I'm still learning Symfony 6 and I'm a bit by myself for now ... So I'm open if you tell me that…
3
votes
1 answer

Client is not supported for custom options

I am trying to use ClientBuilder of Elasticsearch using symfony 6. I am getting following error The HTTP client Symfony\Component\HttpClient\Psr18Client is not supported for custom options This is the code I have tried. I had same lines of code in…
nas
  • 2,289
  • 5
  • 32
  • 67
2
votes
1 answer

Symfony 6 only serializing first occurrence of a joined object in Json Response

Not sure on if the title makes sense, but will try explain with an example: Say for instance I have the following Entities: #[ORM\Entity(repositoryClass: Post::class)] class Post { #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] …
2
votes
3 answers

Symfony 6 - Generate URL with "https" on twig templates

I want to generate URL with https:// as a prefix, using the Twig function url(). However, the generated URL is always http://. I made the setup given here: https://symfony.com/doc/6.2/routing.html#forcing-https-on-generated-urls. My…
jean553
  • 621
  • 10
  • 29
2
votes
1 answer

Symfony 6.3 migration causes problems with stateless authenticators forcing request to be stateless

Since Symfony 6.3, when using a stateless authenticator it forces the request to be statless which causes problems with my setup using custom authenticators: My tool doesn't perform the signin itself, it is performed by a custom SSO service which…
Johni
  • 2,933
  • 4
  • 28
  • 47
2
votes
1 answer

Doctrine Deprecation messages during Symfony 6.3 production server cache:clear

I recently upgraded from Symfony 6.2 to 6.3 on both my development and production servers, and everything went swimmingly up until the point that I needed to clear the cache on the product server, whereupon I received the following output. $ php…
fearfelt
  • 91
  • 8
2
votes
0 answers

ChoiceValidator not triggered using Api-Platform when using PATCH endpoint

Cross-posted on ApiPlatform's Github, now labeled as "bug": https://github.com/api-platform/api-platform/issues/2443 I'm setting up a skeleton for myself that has the basics included. Part of that is a User which can have Roles. A Role is not an…
rkeet
  • 3,406
  • 2
  • 23
  • 49
2
votes
0 answers

Invalid state parameter passed in callback URL. With Oauth2 in prod (symfony)

I have a problem with Oauth2. It returns me as error "Invalid state parameter passed in callback URL." I'm on symfony 6 I don't know where this can come from, in localhost everything works but in production I have this error. I looked everywhere for…
2
votes
1 answer

How to Add a field in cascade of 2 many to one on Easyadmin 4 Symfony 6

I read and try a lots of things just to add a field witch is in relation. One Dance have a level (beginner, improver...) and one Level have a Style (Country music, disco...). So for a dance I can get the level and associate style. Dance is MTO with…
2
votes
0 answers

Since symfony/http-foundation 6.2: The "Symfony\Component\HttpFoundation\Request::getContentType()" method is deprecated, use "getContentTypeFormat()"

In my new project using Symfony 6.2 & Api Platform, I have a deprecation that I would like to correct. Can you help me to corret it please ? I have the following error after running tests with PhpUnit : Remaining indirect deprecation notices…
2
votes
1 answer

Why I have "Not found" /admin in symfony easyAdminBundle 4 (php)

I can't open /admin page after installing easyAdminBundle in symfony app. I do: symfony composer req "admin:^4" then symfony console make:admin:dashboard This line generate this code.
Klipe_LD
  • 31
  • 3
2
votes
1 answer

Unrecognized option "api_platform" under "lexik_jwt_authentication"

I am currently working on programming a website using Symfony version 6.2 and API Platform in addition to MongoDB in the database and a work environment on Docker. I am trying to add the feature of connecting through JWT…
sayou
  • 893
  • 8
  • 29
2
votes
2 answers

webpack-cli : Error: spawn Unknown system error -86 / Symfony6 / Mac M1

I have a mac with M1 chip and I wonder if the error is related to this, because on my old one I have no problem. % npm run dev > dev > encore dev Running webpack ... [webpack-cli] Error: spawn Unknown system error -86 at…
2
votes
1 answer

Symfony $this->getUser() without doctrine associations (OneToMany)

In Symfony, we can get current logged-in user data using $this->getUser(), but my problem is when I access this statement, I am getting all the user-associated data set. which has OneToMany relationships with another entity, and it has a lot of…
2
votes
2 answers

How to properly populate an ArrayCollection property of a DTO using Symfony's serializer?

I have a DTO class looking like: class ParamsDto { #[Assert\Type(ArrayCollection::class)] #[Assert\All([ new Assert\Type('digit'), new Assert\Positive(), ])] private ?ArrayCollection $tagIds = null; public…
Twisted1919
  • 2,430
  • 1
  • 19
  • 30
1
2
3
28 29