through their constructors, methods, or directly into fields. Those components do not get their dependencies themselves, or instantiate them directly. — picocontainer.com/injection.html
{ private $persister; private $mailer; public function __construct( PersisterInterface $persister, MailerInterface $mailer ) { $this->persister = $persister; $this->mailer = $mailer; } public function register() {/* ... */} } Updating the code of the Mailer will not require you to change the RegistrationManager (if you keep the interface)
making incompatible API changes (interface updated) • Increase the Minor number when... ◦ adding features (interface added) • Increase the Patch number when... ◦ fixing bugs (no interface change)
with our partner SensioLabs University: https://university.sensiolabs.com/e-learning-platform Use the promo code SLUINSIGHT30 to get -30% on the e-Learning Platform