Questions tagged [symfony]
For questions about Symfony, a free PHP web application framework.
32 questions
1
vote
1
answer
118
views
Clean architecture in webapp : how to compose a page which needs to call many use cases?
I'm writing a pretty common Symfony web application, in which HTML is server side rendered (it's not an SPA application).
To illustrate my question, let's take a pretty common fictional eshop ...
2
votes
2
answers
461
views
Clean Arch: Where to put HTTP request inputs handling logic (dto) before calling the service layer
I'm refactoring a common web app (not spa but traditional server side html rendering).
The design/code organization follows more or the less the Clean architecture concepts (ie:
controller calls a use ...
-1
votes
1
answer
470
views
Multiple application sharing same database functionalities
We have two application A and B that I'm refactoring. They both use the same database. Those application are written using the Symfony framework and Doctrine as database layer.
I've moved some of the ...
-2
votes
1
answer
281
views
SOLID way to handle user input error (I18N & error context problematic)
Disclaimer :
I come on this topic after it has been recommended to me on my previous closed SO topic (see closed one : https://stackoverflow.com/questions/64338968/how-to-effectively-manage-a-large-...
0
votes
2
answers
243
views
How to effectively manage a large number of exceptions (I18N problematic) [duplicate]
I'm trying to found the best way to manage Exception for all over my application.
Actually, I've come with two solutions :
Solution 1
One Exception to govern them all.
namespace App\Utils\Exception;
...
0
votes
4
answers
251
views
An action in my controller has too much responsibility
(Disclaimer : I'm asking this question here because as it is opinion-based, it have been closed from https://stackoverflow.com/questions/64050308/an-action-in-my-controller-has-too-much-responsibility)...
3
votes
1
answer
272
views
Multi-client application (Symfony 4 Rest API) : how to manage customization?
I am working on a Symfony 4 rest API application which will be use by multiple client(about 20 different clients). Each client has his specific needs so I have to fork the web application for each ...
0
votes
2
answers
2k
views
Should i use an abstract class or an interface for my doctrine model?
In Doctrine, assuming I want to implement different types of vehicles. Maybe a car, a plane, a bicycle and so on ... all these vehicles have many different properties but also very common things like ...
-1
votes
1
answer
149
views
How to prevent website from hanging on because external web service is unavailable?
A Drupal website is using external Rest API service.
The problem is that in a rare occasion when the Rest API service loses database or crashes for whatever reason, that causes the Drupal website to ...
3
votes
0
answers
86
views
API Cilent - global request method or one method per request?
I am designing a 3rd-party library for developers to retrieve data from various endpoints of another system which itself has multiple APIs. Each of those APIs may contain the same type of request but ...
1
vote
1
answer
2k
views
What is the way to make an internal API
I have a Symfony project.
I want to make this project API based, but also with a Web UI.
So, I have 2 Bundles, ApplicationBundle and WebUiBundle.
In Application Bundle, I have application, domain ...
0
votes
1
answer
58
views
When error is it good to send different formats?
On a REST api I have these endpoints:
GET: /tracks.json
GET: /tracks.xml
GET: /tracks.csv
It receives a tracks resourse and the format gets defined by .^string^ that is after the resourse. eg the ...
7
votes
5
answers
1k
views
php CMS from scratch vs open source
Problem: We have to develop a CMS for our sites. The sites are kind of different, but they have common parts. We need to use our external user system and permissions, the menus are different for each ...
1
vote
2
answers
456
views
Is it a good practice to load Models as a service like I do when I use Symfony framework?
Usually on Symnfony framework I use the provided depedency Injection container and on Controller I load the models as a service. To be more In detail on a current project I am having the following ...
11
votes
3
answers
19k
views
How to consume external RESTful API with Symfony?
We are building a Microservice architecture for our projects, with mostly front-end Symfony applications interacting with back-end RESTful APIs.
The problem is this approach is breaking the Symfony ...