Skip to content

Instantly share code, notes, and snippets.

View PedroTroller's full-sized avatar

Pierre PLAZANET PedroTroller

View GitHub Profile
@PedroTroller
PedroTroller / ADR.md
Created April 29, 2025 09:46
Use of Repository Methods instead of Doctrine Collections

Use of Repository Methods instead of Doctrine Collections

Context

In our project, we use the Doctrine ORM to manage entities and their relationships. Doctrine allows access to related entities through collections, which are automatically loaded when the relationships are accessed. However, this approach presents several major drawbacks in terms of performance and maintainability.

Problem

The use of Doctrine collections generates several issues:

  • Selection logic in entities: The logic for selecting relationships is included directly in the entities, which violates the principle of separation of concerns and complicates data management.
yolo
| Ingredients | Prix |
| ------------- | -----:|
| Aucun | 5€10 |
| 1 topping | 5€70 |
| Favoris du mois | 6€10 |
| Bambou | 6€30 |
| 2 toppings | 6€30 |
| Poivrons | 6€40 |
| Ananas | 6€40 |
| Champignons | 6€50 |
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Chaises</title>
<link rel="stylesheet" href="https://stackedit.io/style.css" />
</head>
<?php
if ($yolo {
}
@PedroTroller
PedroTroller / gist:f62584cf7fd31db3f3bb
Created January 8, 2015 17:52
Linux on VAIO pro 11
Boot mode : legacy
Secure boot : off
Change boot order and set externalisée support as first element.
To boot info the cd, don't use Assist button.
./Symfony/Component/Process/Exception/RuntimeException.php
./Symfony/Component/Process/Exception/ProcessFailedException.php
./Symfony/Component/Serializer/Exception/RuntimeException.php
./Symfony/Component/Serializer/Exception/UnsupportedException.php
./Symfony/Component/Serializer/Exception/Exception.php
./Symfony/Component/Serializer/Exception/UnexpectedValueException.php
./Symfony/Component/Serializer/Exception/InvalidArgumentException.php
./Symfony/Component/Serializer/Exception/LogicException.php
./Symfony/Component/DependencyInjection/Exception/RuntimeException.php