DarkmiraTour / community-event-manager

Web application with a collection of tools helping people organising community events such as multi-days conference with reminders, CRM and such
GNU General Public License v3.0
21 stars 22 forks source link

Refactorization of entities with dependency injection #153

Open kevinjhappy opened 5 years ago

kevinjhappy commented 5 years ago

Description

See discussion in the PR #48 at this part https://github.com/DarkmiraTour/community-event-manager/pull/48#discussion-diff-269030367R67

kevinjhappy commented 4 years ago

The purpose of this issue is to take one module at a time and apply dependency injection on the entity and apply defensive programming way of coding.

For instance: in the Entity/Address.php we have for all proprieties a getter and a setter, the first thing to do is to change this entity to inject all information into the constructor and remove the setter, in this way it will render an address entity immutable as soon as it is instanciate (I am not speaking on a Database level here)

So in this matter we can create issues descending to those issues to apply this kind of refacto