Questions tagged [symfony4]

Symfony is a PHP framework developed by SensioLabs. Symfony 4 was released November 2017.

Filter by
Sorted by
Tagged with
4
votes
1answer
118 views

How to refactor Symfony 5 controller to comply with SOLID design principles

I am trying to create this API endpoint that will accept JSON payload and will calculate quote based on provided factors and their ratings. I have Entities that contain information about: ...
3
votes
2answers
72 views

Using PHP goto Labels for code folding

I've been using PHP labels in my Controllers for code folding. PHP labels are actually used with goto statements. But I'm using labels only because it's so much ...
3
votes
0answers
88 views

Symfony 4 translate Entity fields

I have been developing multilanguage website based on Symfony4. Structure of one of the tables: ...
1
vote
0answers
57 views

Use Symfony5 native rate-limiter to build a GuzzleRateLimiter middleware

By reading this post https://symfony.com/doc/current/rate_limiter.html I had an idea to use the Symfony rate_limiter as a GuzzleRateLimiterMiddleware. What do you think about it? Do you think it is a ...
1
vote
1answer
39 views

Symfony rest endpoint for get a number products of one user

I want to improve quality of this symfony rest endpoint (solid principle, Kiss, best practice...) Can you review my code please? Symfony controllController function that return json list of product <...
0
votes
0answers
28 views

Architecture of Symfony CQRS, Hexagonal, Messenger project [closed]

Repo url : https://gitlab.com/JakLem/symfony-cqrs-product-sample/-/tree/productCreateWithForm Hi, i dont know if this a good place for this kind of request. If not please provide me another forum like ...
0
votes
0answers
18 views

How to have better performance of code insert many to many relation

I want improve performance of this code. One product or residence have multiple criterion wich have criterion have multiple criterion value. public function createOrUpdateCriteriaIfEntityUpdated( ...