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

How to immediately disable access to a user that is soft-deleted or no longer enabled?

In my application, users with the role ROLE_ADMIN are able to manually disable other user accounts, by setting enabled on the user account to false. Using a user checker, the user will not be able to log in the next time they try: public function…
Dirk J. Faber
  • 4,360
  • 5
  • 20
  • 58
3
votes
2 answers

loading fixtures with Symfony 5 in a WebTestCase

How do you load fixtures before running a WebTestCase in Symfony 5 ? Which methods do you use without installing any additional bundles? class MyPageControllerTest extends WebTestCase { public function testIndexAction() { $client =…
PJX
  • 41
  • 3
3
votes
1 answer

Symfony 5: Connect to Azure with HWIOAuthBundle: An authentication exception occurred

I'm trying to connect my Symfony 5 app to Azuse, using the bundle HWIOAuthBundle I have the following message after getting redirected from the microsoft website: "An authentication exception occurred." My securiy.yaml: security: encoders: …
3
votes
1 answer

Symfony 5: Can I have a main and admin firewalls in security.yaml?

I am following an excellent french course designed for symfony 4 and starting getting adapted to symfony 5. I am trying to create a redirection route when an user goes on admin/logout route. According to Symfony 5 official documentation, I do not…
3
votes
2 answers

Unable to install FOSRestBundle with Symfony 5

I was trying to install FOSRestBundle on Symfony 5 using composer but got the following error message: friendsofsymfony/rest-bundle 2.7.1 requires symfony/config ^3.4|^4.3 Is it possible to manually install FOSRestBundle with Symfony 5; as it…
MyO
  • 413
  • 1
  • 8
  • 19
3
votes
2 answers

Symfony 5 SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed:

I am trying to run php bin/console make:migration I received these errors In AbstractMySQLDriver.php line 93: An exception occurred in driver: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Temporary failure in name…
user1794918
  • 1,131
  • 2
  • 16
  • 34
3
votes
1 answer

Symfony, inherited entities and doctrine migration

Under Symfony 5.0, I use generic entity classes to unify internal projects. My generic entity (e.g. Table) looks like this: use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; use Doctrine\ORM\Mapping as…
3
votes
2 answers

how to install Ckeditor on symfony 5?

I'd like to install CKeditor on my symfony project using symfony5 I tried to perform this tutorial but i didn't manage some parts. : https://symfony.com/doc/current/bundles/FOSCKEditorBundle/installation.html 1/ i did this command with…
Patrick Valibus
  • 227
  • 4
  • 17
3
votes
1 answer

php+symfony 5.0.x autoload issue when extending abstract class and implementing interface simultaneously

I have a symfony 5 project. And I faced a problem with autoloading. I use default autoloading configuration, provided by the framework. I have class, abstract class and interface defined in the same directory under the same namespace. The problem…
Sergej
  • 2,030
  • 1
  • 18
  • 28
3
votes
1 answer

The "Parent" property does not appear in "Example Value" with the denormalizationContext group

I use api-platform v3 and symfony v5. I have problem with displayed properties. For examle we have simple entity class Category:
Winzza
  • 562
  • 3
  • 9
3
votes
2 answers

Symfony i18n routes: partial language support

I have a few dozen routes defined as follows: services: path: en: /en/services de: /de/dienstleistungen controller: App\Controller\SimplePageController::page This is using the Localized routing which I believe was introduced…
Jeroen De Dauw
  • 10,321
  • 15
  • 56
  • 79
2
votes
1 answer

Deprecation notices in every console command following Symfony 5.4 upgrade

I am quite confused by the following deprecation notice in my Symfony 5.4 application. The "Symfony\Component\Console\Command\Command::$defaultName" property is considered final. You should not override it…
crmpicco
  • 16,605
  • 26
  • 134
  • 210
2
votes
0 answers

How to Ioncube a symfony 5 project

I'm trying to Ioncube my symfony 5 project and I'm facing some issues. I made a small sample project to illustrate my problem https://github.com/NichoSeb2/ioncube-symfony. When I run a composer install I get a Segmentation fault error, I don't think…
NichoSeb2
  • 21
  • 2
2
votes
1 answer

Symfony 5.4 with lexik/jwt-authentication-bundle - JWT token not signed resulting in JWTEncodeFailureException

I refactored a Symfony 3 project to Symfony 5.4. For some API endpoints to work I need jwt token auth to work which I try with lexik/jwt-authentication-bundle (2.16). My setup is as…
2
votes
2 answers

How to conditionality disable a field in EasyAdmin 4 and Symfony 5.4

I am using Symfony 5.4 and EasyAdmin 4. I have an entity Suscription with a status property. In the edit form of the corresponding CRUD controller, I want to enable/disable some fields depending on status value. If status is validated I want to…
LuD_GRi
  • 63
  • 7