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

Problems integrating Postmark with Symfony Mailer

I am currently struggeling trying to use Postmark with the Symfony5 Mailer Bundle. Although the documentation seems to be clear, i am unable to send any emails. My first point of confusion is the suggested DSN format for…
2
votes
0 answers

How to extract translations from a custom vendors bundle

I actually trying to create my own reusable bundle. I created a Demo project that include my custom bundle as dependency using symlink composer config. Actually, I tried to extract some translation keys from my custom bundle into the demo…
Skuti
  • 161
  • 1
  • 8
2
votes
1 answer

Customize new authentication errors messages on Symfony5.3

on my new symfony 5.3 project i just implemented the new authentication system, and it works fine, but my problem is that i can't customize the authentication errors: in the method: onAuthentificationFailure in the AbstractLoginFormAuthenticator but…
Zip120
  • 23
  • 4
2
votes
1 answer

How to use EventSubscriber in TYPO3 e.g. for symfony/workflow events?

How is it possible to use Symfony\Component\EventDispatcher\EventSubscriberInterface to implement a subscriber-class, listening for events dispatched by TYPO3s PSR-14 EventDispatcher? Let's see an example by using symfony/workflow for a TYPO3…
Moongazer
  • 452
  • 4
  • 18
2
votes
1 answer

How to fix Command "encore" not found. when trying to add css in symfony?

Simply following instructions: https://symfony.com/doc/current/frontend/encore/installation.html docker-compose exec php composer require symfony/webpack-encore-bundle Xdebug: [Step Debug] Could not connect to debugging client. Tried:…
Darius.V
  • 737
  • 1
  • 13
  • 29
2
votes
1 answer

Form is submitted with "null" but will be object after submit

After hours of debugging the complete vendor/symfony/form/Form I was only able to find out that the FormEvents::SUBMIT converts my null value to Object. This is my code. $form = $this->createForm(PersonType::class, new…
Patrick
  • 829
  • 2
  • 13
  • 34
2
votes
1 answer

Disable a future date using the Symfony DateType

I'm using Symfony 5 and I have a problem with my form. How to disable dates in the future when I use a DateType with 'widget' => 'single-text' and js-datepicker? Note that I don't have access to the frontend, everything has to be done in the…
punckle
  • 23
  • 6
2
votes
2 answers

Why do I get an error associated with PHP8 #[ApiResource()] attribute when using "php bin/console cache:clear"command in Symfony project?

I'm a rookie in development and it's my first time to use PHP8 attributes so I don't have a clue to guess the problem's orgin. :s I'm trying to configure APIPlatform to determine which properties users can see associated with basic HTTP operations…
Emilie S.
  • 31
  • 7
2
votes
0 answers

Multiple form with same EntityType with different choice_value

I have a problem with my Symfony 5.2 : I make a request with data who's going to a FormType with EntityType Foo::class but with a choice_value set on code field I do some payload modification and I forward my request to another…
Vodkhard
  • 21
  • 1
2
votes
0 answers

Symfony 5 - How to enable profiler in production environment (restricted by user role)

I'm trying to find a way to enable the symfony profiler in my production environment. It's also important that the profiler is only accessible when the user has certain roles. To prevent safety issues. Is this even possible in Symfony 5? I've found…
2
votes
2 answers

Expected an instance of "Symfony\Component\Security\Core\User\UserInterface" as first argument

I'm trying to add hashing to passwords for my users, I followed this guide for symfony 5.3 and when I'm using ->setPassword($passwordHasher->hashPassword( $user, 'contraseña' )) While testing if it works,…
2
votes
0 answers

EasyAdmin 3 - Nested one to one form if association is null?

I found a part of my answer on StackOverflow (EasyAdmin 3 - CRUD with nested form) but I have an additional problem. I have a Person entity with an User entity with a one to one relation between the both (0 or 1 user). I would to manage the user…
Jiizen
  • 119
  • 1
  • 11
2
votes
0 answers

Is there a way to customize API Platform Admin screens without writing pages and components from scratch?

Does the lack of decorator support prevent this? I'm hoping to customize certain fields with the prebuilt pages (e.g. instead of an IRI for a subresource field, I want to provide a composite : inside of a chip). It appears by…
Alex
  • 21
  • 1
2
votes
1 answer

How to create password input type in Symfony EasyAdmin 3

How do I create password input type in Symfony EasyAdmin 3 admin form. In EasyAdmin 2 I could use - { property: ..., type: 'password' } What is EasyAdmin 3 version of this?
2
votes
2 answers

How to inject a specific cache pool?

In my Symfony 5 application I want to use different caches for different tasks and of course for different environments. e.g. my configuration looks like this: framework: cache: pools: cache.auth: adapter:…
Calamity Jane
  • 2,189
  • 5
  • 36
  • 68