Symfony : Les services - SimplonReunion/developpeur-web GitHub Wiki

Qu'est ce que c'est ?

Put simply, a Service is any PHP object that performs some sort of "global" task. It's a purposefully-generic name used in computer science to describe an object that's created for a specific purpose (e.g. delivering emails). Each service is used throughout your application whenever you need the specific functionality it provides. You don't have to do anything special to make a service: simply write a PHP class with some code that accomplishes a specific task. Congratulations, you've just created a service!

(from symfony.com)

Ressources

Comment faire un service

Activité

Reprendre l'exercice Form & Doctrines. Créer un service qui vérifie l'email avant enregistrement. Si l'email est déjà en base de données ne pas enregistrer le message (ce n'est pas une utilisation courante d'un formulaire mais c'est juste pour l'exemple)