Use contracts type restrictions instead of implementation
Library should accept any implementation of the Laravel contracts (interfaces) instead of particular implementation for the internal dependencies.
To be more specific class Sitemap
should accept Illuminate\Contracts\Config\Repository
instead of Illuminate\Config\Repository
, Illuminate\Contracts\Cache\Repository
instead of Illuminate\Cache\Repository
and so on.
Such policy allows usage of any even non-standard implementation of the config repository, cache and other components.