Skip to content
Advertisement

Tag: symfony

Symfony Filesystem chmod() sets the incorrect permissions

I am using the Symfony’s Filesystem component, specifically chmod function: But on the terminal the permissions are weird: It is supposed to look like this: Am I doing something wrong? I’m using the 5.2.4 version. Answer public function chmod($files, int $mode, int $umask = 0000, bool $recursive = false) The second param of the function is the number, you are

a PHPpunit test fail randomly

I have a Quiz class. This class load 10 questions from a database depending on the level and the type of the quiz Object: level 0 load the ten first, level 1 load the next ten and so on. So in my test i create in a test database 30 questions. Then i create quiz object with different level and

An exception has been thrown during the rendering of a template (“Controller not found:

After updating from Symfony 3.4 to 4.0 and verifying the operation, the following error occurred. Do you have any idea? I added the tride code to routes.yaml by referring to the post below, but it didn’t change. Override a controller Symfony 3.4/4.0 Error Resources/views/Hq/Staff/input.html.twig routes.yaml ImageController.php Answer That’s not how you render a controller. It’s clear from the doc To

Symfony4: Security user session saving from DB (Entity) does not work

When I was verifying the operation with Symfony4, when I entered the ID and password, the same login page was displayed. It seems that I haven’t passed the information necessary for making it behaviorally serious, but I don’t know how to fix it. Putting $this->salt in selialize() didn’t change. Are there any other problems? It worked in Symfony 3.4. https://symfony.com/doc/4.0/security/entity_provider.html

Symfony 5 get fail object not found by the @ParamConverter annotation

I have a form for add users on my event, but when I add the user I try to add a role on this event, but I get this fail when the second function is executed AppEntityEvento object not found by the @ParamConverter annotation. I don’t see the problem, thanks My second function is executed when the first one flush

How to get the status of the production server symfony [closed]

Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed last year. Improve this question When starting the server locally I executed the command symfony server:prod using the Symfony

symfony entities many to many, i add new fields

I try this code: Symfony: ManyToMany table extra columns This new field is because the user have a diferent role for diferent events. In the fist time i can add add the new fields on table user.evento, but now i cant. And i dont find the problem. I get this fail: An exception occurred while executing ‘INSERT INTO user_evento (user_id,

API Plateform custom get operation

I am trying to build an ecommerce site using API plateform. Since I am using JWT authentication with LexikJWTAuthenticationBundle I am having a hard time to get the user with the token. I would like to access the cart of the user. I managed to add to the cart through a custom post operation. I am trying to use the

Saving command logger output to log file and console

I wrote a very simple test command which has LoggerInterface injected in its constructor. How am I suppose to change the monolog.yaml configuration to save this logger output to both log file and to output it to console? Answer The commands will always stderr by default (if you specify the -vvv option) If you need to write the logs in

Advertisement