[ Design Patterns]: Service locator

This is considered as an anti-pattern.

With service locators services are usually defined globally throughout the app and are instantiated to be used as dependency wherever required. According to symfony docs: “Service locators are a design pattern that encapsulates the processes involved in obtaining a service using a central registry known as service locator”.

Majd Arbash

Leave a Reply